Mailbox API

List mailbox threads

Changed on

Returns a cursor-paginated list of conversation threads for the authenticated mailbox. Filter by text, participant, folder, unread state, attachment presence, or date range.

get/mailbox/threads

Request

  • Base URL: https://app.sendmux.ai/api/v1
  • URL: https://app.sendmux.ai/api/v1/mailbox/threads
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.sendmux.ai/oauth/authorize, token URL https://app.sendmux.ai/oauth/token, scopes: mailbox.read)

Query parameters

cursorstring

Pagination cursor — the next_cursor from the previous response.

limitinteger

Maximum results (default 50, max 100).

qstring

Full-text search query across thread messages.

participantstring

Filter by participant email address or display name.

folder_idstring

Filter to threads with messages in this folder ID.

afterstring

Filter to threads updated after this ISO 8601 timestamp.

beforestring

Filter to threads updated before this ISO 8601 timestamp.

has_attachmentboolean

When true, only return threads with attachments.

is_unreadboolean

When true, only return threads with unread messages.

sort_direction'asc' | 'desc'

Sort direction.

mailbox_idstring

Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.

Response

Thread list

oktrue required

Example response

{
  "data": [
    {
      "last_message": {
        "attachments": [
          {
            "content_type": "application/pdf",
            "disposition": "attachment",
            "download_url": "https://app.sendmux.ai/api/v1/mailbox/messages/msg_123/attachment-downloads/attref_abc123?download_token=...",
            "filename": "invoice.pdf",
            "size_bytes": 12345
          }
        ],
        "bcc": [
          {
            "email": "agent@example.com",
            "name": "Support"
          }
        ],
        "cc": [
          {
            "email": "agent@example.com",
            "name": "Support"
          }
        ],
        "from": {
          "email": "agent@example.com",
          "name": "Support"
        },
        "keywords": [
          "$seen",
          "$flagged",
          "agent_triaged"
        ],
        "to": [
          {
            "email": "agent@example.com",
            "name": "Support"
          }
        ]
      },
      "participants": [
        {
          "email": "agent@example.com",
          "name": "Support"
        }
      ]
    }
  ]
}

Changes

    • info

      removed subschema #2 from the /// response property allOf list for the response status

    • info

      added subschema #2 to the /// response property anyOf list for the response status

    • info

      added the optional property // to the response with the status