Skip to main content
GET
Get Any Thread
Fetches one thread by id without naming an inbox: thread_id, inbox_id, labels, timestamp, received_timestamp, sent_timestamp, senders, recipients, subject, preview, attachments and messages. Because no inbox is named, this resolves against the whole account. Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created, so a thread id that is not yours still resolves — check the returned inbox_id. The scoped twin is get_agentmail_inbox_thread.

Example

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer authentication

Path Parameters

thread_id
string
required

ID of thread.

Response

Response with status 200

inbox_id
string
required

The ID of the inbox.

thread_id
string
required

ID of thread.

labels
string[]
required

Labels of thread.

timestamp
string<date-time>
required

Timestamp of last sent or received message.

senders
string[]
required

Senders in thread. In format username@domain.com or Display Name <username@domain.com>.

recipients
string[]
required

Recipients in thread. In format username@domain.com or Display Name <username@domain.com>.

last_message_id
string
required

ID of last message in thread.

message_count
integer
required

Number of messages in thread.

size
integer
required

Size of thread in bytes.

updated_at
string<date-time>
required

Time at which thread was last updated.

created_at
string<date-time>
required

Time at which thread was created.

messages
Message · object[]
required

Messages in thread. Ordered by timestamp ascending.

received_timestamp
string<date-time>

Timestamp of last received message.

sent_timestamp
string<date-time>

Timestamp of last sent message.

subject
string

Subject of thread.

preview
string

Text preview of last message in thread.

attachments
Attachment · object[]

Attachments in thread.