---
title: "List threads"
method: GET
path: "/threads"
tags: ["Threads"]
---

# List threads

`GET /threads`

## Request

- Base URL: `https://shipmail.to/api/v1`
- URL: `https://shipmail.to/api/v1/threads`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://shipmail.to/api/auth/oauth2/authorize`, token URL `https://shipmail.to/api/auth/oauth2/token`)

List message threads for a mailbox with cursor-based pagination.

## Query parameters

- `mailbox_id` string, required
- `cursor` string
- `limit` integer

## Headers

- `X-Shipmail-Organization` string

## Response `200`

Paginated list of thread summaries.

- object
  - `data` Thread[], required
    - `object` 'thread', required
    - `id` string, required
    - `conversation_id` string, required: Stable Shipmail conversation identifier (thd_...). Store this: it survives thread merges and mail-server re-threading, which thread_id does not.
    - `mailbox_id` string, required
    - `subject` string, nullable, required
    - `message_count` integer, required
    - `latest_message` Message, required
      - `object` 'message', required
      - `id` string, required
      - `mailbox_id` string, required
      - `thread_id` string, nullable, required: Deprecated and not stable: a legacy thread ID that changes when the mail server re-threads its IDs or a relayed send's placeholder key is replaced. It remains supported in thread paths; store conversation_id instead.
      - `conversation_id` string, nullable, required: Stable Shipmail conversation identifier (thd_...). Store this: it survives thread merges and mail-server re-threading, which thread_id does not.
      - `source_rfc_message_id` string, nullable, required: Source RFC Message-ID supplied by the caller or observed before relay.
      - `delivered_rfc_message_id` string, nullable, required: Exact provider-assigned delivered RFC Message-ID after Shipmail observes it in a recipient reply. Null before an observation and never reconstructed from the SES provider ID.
      - `client_reference` string, nullable, required: Caller-defined organization-scoped reference.
      - `metadata` MessageMetadata, required: Up to 20 scalar values and 8 KB of JSON. Nested objects and arrays are rejected.
      - `headers` OutboundHeader[], required: Safe outbound headers. Shipmail, SES, routing, and identity headers are rejected. RFC 8058 requires List-Unsubscribe-Post: List-Unsubscribe=One-Click and an HTTPS List-Unsubscribe URL.
        - `name` string, required: List-Unsubscribe, List-Unsubscribe-Post, or a non-reserved X-* header.
        - `value` string, required
      - `subject` string, nullable, required
      - `from_address` string, nullable, required
      - `to_addresses` Recipient[], nullable, required
        - union: Email recipient. Either an object with address and optional name, or a string.
          - object
            - `address` string, email, required: Email address.
            - `name` string, nullable: Display name (optional).
          - string: Email address as a string. Accepts plain address ("user@example.com") or display name format ("Jane Doe <user@example.com>").
      - `cc_addresses` Recipient[], nullable, required
        - union: Email recipient. Either an object with address and optional name, or a string.
          - object
            - `address` string, email, required: Email address.
            - `name` string, nullable: Display name (optional).
          - string: Email address as a string. Accepts plain address ("user@example.com") or display name format ("Jane Doe <user@example.com>").
      - `bcc_addresses` Recipient[], nullable, required
        - union: Email recipient. Either an object with address and optional name, or a string.
          - object
            - `address` string, email, required: Email address.
            - `name` string, nullable: Display name (optional).
          - string: Email address as a string. Accepts plain address ("user@example.com") or display name format ("Jane Doe <user@example.com>").
      - `attachments` AttachmentMetadata[], nullable, required: Attachment metadata (filename, size, content_type). Null if no attachments.
        - `filename` string, required
        - `size` integer, required: Size in bytes.
        - `content_type` string, required
      - `source` 'api' | 'dashboard' | 'newsletter' | 'inbound' | 'smtp' | 'assistant', required
      - `mode` 'live' | 'test', required: The API-key data plane that owns this resource. Test resources are isolated from live delivery, quota, suppression, and reputation.
      - `status` 'scheduled' | 'queued' | 'sent' | 'delivered' | 'bounced' | 'complained' | 'failed' | 'suppressed' | 'cancelled', required
      - `rule_disposition` object, nullable, required: Inbox rule evaluation recorded when this inbound tracked message was delivered. Null for outbound messages, messages ingested before rule disposition was recorded, or messages delivered while rule evaluation was unavailable.
        - `matched_rule_ids` string[], required: IDs of the inbox rules that matched this message, in evaluation order.
        - `stop_rule_id` string, nullable, required: ID of the matching inbox rule whose stop setting ended further rule processing, or null if processing was not stopped.
      - `scheduled_at` string, date-time, nullable, required: UTC ISO 8601 time when a scheduled message should be sent. Null for immediate messages.
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `pagination` Pagination, required
    - `next_cursor` string, nullable, required: Cursor for the next page. Null if no more results.
    - `has_more` boolean, required: Whether more results exist beyond this page.
    - `limit` integer, required: Number of items per page.

## Other responses

- `422`: Validation failed.
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/shipmail/apis/shipmail-api.md) · [All operations](https://skmtc.dev/shipmail/apis/shipmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shipmail/apis/shipmail-api/revisions/2c23e59d7e30?raw)
