> ## 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.

# Get message by message id

> Get message by message id.



## OpenAPI

````yaml /api-reference/conversations/openapi.json get /conversations/messages/{id}
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/{id}:
    get:
      tags:
        - Messages
      summary: Get message by message id
      description: Get message by message id.
      operationId: get-message
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
      responses:
        '200':
          description: Message object for the id given.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMessageResponseDto'
        '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.readonly
components:
  schemas:
    GetMessageResponseDto:
      type: object
      properties:
        id:
          type: string
          example: ve9EPM428h8vShlRW1KT
        altId:
          type: string
          description: Alternative identifier for the message
          example: msg_123456789
        type:
          type: number
          example: 1
        messageType:
          type: string
          description: Type of the message as a string
          example: SMS
          enum:
            - TYPE_CALL
            - TYPE_SMS
            - TYPE_EMAIL
            - TYPE_SMS_REVIEW_REQUEST
            - TYPE_WEBCHAT
            - TYPE_SMS_NO_SHOW_REQUEST
            - TYPE_CAMPAIGN_SMS
            - TYPE_CAMPAIGN_CALL
            - TYPE_CAMPAIGN_EMAIL
            - TYPE_CAMPAIGN_VOICEMAIL
            - TYPE_FACEBOOK
            - TYPE_CAMPAIGN_FACEBOOK
            - TYPE_CAMPAIGN_MANUAL_CALL
            - TYPE_CAMPAIGN_MANUAL_SMS
            - TYPE_GMB
            - TYPE_CAMPAIGN_GMB
            - TYPE_REVIEW
            - TYPE_INSTAGRAM
            - TYPE_WHATSAPP
            - TYPE_CUSTOM_SMS
            - TYPE_CUSTOM_EMAIL
            - TYPE_CUSTOM_PROVIDER_SMS
            - TYPE_CUSTOM_PROVIDER_EMAIL
            - TYPE_IVR_CALL
            - TYPE_ACTIVITY_CONTACT
            - TYPE_ACTIVITY_INVOICE
            - TYPE_ACTIVITY_PAYMENT
            - TYPE_ACTIVITY_OPPORTUNITY
            - TYPE_LIVE_CHAT
            - TYPE_LIVE_CHAT_INFO_MESSAGE
            - TYPE_ACTIVITY_APPOINTMENT
            - TYPE_FACEBOOK_COMMENT
            - TYPE_INSTAGRAM_COMMENT
            - TYPE_CUSTOM_CALL
            - TYPE_INTERNAL_COMMENT
            - TYPE_ACTIVITY_EMPLOYEE_ACTION_LOG
        locationId:
          type: string
          example: ve9EPM428h8vShlRW1KT
        contactId:
          type: string
          example: ve9EPM428h8vShlRW1KT
        conversationId:
          type: string
          example: ve9EPM428h8vShlRW1KT
        dateAdded:
          type: string
          example: '2024-03-27T18:13:49.000Z'
        body:
          type: string
          example: Hi there
        direction:
          type: string
          enum:
            - inbound
            - outbound
        status:
          type: string
          enum:
            - connected
            - delivered
            - failed
            - opened
            - pending
            - read
            - scheduled
            - sent
            - undelivered
            - clicked
            - opt_out
        contentType:
          type: string
          example: text/plain
        attachments:
          description: >-
            An array of attachment URLs. Attachments will be empty for Call and
            Voicemails, type 1 and 10. Please use get call recording API to
            fetch call recording and voicemails.
          type: array
          items:
            type: string
        meta:
          $ref: '#/components/schemas/MessageMeta'
        source:
          type: string
          enum:
            - workflow
            - bulk_actions
            - campaign
            - api
            - app
          description: Message source
        userId:
          type: string
          description: User Id
          example: ve9EPM428kjkvShlRW1KT
        conversationProviderId:
          type: string
          description: Conversation Provider Id
          example: ve9EPM428kjkvShlRW1KT
        chatWidgetId:
          type: string
          description: Chat Widget Id
          example: 67b0cc8cf14b19d85ace7s35
      required:
        - id
        - type
        - messageType
        - locationId
        - contactId
        - conversationId
        - dateAdded
        - direction
        - contentType
    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
    MessageMeta:
      type: object
      properties:
        callDuration:
          type: string
          description: Call duration in seconds
          example: 120
        callStatus:
          type: string
          description: >-
            Call status - can be pending, completed, answered, busy, no-answer,
            failed, canceled, or voicemail
          example: completed
          enum:
            - pending
            - completed
            - answered
            - busy
            - no-answer
            - failed
            - canceled
            - voicemail
        email:
          type: object
          description: >-
            meta will contain email, for message type 3 (email). messageIds is
            list of all email message ids under the message thread
          example:
            email:
              messageIds:
                - ve9EPM428kjkvShlRW1KT
                - ve9EPs1028kjkvShlRW1KT
  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

````