Mailbox API
Get clean thread content
Returns a cursor-paginated clean JSON view of messages in a thread. Attachment output is metadata only; attachment contents are not parsed by this endpoint.
get/mailbox/threads/{thread_id}/content
Request
- Base URL: https://app.sendmux.ai/api/v1
- URL: https://app.sendmux.ai/api/v1/mailbox/threads/{thread_id}/content
- 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)
Path parameters
thread_idstring required
Query parameters
part'auto' | 'text' | 'html'
Body part to return. auto prefers text when available.
max_body_charsinteger
Maximum body characters to return before truncation.
strip_signatureboolean
When true, remove detected email signatures.
strip_quotesboolean
When true, remove quoted reply text.
include_linksboolean
When true, include links extracted from the body.
include_htmlboolean
When true, include HTML content when available.
include_headers'none' | 'selected' | 'full'
Header detail to include in the response.
include_attachments'none' | 'metadata'
Attachment detail to include. Contents are not returned.
cursorstring
limitinteger
sort'asc' | 'desc'
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.
Headers
If-None-Matchstring
Response
Clean thread content
Example response
{
"meta": {
"participants": [
{
"email": "agent@example.com",
"name": "Support"
}
]
},
"data": [
{
"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
}
],
"headers": {
"selected": {
"reply_to": [
{
"email": "agent@example.com",
"name": "Support"
}
]
}
},
"participants": {
"bcc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"cc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"from": {
"email": "agent@example.com",
"name": "Support"
},
"reply_to": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"to": [
{
"email": "agent@example.com",
"name": "Support"
}
]
}
}
]
}