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

# Get one thread on an inbox

> Returns one thread in the same shape as an entry of
`GET /api/inboxes/{channelId}/threads`: its messages and stored per-thread
metrics. Message `body` is the stored snippet; use the message endpoint
below for the full body and attachments.

Junk threads are returned too, since the thread is asked for by id. A
thread that belongs to another inbox returns 404.




## OpenAPI

````yaml /openapi.yaml get /api/inboxes/{channelId}/threads/{threadId}
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.1'
  description: |
    The Aptly API lets external systems work with boards, contacts, inboxes,
    tasks, files, and other Aptly resources.

    Most endpoints accept an API key in the `x-token` header. Some endpoints
    also accept a delegate token or partner bearer token, as shown in each
    operation's security requirements, and explicitly public endpoints require
    no credential. API keys are scoped to a company and may be restricted to
    specific boards and read, insert, or update permissions; requests outside
    those restrictions receive a 403 `FORBIDDEN` response.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/inboxes/{channelId}/threads/{threadId}:
    get:
      tags:
        - Inboxes
      summary: Get one thread on an inbox
      description: >
        Returns one thread in the same shape as an entry of

        `GET /api/inboxes/{channelId}/threads`: its messages and stored
        per-thread

        metrics. Message `body` is the stored snippet; use the message endpoint

        below for the full body and attachments.


        Junk threads are returned too, since the thread is asked for by id. A

        thread that belongs to another inbox returns 404.
      operationId: getInboxThread
      parameters:
        - name: channelId
          in: path
          required: true
          schema:
            type: string
          description: External channel meta ID (`meta.id`) of the inbox.
        - name: threadId
          in: path
          required: true
          schema:
            type: string
          description: Thread id from the threads list.
      responses:
        '200':
          description: The thread.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/InboxThread'
        '403':
          description: No access to this inbox.
        '404':
          description: Inbox or thread not found.
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
        - PartnerBearer: []
components:
  schemas:
    InboxThread:
      type: object
      properties:
        threadId:
          type: string
        subject:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
          enum:
            - closed
            - new
            - open
            - sent
          description: >-
            The conversation's status, mapped from the stream's numeric `status`
            field (0 closed, 1 new, 2 open, 3 sent). `null` when the thread has
            no status, or an unrecognized one.
        isJunk:
          type: string
          nullable: true
          enum:
            - archived
            - not_junk
            - junk
          description: >-
            The thread's junk state, mapped from the stream's numeric `isJunk`
            field (-1 archived, 0 not junk, 1 junk). `null` when the thread has
            no value, or an unrecognized one. Junk threads are excluded from the
            listing unless `includeJunk=true`.
        unread:
          type: boolean
          description: >-
            Whether the thread is marked unread, from the stream's 0/1 `unread`
            flag. Absent on the stream means read.
        assigneeId:
          type: string
          nullable: true
          description: Assigned Aptly user id, or null when unassigned.
        type:
          type: string
          nullable: true
        participants:
          type: array
          items:
            type: string
          description: Email addresses / phone numbers taking part in the thread.
        labels:
          type: array
          description: >-
            Folder labels applied to the thread, each as `{ id, name }`. Only
            real folder labels are returned — the encoded scoping ids also
            stored on a thread (channel, assignee, mention, person type,
            category) are omitted.
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
                nullable: true
        metrics:
          $ref: '#/components/schemas/InboxThreadMetrics'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/InboxMessage'
    InboxThreadMetrics:
      type: object
      description: >-
        Stored metrics for one thread. Response times are in business hours,
        using the company's configured business hours and holidays.
      properties:
        firstResponseHrs:
          type: number
          nullable: true
          description: Time to the first reply. Null when nobody has replied.
        avgResponseHrs:
          type: number
          nullable: true
        responseCount:
          type: integer
          description: Replies the averages were computed from.
        reopened:
          type: boolean
          description: True when an inbound arrived after the thread was closed.
        touchCount:
          type: integer
          description: Total messages in the thread, both directions.
        inboundCount:
          type: integer
        outboundCount:
          type: integer
        lastMessageAt:
          type: string
          format: date-time
          nullable: true
        lastMessageDirection:
          type: string
          enum:
            - in
            - out
          nullable: true
    InboxMessage:
      type: object
      properties:
        messageId:
          type: string
        threadId:
          type: string
        subject:
          type: string
          nullable: true
        body:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
          description: e.g. `email`, `sms`, `voice`.
        timestamp:
          type: string
          format: date-time
        direction:
          type: string
          enum:
            - in
            - out
        from:
          type: object
          nullable: true
          description: >-
            Sender, as `{ id, name }` where `id` is an email address or phone
            number.
        to:
          type: array
          items:
            type: object
          description: Recipients, each as `{ id, name }`.
        sentByUser:
          type: string
          nullable: true
          description: Aptly user id that sent an outbound, when known.
        sentVia:
          type: string
          nullable: true
          enum:
            - aptly
            - native
          description: >-
            How an outbound message was sent: `aptly` when it was composed in
            Aptly, `native` when the user sent it from their own mail client and
            it synced in. Always `null` on inbound messages.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-token
    DelegateToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Delegate token issued by the platform. Format: `DelegateToken <token>`'
    PartnerBearer:
      type: http
      scheme: bearer
      description: 'Partner token. Format: `Authorization: Bearer <token>`'

````

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