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

# List messages

> List messages in a thread with pagination support



## OpenAPI

````yaml GET /threads/{threadId}/messages
openapi: 3.1.1
info:
  title: Inbox API
  version: 1.0.0
  description: >+

    The Inbox API gives you full access to manage the following entities in your
    team:

    - **Threads**: DM conversations on X

    - **Account links**: X accounts connected to your team

    - **Members**: users who can access the team

    - **Prospects**: external profiles on X

    - **Tags**: labels for prospects

    - **Statuses**: pipeline statuses for prospects

    - **Lists**: collections of leads with custom columns and import jobs

    - **Campaigns**: automated multi-step DM sequences


    ## A quick note on IDs

    Inbox stores two types of IDs for objects that relate to X:

    - `id` — The Inbox ID, which is the ID of the Inbox object

    - `platformId` — The original X 'platform' ID, which is the ID of the X
    user, conversation, etc.


    Throughout the API, you'll see instances where multiple IDs are present.
    `platformId` is always the original X ID.


    ## Helpful X URLs


    You can use platform IDs to construct direct links to X:


    - **User profile**: `https://x.com/i/user/{platformId}` — This is the most
    reliable way to link to a user since it uses their immutable ID rather than
    their username, which can change.

    - **User by username**: `https://x.com/{username}` — Note that usernames can
    change, so this link may break if the user updates their handle.

    - **Tweet/Post**: `https://x.com/anyusername/status/{tweetId}` — The
    username in the URL is ignored by X; only the tweet ID matters. You can use
    any string in place of the username and the link will still work.

    - **DM conversation**: `https://x.com/i/chat/{conversationPlatformId}` — The
    conversation ID is formatted as `{smallerUserId}:{largerUserId}`, where the
    two participant user IDs are sorted numerically (smaller ID first).


    ## Encoding objects and arrays in query params


    Inbox's API uses bracket notation to denote objects and arrays.


    ### Objects

    For an endpoint that accepts a `cursor` parameter for instance, with the
    cursor object being

    ```json

    {
      id: "l44e15irdq4db30i77cgphhx",
      timestamp: "2025-11-10T18:03:16.000Z"
    }

    ```


    The URL search params would be encoded as:

    ```txt

    ?cursor[id]=l44e15irdq4db30i77cgphhx&cursor[timestamp]=2025-11-10T18:03:16.000Z

    ```


    ### Arrays

    For an endpoint that accepts an `ids` parameter for instance, with the value
    being

    ```json

    ["1", "2", "3"]

    ```


    there are three options:

    1. Repeat the parameter for each value:

    ```txt

    ?ids=1&ids=2&ids=3

    ```

    2. Append `[]` to explicitly denote an array (useful if there's only one
    value):

    ```txt

    ?ids[]=1&ids[]=2&ids[]=3

    ```

    3. Append `[number]` to denote the array index. This option is the most
    flexible and allows for reordering and skipping values:

    ```txt

    ?ids[0]=1&ids[1]=2&ids[2]=3

    ```

  summary: >-
    The Inbox API gives you full access to manage the following entities in your
    team.
servers:
  - url: https://inboxapp.com/api/v1
security: []
tags:
  - name: Teams
    description: >-
      Teams are shared workspace for members to view and manage account links,
      tags, statuses, campaigns, conversations, and more.
  - name: Threads
    description: >-

      Threads represent conversations between an account linked to your team and
      a prospect on Twitter.
                  
  - name: Messages
    description: |-

      Messages are the individual messages sent in a thread.
                  
  - name: Account Links
    description: |-

      Account links represent X accounts connected to your team.
                  
  - name: Members
    description: |-

      Members are Inbox users who can access the team.
                  
  - name: Prospects
    description: |-

      Prospects represent external profiles on X.
                  
  - name: Tags
    description: |-

      Tags are labels for prospects.
                  
  - name: Statuses
    description: >-

      Statuses are used to track the deal stage or any fixed state for a
      prospect.
                  
  - name: Colors
    description: >-

      Get predefined color options that can be used when creating or updating
      tags and statuses.
                  
  - name: Lists
    description: >-
      Lists are collections of leads that you can organize, filter, and use as
      targeting sources for campaigns.
  - name: List columns
    description: >-
      Custom columns defined on a list. Each column stores a text value per lead
      and can be used as merge variables in campaign messages.
  - name: Leads
    description: >-
      Leads are prospects that belong to a list. Each lead has the full prospect
      profile, CRM context (tags, status, notes), and list-specific custom
      column data.
  - name: Import jobs
    description: >-
      Import jobs populate lists from various sources including CSV files, X
      followers, tweet engagements, and X lists. Poll the job status endpoint to
      track progress.
  - name: Campaigns
    description: >-
      Campaigns are automated multi-step DM sequences sent to leads via your
      linked X accounts.


      A campaign pulls its leads from your existing lists using **lead rules** —
      attach lists to automatically sync leads into the campaign, and optionally
      exclude lists (e.g. a "Do Not Contact" list) to avoid messaging certain
      people. Leads can also be added directly or imported in bulk.


      Each campaign has a **sequence** of steps — messages, delays, and tweet
      interactions — that run for every lead. Messages support variables for
      personalization: use the built-in `first-name` variable or create **custom
      columns** on the campaign to store per-lead data like company name or
      role.


      **Automations** let you trigger actions when certain events occur, such as
      applying a tag or setting a status when a prospect replies.


      Configure a sending schedule and hourly message rate, then enable the
      campaign to start sending.
