List threads
GET
/v1/email/threads
curl -X GET "https://us1.platform.bird.com/v1/email/threads" \
-H "Authorization: Bearer $TOKEN" \
--url-query "label=urgent" \
--url-query "limit=25"Returns a paginated list of conversations across the workspace's mailboxes, most recently active first. Filter by mailbox, linked contact, label, or last-activity time. before and after filter by time; to page through results pass the response cursors back as starting_after or ending_before.
Parametri di query
mailbox_id
string
Filter to conversations in a specific mailbox.
contact_id
string
Filter to conversations linked to a specific contact.
label
string
Filter to conversations carrying this label.
unread
boolean
When true, only conversations with unread messages are returned.
after
string
Filter to conversations whose most recent message is at or after this time. This is a time filter, not a cursor.
before
string
Filter to conversations whose most recent message is at or before this time. This is a time filter, not a cursor.
limit
integer
Maximum number of items to return per page.
starting_after
string
Cursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.
ending_before
string
Cursor from the prev_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order.
Payload di risposta
data
array of object
obbligatorio
Mostra attributi secondari
data.id
string
obbligatorio
Thread ID.
data.mailbox_id
string
obbligatorio
Mailbox this conversation belongs to.
data.channel
string
obbligatorio
Channel this conversation lives on. Always email.
data.contact_id
nullable string
obbligatorio
Contact linked to this conversation, or null when none is linked.
data.subject
nullable string
obbligatorio
Subject of the conversation, taken from its first message. Null when that message had no subject.
data.participants
array of string
obbligatorio
Addresses that appear on the retained messages in this conversation, including the mailbox's own address.
data.message_count
integer
obbligatorio
Number of retained messages in this conversation, both directions.
data.unread_count
integer
obbligatorio
Number of retained received messages in the inbox that are still unread.
data.last_message_at
string
obbligatorio
When the most recent retained message in this conversation was received or sent.
data.last_direction
string
obbligatorio
Direction of the most recent message — inbound for a received message, outbound for a sent one.
data.labels
array of string
obbligatorio
Labels applied to this conversation. A thread carries at most 20 labels.
data.created_at
string
obbligatorio
When the thread was created.
data.updated_at
string
obbligatorio
When the thread last changed.
next_cursor
nullable string
obbligatorio
Cursor for the next page. Pass back as starting_after to advance forward. Null when no next page exists.
prev_cursor
nullable string
obbligatorio
Cursor for the previous page. Pass back as ending_before to step backward. Null when no previous page exists.
refresh_cursor
nullable string
obbligatorio
Refresh anchor. Pass back as ending_before later to fetch items that have appeared since this response. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.