> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.fr/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get message history for a thread

> Retrieve the message history for a specific thread.

> **Supported products**

> **Required Scopes**


## OpenAPI

````yaml specs/legacy/v3/conversations-conversations-v3.json GET /conversations/v3/conversations/threads/{threadId}/messages
openapi: 3.0.1
info:
  title: Conversations Inbox & Messages
  description: Basepom for all HubSpot Projects
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: FREE
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
  x-hubspot-related-documentation:
    - name: Inbox & Messages Guide
      url: >-
        https://developers.hubspot.com/docs/guides/api/conversations/inbox-and-messages
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Actors
  - name: Basic
  - name: Channel accounts
  - name: Channels
  - name: Inboxes
  - name: Messages
  - name: Threads
paths:
  /conversations/v3/conversations/threads/{threadId}/messages:
    get:
      tags:
        - Threads
      summary: Get message history for a thread
      description: Retrieve the message history for a specific thread.
      operationId: get-/conversations/v3/conversations/threads/{threadId}/messages
      parameters:
        - name: threadId
          in: path
          description: ''
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: after
          in: query
          description: >-
            The paging cursor token of the last successfully read resource will
            be returned as the `paging.next.after` JSON property of a paged
            response containing more results.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: archived
          in: query
          description: Whether to return only results that have been archived.
          required: false
          style: form
          explode: true
          schema:
            type: boolean
        - name: limit
          in: query
          description: The maximum number of results to display per page.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: property
          in: query
          description: ''
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: sort
          in: query
          description: ''
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CollectionResponsePublicMessageForwardPaging
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - conversations.read
components:
  schemas:
    CollectionResponsePublicMessageForwardPaging:
      required:
        - results
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/ForwardPaging'
        results:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/PublicConversationsMessage'
              - $ref: '#/components/schemas/PublicComment'
              - $ref: '#/components/schemas/PublicWelcomeMessage'
              - $ref: '#/components/schemas/PublicAssignmentMessage'
              - $ref: '#/components/schemas/PublicThreadStatusChange'
              - $ref: '#/components/schemas/PublicThreadInboxChange'
    ForwardPaging:
      type: object
      properties:
        next:
          $ref: '#/components/schemas/NextPage'
      description: >-
        Paging information for forward-only pagination. Contains the next page
        reference when more results are available; omitted or empty on the last
        page.
    PublicConversationsMessage:
      required:
        - archived
        - attachments
        - channelAccountId
        - channelId
        - client
        - conversationsThreadId
        - createdAt
        - createdBy
        - direction
        - id
        - recipients
        - senders
        - text
        - truncationStatus
        - type
      type: object
      properties:
        archived:
          type: boolean
        attachments:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/PublicFile'
              - $ref: '#/components/schemas/PublicLocation'
              - $ref: '#/components/schemas/PublicContact'
              - $ref: '#/components/schemas/PublicUnsupportedContent'
              - $ref: '#/components/schemas/PublicMessageHeader'
              - $ref: '#/components/schemas/PublicQuickReplies'
              - $ref: '#/components/schemas/PublicWhatsAppTemplateMetadata'
              - $ref: '#/components/schemas/PublicSocialMetadataAttachment'
        channelAccountId:
          type: string
        channelId:
          type: string
        client:
          $ref: '#/components/schemas/PublicClient'
        conversationsThreadId:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        direction:
          type: string
          enum:
            - INCOMING
            - OUTGOING
        id:
          type: string
        inReplyToId:
          type: string
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/PublicRecipient'
        richText:
          type: string
        senders:
          type: array
          items:
            $ref: '#/components/schemas/PublicSender'
        status:
          $ref: '#/components/schemas/PublicMessageStatus'
        subject:
          type: string
        text:
          type: string
        truncationStatus:
          type: string
          enum:
            - NOT_TRUNCATED
            - TRUNCATED
            - TRUNCATED_TO_MOST_RECENT_REPLY
        type:
          type: string
          default: MESSAGE
          enum:
            - MESSAGE
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    PublicComment:
      required:
        - archived
        - attachments
        - client
        - conversationsThreadId
        - createdAt
        - createdBy
        - id
        - recipients
        - richText
        - senders
        - text
        - type
      type: object
      properties:
        archived:
          type: boolean
        attachments:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/PublicFile'
              - $ref: '#/components/schemas/PublicLocation'
              - $ref: '#/components/schemas/PublicContact'
              - $ref: '#/components/schemas/PublicUnsupportedContent'
              - $ref: '#/components/schemas/PublicMessageHeader'
              - $ref: '#/components/schemas/PublicQuickReplies'
              - $ref: '#/components/schemas/PublicWhatsAppTemplateMetadata'
              - $ref: '#/components/schemas/PublicSocialMetadataAttachment'
        client:
          $ref: '#/components/schemas/PublicClient'
        conversationsThreadId:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        id:
          type: string
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/PublicRecipient'
        richText:
          type: string
        senders:
          type: array
          items:
            $ref: '#/components/schemas/PublicSender'
        text:
          type: string
        type:
          type: string
          default: COMMENT
          enum:
            - COMMENT
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    PublicWelcomeMessage:
      required:
        - archived
        - channelAccountId
        - channelId
        - client
        - conversationsThreadId
        - createdAt
        - createdBy
        - id
        - recipients
        - senders
        - text
        - type
      type: object
      properties:
        archived:
          type: boolean
        channelAccountId:
          type: string
        channelId:
          type: string
        client:
          $ref: '#/components/schemas/PublicClient'
        conversationsThreadId:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        id:
          type: string
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/PublicRecipient'
        richText:
          type: string
        senders:
          type: array
          items:
            $ref: '#/components/schemas/PublicSender'
        text:
          type: string
        type:
          type: string
          default: WELCOME_MESSAGE
          enum:
            - WELCOME_MESSAGE
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    PublicAssignmentMessage:
      required:
        - archived
        - client
        - conversationsThreadId
        - createdAt
        - createdBy
        - id
        - recipients
        - senders
        - type
      type: object
      properties:
        archived:
          type: boolean
        assignedFrom:
          type: string
        assignedTo:
          type: string
        client:
          $ref: '#/components/schemas/PublicClient'
        conversationsThreadId:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        id:
          type: string
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/PublicRecipient'
        senders:
          type: array
          items:
            $ref: '#/components/schemas/PublicSender'
        type:
          type: string
          default: ASSIGNMENT
          enum:
            - ASSIGNMENT
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    PublicThreadStatusChange:
      required:
        - archived
        - client
        - conversationsThreadId
        - createdAt
        - createdBy
        - id
        - newStatus
        - recipients
        - senders
        - type
      type: object
      properties:
        archived:
          type: boolean
        client:
          $ref: '#/components/schemas/PublicClient'
        conversationsThreadId:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        id:
          type: string
        newStatus:
          type: string
          enum:
            - CLOSED
            - OPEN
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/PublicRecipient'
        senders:
          type: array
          items:
            $ref: '#/components/schemas/PublicSender'
        type:
          type: string
          default: THREAD_STATUS_CHANGE
          enum:
            - THREAD_STATUS_CHANGE
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    PublicThreadInboxChange:
      required:
        - archived
        - client
        - conversationsThreadId
        - createdAt
        - createdBy
        - fromInboxId
        - id
        - recipients
        - senders
        - toInboxId
        - type
      type: object
      properties:
        archived:
          type: boolean
        client:
          $ref: '#/components/schemas/PublicClient'
        conversationsThreadId:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        fromInboxId:
          type: string
        id:
          type: string
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/PublicRecipient'
        senders:
          type: array
          items:
            $ref: '#/components/schemas/PublicSender'
        toInboxId:
          type: string
        type:
          type: string
          default: THREAD_INBOX_CHANGE
          enum:
            - THREAD_INBOX_CHANGE
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: The error category
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Context about the error condition
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            A unique identifier for the request. Include this value with any
            error reports or support tickets
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            A map of link names to associated URIs containing documentation
            about the error or recommended remediation steps
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate
          example: An error occurred
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
      description: >-
        Represents an error response returned by the API when an operation
        fails. This component is used in various endpoints to provide detailed
        information about the error encountered.
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    NextPage:
      required:
        - after
      type: object
      properties:
        after:
          type: string
          description: A paging cursor token for retrieving subsequent pages.
        link:
          type: string
          description: A URL that can be used to retrieve the next page results.
      description: >-
        Specifies the paging information needed to retrieve the next set of
        results in a paginated API response
    PublicFile:
      title: FILE
      required:
        - fileId
        - fileUsageType
        - type
      type: object
      properties:
        fileId:
          type: string
        fileUsageType:
          type: string
          enum:
            - AUDIO
            - IMAGE
            - OTHER
            - STICKER
            - VOICE_RECORDING
        name:
          type: string
        type:
          type: string
          default: FILE
          enum:
            - FILE
        url:
          type: string
      x-hubspot-sub-type-impl: true
    PublicLocation:
      title: LOCATION
      required:
        - latitude
        - longitude
        - type
      type: object
      properties:
        address:
          type: string
        latitude:
          type: number
        longitude:
          type: number
        name:
          type: string
        type:
          type: string
          default: LOCATION
          enum:
            - LOCATION
        url:
          type: string
      x-hubspot-sub-type-impl: true
    PublicContact:
      title: CONTACT
      required:
        - contactProfile
        - type
      type: object
      properties:
        contactProfile:
          $ref: '#/components/schemas/ContactProfile'
        type:
          type: string
          default: CONTACT
          enum:
            - CONTACT
      x-hubspot-sub-type-impl: true
    PublicUnsupportedContent:
      title: UNSUPPORTED_CONTENT
      required:
        - type
      type: object
      properties:
        type:
          type: string
          default: UNSUPPORTED_CONTENT
          enum:
            - UNSUPPORTED_CONTENT
      x-hubspot-sub-type-impl: true
    PublicMessageHeader:
      title: MESSAGE_HEADER
      required:
        - type
      type: object
      properties:
        fileId:
          type: integer
          format: int64
        text:
          type: string
        type:
          type: string
          default: MESSAGE_HEADER
          enum:
            - MESSAGE_HEADER
      x-hubspot-sub-type-impl: true
    PublicQuickReplies:
      title: QUICK_REPLIES
      required:
        - allowMultiSelect
        - allowUserInput
        - quickReplies
        - type
      type: object
      properties:
        allowMultiSelect:
          type: boolean
        allowUserInput:
          type: boolean
        quickReplies:
          type: array
          items:
            $ref: '#/components/schemas/QuickReply'
        type:
          type: string
          default: QUICK_REPLIES
          enum:
            - QUICK_REPLIES
      x-hubspot-sub-type-impl: true
    PublicWhatsAppTemplateMetadata:
      title: WHATSAPP_TEMPLATE_METADATA
      required:
        - crmObjectIds
        - parameters
        - type
      type: object
      properties:
        contentId:
          type: integer
          format: int64
        crmObjectIds:
          type: object
          additionalProperties:
            type: integer
            format: int64
        mappedTemplateId:
          type: integer
          format: int64
        parameters:
          type: object
          additionalProperties:
            type: string
        rootMicId:
          type: integer
          format: int64
        type:
          type: string
          default: WHATSAPP_TEMPLATE_METADATA
          enum:
            - WHATSAPP_TEMPLATE_METADATA
      x-hubspot-sub-type-impl: true
    PublicSocialMetadataAttachment:
      title: SOCIAL_MEDIA_METADATA
      required:
        - socialMetadata
        - type
      type: object
      properties:
        socialMetadata:
          $ref: '#/components/schemas/SocialMetadata'
        type:
          type: string
          default: SOCIAL_MEDIA_METADATA
          enum:
            - SOCIAL_MEDIA_METADATA
      x-hubspot-sub-type-impl: true
    PublicClient:
      required:
        - clientType
      type: object
      properties:
        clientType:
          type: string
          description: The type of the client.
          enum:
            - HUBSPOT
            - INTEGRATION
            - SYSTEM
            - UNKNOWN
        integrationAppId:
          type: integer
          description: The ID of the client if the client is an integration.
          format: int32
    PublicRecipient:
      required:
        - deliveryIdentifier
      type: object
      properties:
        actorId:
          type: string
        deliveryIdentifier:
          $ref: '#/components/schemas/PublicDeliveryIdentifier'
        name:
          type: string
        recipientField:
          type: string
    PublicSender:
      type: object
      properties:
        actorId:
          type: string
        deliveryIdentifier:
          $ref: '#/components/schemas/PublicDeliveryIdentifier'
        name:
          type: string
        senderField:
          type: string
    PublicMessageStatus:
      required:
        - statusType
      type: object
      properties:
        failureDetails:
          $ref: '#/components/schemas/PublicMessageFailureDetails'
        statusType:
          type: string
          enum:
            - FAILED
            - READ
            - RECEIVED
            - SENT
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: The status code associated with the error detail
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Context about the error condition
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: The name of the field or parameter in which the error was found.
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
      description: >-
        Represents detailed information about an error that occurred in the API.
        This component is used to provide additional context and specifics about
        errors, typically as part of an error response.
    ContactProfile:
      required:
        - addresses
        - emails
        - phones
        - urls
      type: object
      properties:
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/ContactAddress'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/ContactEmail'
        name:
          $ref: '#/components/schemas/ContactName'
        org:
          $ref: '#/components/schemas/ContactOrg'
        phones:
          type: array
          items:
            $ref: '#/components/schemas/ContactPhone'
        urls:
          type: array
          items:
            $ref: '#/components/schemas/ContactUrl'
    QuickReply:
      required:
        - value
        - valueType
      type: object
      properties:
        label:
          type: string
        value:
          type: string
        valueType:
          type: string
          enum:
            - TEXT
            - URL
    SocialMetadata:
      required:
        - mediaType
      type: object
      properties:
        description:
          type: string
        id:
          type: string
        mediaTitle:
          type: string
        mediaType:
          type: string
          enum:
            - ARTICLE
            - AUDIO
            - CAROUSEL
            - DOCUMENT
            - GIF
            - LINK
            - NONE
            - PHOTO
            - POLL
            - STORY
            - VIDEO
        mediaUrl:
          type: string
        mediaUrlString:
          type: string
        thumbnailUrl:
          type: string
    PublicDeliveryIdentifier:
      required:
        - type
        - value
      type: object
      properties:
        type:
          type: string
          description: >-
            The type of identifier. HS_EMAIL_ADDRESS for email addresses;
            HS_PHONE_NUMBER for a phone number; CHANNEL_SPECIFIC_OPAQUE_ID for
            channels that use their own proprietary identifiers, like Facebook
            Messenger or LiveChat.
          enum:
            - CHANNEL_SPECIFIC_OPAQUE_ID
            - HS_EMAIL_ADDRESS
            - HS_PHONE_NUMBER
            - HS_SHORT_CODE
        value:
          type: string
          description: >-
            A string representation of the PublicDeliveryIdentifier, either an
            an E.164 phone number, an email address, or a channel-specific
            identifier.
    PublicMessageFailureDetails:
      required:
        - errorMessageTokens
      type: object
      properties:
        errorMessage:
          type: string
        errorMessageTokens:
          type: object
          additionalProperties:
            type: string
    ContactAddress:
      type: object
      properties:
        city:
          type: string
        country:
          type: string
        countryCode:
          type: string
        state:
          type: string
        street:
          type: string
        type:
          type: string
          enum:
            - HOME
            - WORK
        zip:
          type: string
    ContactEmail:
      required:
        - email
      type: object
      properties:
        email:
          type: string
        type:
          type: string
          enum:
            - HOME
            - WORK
    ContactName:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
        middleName:
          type: string
        prefix:
          type: string
        suffix:
          type: string
    ContactOrg:
      type: object
      properties:
        company:
          type: string
        department:
          type: string
        title:
          type: string
    ContactPhone:
      required:
        - phone
      type: object
      properties:
        phone:
          type: string
        type:
          type: string
          enum:
            - CELL
            - HOME
            - MAIN
            - WORK
    ContactUrl:
      required:
        - url
      type: object
      properties:
        type:
          type: string
          enum:
            - HOME
            - WORK
        url:
          type: string
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.hubspot.com/oauth/authorize
          tokenUrl: https://api.hubapi.com/oauth/v1/token
          scopes:
            conversations.read: ''
            conversations.write: ''

````