List messages in a Thread
GET
/api/v1/mail/threads/{id}/messages
const url = 'https://example.com/api/v1/mail/threads/example/messages';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/mail/threads/example/messages \ --header 'Authorization: Bearer <token>'Requires a signed-in User. It returns one page of messages in the Thread and a cursor for the next page. It accepts a page size and paired message cursor. It returns 400 for invalid values or a Category filter, or 404 when the Thread is missing. Route: /api/v1/mail/threads/{id}/messages. Inputs: id, before_received_ms, before_id, limit, category. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Query Parameters
Section titled “Query Parameters”before_received_ms
integer format: int64
before_id
string
limit
integer
category
string
Omit to include every category. The unified Inbox defaults to People.
Responses
Section titled “Responses”Media typeapplication/json
object
items
required
Array<object>
object
account_id
required
string
attachment_count
required
integer format: int32
bcc
required
Array
body_truncated
required
boolean
category
required
string
cc
required
Array
flags
required
Array<string>
folder_id
required
string
from
required
Array
id
required
string
labels
required
Array<string>
preview
required
string
received_ms
required
integer format: int64
sent_date_ms
integer | null format: int64
subject
required
string
thread_id
required
string
to
required
Array
Examplegenerated
{ "items": [ { "account_id": "example", "attachment_count": 1, "bcc": [ "example" ], "body_truncated": true, "category": "example", "cc": [ "example" ], "flags": [ "example" ], "folder_id": "example", "from": [ "example" ], "id": "example", "labels": [ "example" ], "preview": "example", "received_ms": 1, "sent_date_ms": 1, "subject": "example", "thread_id": "example", "to": [ "example" ] } ], "next": { "id": "example", "received_ms": 1 }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}