curl --request POST \
--url https://app.sendmux.ai/api/v1/mailbox/messages:batch-get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
]
}
'{
"ok": true,
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"data": {
"messages": [
{
"message": {
"id": "<string>",
"thread_id": "<string>",
"folder_ids": [
"<string>"
],
"subject": "<string>",
"preview": "<string>",
"from": {
"email": "agent@example.com",
"name": "Support"
},
"to": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"cc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"bcc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"received_at": "<string>",
"sent_at": "<string>",
"size_bytes": 123,
"has_attachments": true,
"keywords": [
"$seen",
"$flagged",
"agent_triaged"
],
"flags": {
"seen": true,
"flagged": true,
"draft": true,
"answered": true
}
},
"raw_body": {
"id": "<string>",
"thread_id": "<string>",
"body": {
"text": "<string>",
"html": "<string>",
"is_truncated": true,
"truncated_at_chars": 123
},
"states": {
"email_state": "<string>"
}
},
"content": {
"id": "<string>",
"thread_id": "<string>",
"subject": "<string>",
"participants": {
"from": {
"email": "agent@example.com",
"name": "Support"
},
"to": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"cc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"bcc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"reply_to": [
{
"email": "agent@example.com",
"name": "Support"
}
]
},
"dates": {
"received_at": "<string>",
"sent_at": "<string>"
},
"body": {
"text": "<string>",
"html": "<string>",
"is_truncated": true,
"truncated_at_chars": 123,
"signature_stripped": true,
"quotes_stripped": true,
"extracted_links": [
"<string>"
]
},
"headers": {
"selected": {
"message_id": [
"<string>"
],
"in_reply_to": "<string>",
"references": [
"<string>"
],
"reply_to": [
{
"email": "agent@example.com",
"name": "Support"
}
]
},
"full": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"attachments": [
{
"id": "<string>",
"filename": "<string>",
"content_type": "application/pdf",
"size_bytes": 123,
"disposition": "<string>",
"content_id": "<string>",
"download_url": "<string>"
}
],
"states": {
"email_state": "<string>",
"option_hash": "<string>"
}
}
}
],
"not_found": [
"<string>"
],
"states": {
"email_state": "<string>"
}
}
}Batch get mailbox messages
Returns exact messages by ID. Use body_mode to choose summary-only output, raw body output, or clean JSON content. Attachment output remains metadata only; attachment contents are not parsed.
curl --request POST \
--url https://app.sendmux.ai/api/v1/mailbox/messages:batch-get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
]
}
'{
"ok": true,
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"data": {
"messages": [
{
"message": {
"id": "<string>",
"thread_id": "<string>",
"folder_ids": [
"<string>"
],
"subject": "<string>",
"preview": "<string>",
"from": {
"email": "agent@example.com",
"name": "Support"
},
"to": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"cc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"bcc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"received_at": "<string>",
"sent_at": "<string>",
"size_bytes": 123,
"has_attachments": true,
"keywords": [
"$seen",
"$flagged",
"agent_triaged"
],
"flags": {
"seen": true,
"flagged": true,
"draft": true,
"answered": true
}
},
"raw_body": {
"id": "<string>",
"thread_id": "<string>",
"body": {
"text": "<string>",
"html": "<string>",
"is_truncated": true,
"truncated_at_chars": 123
},
"states": {
"email_state": "<string>"
}
},
"content": {
"id": "<string>",
"thread_id": "<string>",
"subject": "<string>",
"participants": {
"from": {
"email": "agent@example.com",
"name": "Support"
},
"to": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"cc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"bcc": [
{
"email": "agent@example.com",
"name": "Support"
}
],
"reply_to": [
{
"email": "agent@example.com",
"name": "Support"
}
]
},
"dates": {
"received_at": "<string>",
"sent_at": "<string>"
},
"body": {
"text": "<string>",
"html": "<string>",
"is_truncated": true,
"truncated_at_chars": 123,
"signature_stripped": true,
"quotes_stripped": true,
"extracted_links": [
"<string>"
]
},
"headers": {
"selected": {
"message_id": [
"<string>"
],
"in_reply_to": "<string>",
"references": [
"<string>"
],
"reply_to": [
{
"email": "agent@example.com",
"name": "Support"
}
]
},
"full": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"attachments": [
{
"id": "<string>",
"filename": "<string>",
"content_type": "application/pdf",
"size_bytes": 123,
"disposition": "<string>",
"content_id": "<string>",
"download_url": "<string>"
}
],
"states": {
"email_state": "<string>",
"option_hash": "<string>"
}
}
}
],
"not_found": [
"<string>"
],
"states": {
"email_state": "<string>"
}
}
}Authorizations
Sendmux API key. Use a root API key for Management API routes, or a mailbox credential for Mailbox API routes. Obtain keys from the dashboard under API Keys.
Query Parameters
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.
Body
1 - 100 elementsnone, raw, clean_json auto, text, html, both 1 <= x <= 1000000none, selected, full none, metadata Response
Batch message result
true Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Message ID
Active message keywords, including system flags and custom labels.
["$seen", "$flagged", "agent_triaged"]Hide child attributes
Hide child attributes
Message ID
text, html, both Hide child attributes
Hide child attributes
Message ID
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
text, html HTML body when requested. Returned as a JSON string and not as rendered content.
Hide child attributes
Hide child attributes
none, selected, full Hide child attributes
Hide child attributes
Attachment metadata only. Attachment contents are not parsed by this endpoint.
Hide child attributes
Hide child attributes
Attachment ID
"application/pdf"
Was this page helpful?