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

# Get Thread

> A thread and its most recent messages, every channel together, oldest to newest

Reading does **not** mark the thread as read: use [Update Thread](https://docs.minimo.it/api-reference/inbox/update-thread.md) with
`markRead: true`.

## Reading older messages

The response holds the latest `limit` messages (30 by default). When `olderMessages` is `true`, call again with
`beforeMessageId` set to the first `messageId` you received.

## Message fields

* `text` is always plain text, also for emails; pass `includeHtml=true` to get the email HTML as `html` too.
* `status`, `failureReason`, `seenAt` and `templateName` are on outbound messages only.
* `media` holds a WhatsApp image, audio, video or document; `attachments` the files of an email.

## Permissions

The API key needs the **Inbox** permission. A thread of another workspace answers `404`, like a missing one.


## OpenAPI

````yaml get /public/v1/inbox/threads/{threadId}
openapi: 3.1.0
info:
  title: API Documentation
  description: Documentation for transactional and subscribe APIs
  version: 1.0.0
servers:
  - url: https://app.minimo.it
security:
  - bearerAuth: []
paths:
  /public/v1/inbox/threads/{threadId}:
    servers:
      - url: https://api.minimo.it
    get:
      summary: Get an inbox thread
      description: >-
        A thread and its most recent messages, every channel together, oldest to
        newest. Reading does not mark the thread as read.
      operationId: getInboxThread
      parameters:
        - name: threadId
          in: path
          required: true
          description: The `threadId` from List Threads or Search Threads.
          schema:
            type: integer
        - name: limit
          in: query
          required: false
          description: Messages to return.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
        - name: beforeMessageId
          in: query
          required: false
          description: 'Page back: only messages older than this one.'
          schema:
            type: integer
        - name: includeHtml
          in: query
          required: false
          description: Also return the email HTML as `html`.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: The thread and its messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      thread:
                        $ref: '#/components/schemas/InboxThread'
                      messages:
                        type: array
                        items:
                          $ref: '#/components/schemas/InboxMessage'
                      olderMessages:
                        type: boolean
                        description: >-
                          `true` = there may be older messages: call again with
                          `beforeMessageId` = the first `messageId`.
              example:
                data:
                  thread:
                    threadId: 1234
                    status: open
                    unreadMessages: 2
                    pinned: false
                    channels:
                      - whatsapp
                    contact:
                      contactId: 5678
                      name: Mario Rossi
                      email: null
                      phone: '393331234567'
                    assignedTo: null
                    needsHuman: false
                    ai:
                      state: active
                      since: null
                    snoozedUntil: null
                    updatedAt: '2026-11-13T09:00:00.000Z'
                    lastMessage:
                      messageId: 90112
                      direction: inbound
                      channel: whatsapp
                      subject: null
                      preview: Do you ship to Sicily?
                      at: '2026-11-13T09:00:00.000Z'
                  messages:
                    - messageId: 90110
                      direction: outbound
                      channel: whatsapp
                      at: '2026-11-13T08:58:00.000Z'
                      subject: null
                      text: Hi Mario, how can we help?
                      from:
                        name: Assistant
                        address: null
                      status: sent
                      failureReason: null
                      seenAt: '2026-11-13T08:59:00.000Z'
                      templateName: null
                      media: null
                      reaction: null
                    - messageId: 90112
                      direction: inbound
                      channel: whatsapp
                      at: '2026-11-13T09:00:00.000Z'
                      subject: null
                      text: Do you ship to Sicily?
                      from:
                        name: Mario Rossi
                        address: null
                      media: null
                      reaction: null
                  olderMessages: true
        '400':
          description: '`INVALID_PARAMETERS`: a parameter of the wrong type or out of range.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboxError'
        '401':
          description: Missing or invalid API key, or a key without the `Inbox` permission.
        '404':
          description: Unknown thread, or a thread of another workspace.
      security:
        - bearerAuth: []
      x-codeSamples:
        - label: CLI
          lang: cURL
          source: |-
            curl --request GET \
              --url 'https://api.minimo.it/public/v1/inbox/threads/1234?limit=5' \
              --header 'Authorization: Bearer {{BEARER_TOKEN}}'
        - lang: JavaScript
          source: >-
            const res = await
            fetch('https://api.minimo.it/public/v1/inbox/threads/1234?limit=5',
            {
              method: 'GET',
              headers: {
                'Authorization': 'Bearer {{BEARER_TOKEN}}',
              },
            });

            const { data } = await res.json();

            console.log(data);
        - lang: Python
          source: |-
            import requests

            res = requests.get(
                'https://api.minimo.it/public/v1/inbox/threads/1234?limit=5',
                headers={'Authorization': 'Bearer {{BEARER_TOKEN}}'},
            )
            print(res.json())
components:
  schemas:
    InboxThread:
      type: object
      description: >-
        One conversation with one contact: email, WhatsApp, SMS and Telegram
        together. The MCP `minimo_inbox_*` tools return the same object.
      properties:
        threadId:
          type: integer
          example: 1234
        status:
          type: string
          enum:
            - open
            - closed
            - snoozed
        unreadMessages:
          type: integer
          example: 2
        pinned:
          type: boolean
        channels:
          type: array
          description: Channels this contact has used in the thread.
          items:
            type: string
            enum:
              - whatsapp
              - email
              - sms
              - telegram
        contact:
          type: object
          properties:
            contactId:
              type: integer
              example: 5678
            name:
              type: string
              nullable: true
              example: Mario Rossi
            email:
              type: string
              nullable: true
              example: mario@example.com
            phone:
              type: string
              nullable: true
              example: '393331234567'
        assignedTo:
          type: object
          nullable: true
          description: The teammate the thread is assigned to, `null` if nobody.
          properties:
            userId:
              type: integer
              example: 42
            name:
              type: string
              nullable: true
              example: Giulia Bianchi
        needsHuman:
          type: boolean
          description: The AI handed the thread over to a person.
        ai:
          type: object
          properties:
            state:
              type: string
              enum:
                - active
                - paused
                - disabled
              description: >-
                `active` = the AI answers. `paused` = a teammate replied or the
                AI handed over; the AI comes back after the assistant's pause
                time. `disabled` = off on this thread until it is turned on
                again.
            since:
              type: string
              format: date-time
              nullable: true
              description: When the AI paused (`paused` only).
        snoozedUntil:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
        lastMessage:
          type: object
          nullable: true
          properties:
            messageId:
              type: integer
              example: 90112
            direction:
              type: string
              enum:
                - inbound
                - outbound
              description: >-
                `inbound` = from the contact, `outbound` = from you, your team
                or your AI.
            channel:
              type: string
              enum:
                - whatsapp
                - email
                - sms
                - telegram
            subject:
              type: string
              nullable: true
              description: Email only.
            preview:
              type: string
              description: The text on one line, up to 280 characters.
            at:
              type: string
              format: date-time
    InboxMessage:
      type: object
      properties:
        messageId:
          type: integer
          example: 90112
        direction:
          type: string
          enum:
            - inbound
            - outbound
        channel:
          type: string
          enum:
            - whatsapp
            - email
            - sms
            - telegram
        at:
          type: string
          format: date-time
        subject:
          type: string
          nullable: true
          description: Email only.
        text:
          type: string
          description: >-
            Plain text, up to 4,000 characters. For an email with only HTML, the
            HTML converted to text.
        html:
          type: string
          description: The email HTML. Only with `includeHtml=true`.
        from:
          type: object
          properties:
            name:
              type: string
              nullable: true
            address:
              type: string
              nullable: true
        status:
          type: string
          nullable: true
          description: >-
            Outbound only. Delivery status: `pending`, `sending`, `sent`, or
            `failed` / `bounced` / `complained`.
        failureReason:
          type: string
          nullable: true
          description: Outbound only. Why the message failed or bounced.
        seenAt:
          type: string
          format: date-time
          nullable: true
          description: Outbound only. When the contact read it, if the channel reports it.
        templateName:
          type: string
          nullable: true
          description: Outbound only. The WhatsApp template sent, if any.
        media:
          type: object
          nullable: true
          description: WhatsApp image, audio, video or document.
          properties:
            url:
              type: string
            type:
              type: string
              nullable: true
            filename:
              type: string
              nullable: true
        attachments:
          type: array
          description: Email files. Missing when there are none.
          items:
            type: object
            properties:
              url:
                type: string
              filename:
                type: string
              contentType:
                type: string
              size:
                type: integer
        reaction:
          type: string
          nullable: true
          description: The latest WhatsApp emoji reaction on this message.
    InboxError:
      type: object
      description: >-
        `message` is the code, `userMessage` a sentence you can show to a
        person.
      properties:
        status:
          type: string
          example: FAIL
        message:
          type: string
          example: WHATSAPP_WINDOW_CLOSED
        userMessage:
          type: string
          example: >-
            WhatsApp allows free text only within 24 hours of the contact's last
            WhatsApp message. Send an approved template instead.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: mn-API_CLIENT_ID-API_KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.