---
title: "Get one thread on an inbox"
method: GET
path: "/api/inboxes/{channelId}/threads/{threadId}"
tags: ["Inboxes"]
---

# Get one thread on an inbox

`GET /api/inboxes/{channelId}/threads/{threadId}`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/inboxes/{channelId}/threads/{threadId}`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/inboxes/:channelId/threads/:threadId/get.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `channelId` string, required
- `threadId` string, required

## Response `200`

The thread.

- object
  - `data` InboxThread
    - `threadId` string
    - `subject` string, nullable
    - `status` 'closed' | 'new' | 'open' | 'sent', nullable: 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` 'archived' | 'not_junk' | 'junk', nullable: 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` boolean: Whether the thread is marked unread, from the stream's 0/1 `unread` flag. Absent on the stream means read.
    - `assigneeId` string, nullable: Assigned Aptly user id, or null when unassigned.
    - `type` string, nullable
    - `participants` string[]: Email addresses / phone numbers taking part in the thread.
    - `labels` object[]: 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.
      - `id` string
      - `name` string, nullable
    - `metrics` InboxThreadMetrics: Stored metrics for one thread. Response times are in business hours, using the company's configured business hours and holidays.
      - `firstResponseHrs` number, nullable: Time to the first reply. Null when nobody has replied.
      - `avgResponseHrs` number, nullable
      - `responseCount` integer: Replies the averages were computed from.
      - `reopened` boolean: True when an inbound arrived after the thread was closed.
      - `touchCount` integer: Total messages in the thread, both directions.
      - `inboundCount` integer
      - `outboundCount` integer
      - `lastMessageAt` string, date-time, nullable
      - `lastMessageDirection` 'in' | 'out', nullable
    - `messages` InboxMessage[]
      - `messageId` string
      - `threadId` string
      - `subject` string, nullable
      - `body` string, nullable
      - `type` string, nullable: e.g. `email`, `sms`, `voice`.
      - `timestamp` string, date-time
      - `direction` 'in' | 'out'
      - `from` object, nullable: Sender, as `{ id, name }` where `id` is an email address or phone number.
      - `to` object[]: Recipients, each as `{ id, name }`.
      - `sentByUser` string, nullable: Aptly user id that sent an outbound, when known.
      - `sentVia` 'aptly' | 'native', nullable: 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.

## Other responses

- `403`: No access to this inbox.
- `404`: Inbox or thread not found.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