paths:
  /threads/{threadId}/messages:
    get:
      tags:
        - Messages
      summary: List messages
      description: List messages in a thread with pagination support
      operationId: threads.thread.messages.list
      parameters:
        - name: threadId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-z]+$
            description: The ID of the thread to list messages from.
        - name: cursorId
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-z]+$
            description: >-
              The ID of the message to start pagination from. Must be used
              together with cursorTimestamp. Cannot be combined with the cursor
              object parameter.
          allowEmptyValue: true
          allowReserved: true
        - name: cursorTimestamp
          in: query
          required: false
          schema:
            type: string
            format: date-time
            x-native-type: date
            description: >-
              The timestamp of the message to start pagination from. Must be
              used together with cursorId. Cannot be combined with the cursor
              object parameter.
            examples:
              - '2025-11-10T18:03:16.000Z'
          allowEmptyValue: true
          allowReserved: true
        - name: cursor
          in: query
          required: false
          schema:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-z]+$
                description: The ID of the message to start pagination from.
              timestamp:
                type: string
                format: date-time
                x-native-type: date
                description: The timestamp of the message to start pagination from.
                examples:
                  - '2025-11-10T18:03:16.000Z'
            required:
              - id
              - timestamp
            description: >-
              Pagination cursor using [bracket
              notation](https://docs.inboxapp.com/api-reference/introduction#encoding-objects-and-arrays-in-query-params).
              Omit to start from the beginning. Prefer using `cursorId` and
              `cursorTimestamp` instead for simpler query string encoding.
          style: deepObject
          explode: true
          allowEmptyValue: true
          allowReserved: true
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
            description: >-
              Maximum number of messages to return per page. Defaults to 50,
              maximum 100.
            examples:
              - 50
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  teamId:
                    type: string
                    pattern: ^[0-9a-z]+$
                  threadId:
                    type: string
                    pattern: ^[0-9a-z]+$
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
                  nextCursor:
                    anyOf:
                      - type: object
                        properties:
                          timestamp:
                            type: string
                            format: date-time
                            x-native-type: date
                          id:
                            type: string
                            pattern: ^[0-9a-z]+$
                        required:
                          - timestamp
                          - id
                      - type: 'null'
                  isSyncing:
                    type: boolean
                    description: >-
                      Whether the thread is currently syncing older messages
                      from the platform. If true, additional messages may become
                      available shortly. Poll the endpoint to retrieve newly
                      synced messages.
                required:
                  - teamId
                  - threadId
                  - messages
                  - nextCursor
                  - isSyncing
components:
  schemas:
    Message:
      type: object
      properties:
        platform:
          enum:
            - twitter
          description: The platform the message was sent from.
          examples:
            - twitter
        teamId:
          type: string
          pattern: ^[0-9a-z]+$
          examples:
            - df6jbw4h36...
        threadId:
          type: string
          pattern: ^[0-9a-z]+$
          examples:
            - df6jbw4h36...
        id:
          type: string
          pattern: ^[0-9a-z]+$
          description: The Inbox ID of the message.
          examples:
            - df6jbw4h36...
        userId:
          anyOf:
            - type: string
              pattern: ^[0-9a-z]+$
            - type: 'null'
          description: The Inbox user who sent this message if applicable.
          examples:
            - df6jbw4h36...
        createdAt:
          type: string
          format: date-time
          x-native-type: date
        updatedAt:
          anyOf:
            - type: string
              format: date-time
              x-native-type: date
            - type: 'null'
        platformId:
          anyOf:
            - type: string
            - type: 'null'
          examples:
            - '1234567890'
        content:
          type: string
          examples:
            - Hey, I'm reaching out from Acme Agency...
        campaignId:
          anyOf:
            - type: string
              pattern: ^[0-9a-z]+$
            - type: 'null'
          description: The Inbox campaign ID that sent this message if applicable.
          examples:
            - df6jbw4h36...
        authorId:
          type: string
          description: >-
            Will either be the `accountLinkId` or the `externalId` of the
            thread. May be a cuid2 or a legacy external ID.
          examples:
            - df6jbw4h36...
        origin:
          anyOf:
            - enum:
                - internal
                - external
                - api
            - type: 'null'
          description: >-
            The origin of the message. 'internal' means send from a user on
            Inbox, 'external' means synced from Twitter, 'api' means sent via
            the API.
          examples:
            - internal
        replyData:
          anyOf:
            - not: {}
            - type: 'null'
          description: The reply data of the message if applicable.
        forwardData:
          anyOf:
            - not: {}
            - type: 'null'
          description: The forward data of the message if applicable.
        entities:
          not: {}
          description: Normalized URL entities, mentions, hashtags, tweet shares.
        attachment:
          not: {}
          description: Normalized media and card attachments.
        reactions:
          type: array
          items:
            not: {}
          description: Normalized reactions.
        isEncrypted:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the message is end-to-end encrypted.
        isEdited:
          type: boolean
          description: Whether the message has been edited.
        failed:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the message failed to send / was never received by the
            platform.
        deletedAt:
          anyOf:
            - type: string
              format: date-time
              x-native-type: date
            - type: 'null'
          description: When the message was soft-deleted in Inbox.
        platformDeletedAt:
          anyOf:
            - type: string
              format: date-time
              x-native-type: date
            - type: 'null'
          description: When the message was deleted on the platform.
      required:
        - platform
        - teamId
        - threadId
        - id
        - userId
        - createdAt
        - updatedAt
        - platformId
        - content
        - campaignId
        - authorId
        - origin
        - replyData
        - forwardData
        - entities
        - attachment
        - reactions
        - isEncrypted
        - isEdited
        - failed
        - deletedAt
        - platformDeletedAt

````