> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add an inbound message

> Post the necessary fields for the API to add a new inbound message. <br />



## OpenAPI

````yaml /api-reference/conversations/openapi.json post /conversations/messages/inbound
openapi: 3.0.0
info:
  title: Conversations API
  description: Documentation for Conversations API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Conversations
    description: Documentation for Conversations API
  - name: Search
    description: Documentation for Conversations API
  - name: Email
    description: Documentation for Conversations API
  - name: Messages
    description: Documentation for Conversations API
  - name: Providers
    description: Documentation for Conversations API
paths:
  /conversations/messages/inbound:
    post:
      tags:
        - Messages
      summary: Add an inbound message
      description: >-
        Post the necessary fields for the API to add a new inbound message. <br
        />
      operationId: add-an-inbound-message
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessMessageBodyDto'
      responses:
        '200':
          description: Created the message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessMessageResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
      security:
        - bearer:
            - conversations/message.write
components:
  schemas:
    ProcessMessageBodyDto:
      type: object
      properties:
        type:
          type: string
          description: Message Type
          example: SMS
          enum:
            - SMS
            - Email
            - WhatsApp
            - GMB
            - IG
            - FB
            - Custom
            - WebChat
            - Live_Chat
            - Call
        attachments:
          description: Array of attachments
          type: array
          items:
            type: string
        message:
          type: string
          description: Message Body
        conversationId:
          type: string
          description: Conversation Id
          example: ve9EPM428h8vShlRW1KT
        conversationProviderId:
          type: string
          description: Conversation Provider Id
          example: 61d6d1f9cdac7612faf80753
        html:
          type: string
          description: HTML Body of Email
        subject:
          type: string
          description: Subject of the Email
        emailFrom:
          type: string
          description: >-
            Email address to send from. This field is associated with the
            contact record and cannot be dynamically changed.
          example: sender@company.com
        emailTo:
          type: string
          description: >-
            Recipient email address. This field is associated with the contact
            record and cannot be dynamically changed.
        emailCc:
          description: List of email address to CC
          example:
            - john1@doe.com
            - john2@doe.com
          type: array
          items:
            type: string
        emailBcc:
          description: List of email address to BCC
          example:
            - john1@doe.com
            - john2@doe.com
          type: array
          items:
            type: string
        emailMessageId:
          type: string
          description: >-
            Send the email message id for which this email should be threaded.
            This is for replying to a specific email
        altId:
          type: string
          description: external mail provider's message id
          example: 61d6d1f9cdac7612faf80753
        direction:
          type: object
          description: >-
            Message direction, if required can be set manually, default is
            outbound
          default: outbound
          example:
            - outbound
            - inbound
        date:
          format: date-time
          type: string
          description: Date of the inbound message
        call:
          $ref: '#/components/schemas/CallDataDTO'
      required:
        - type
        - conversationId
        - conversationProviderId
    ProcessMessageResponseDto:
      type: object
      properties:
        success:
          type: boolean
        conversationId:
          type: string
          description: Conversation ID.
          example: ABC12h2F6uBrIkfXYazb
        messageId:
          type: string
          description: This is the main Message ID
          example: t22c6DQcTDf3MjRhwf77
        message:
          type: string
        contactId:
          type: string
        dateAdded:
          format: date-time
          type: string
        emailMessageId:
          type: string
      required:
        - success
        - conversationId
        - messageId
        - message
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    CallDataDTO:
      type: object
      properties:
        to:
          type: string
          description: Phone number of the receiver
          example: '+15037081210'
        from:
          type: string
          description: Phone number of the dialer
          example: '+15037081210'
        status:
          type: string
          description: Call status
          example: completed
          enum:
            - pending
            - completed
            - answered
            - busy
            - no-answer
            - failed
            - canceled
            - voicemail
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use the Access Token generated with user type as Sub-Account (OR)
        Private Integration Token of Sub-Account.
      type: http

````