Agent Mail API
Base URL https://app.cloudbox.biz. Authenticate with your CloudBox API key: Authorization: Bearer cbs_.... Write actions need a key with the write scope.
Inboxes
POST
/api/v1/mail/inboxesCreate an inbox. Body: {"name": "billing-bot", "domain": "agents.cloudbox.biz"} (both optional).
GET
/api/v1/mail/inboxesGET
/api/v1/mail/inboxes/{inbox_id}PATCH
/api/v1/mail/inboxes/{inbox_id}Update display_name, mode (open|allowlist|blocklist), allow_list/block_list (newline-separated addresses or @domain), retention_days, or status.
DELETE
/api/v1/mail/inboxes/{inbox_id}Messages
GET
/api/v1/mail/inboxes/{inbox_id}/messagesQuery: limit (≤100), before, q, unread=1, direction=in|out.
GET
/api/v1/mail/inboxes/{inbox_id}/messages/waitLong-poll - see Webhooks & waiting.
GET
/api/v1/mail/messages/{message_id}GET
/api/v1/mail/messages/{message_id}/rawGET
/api/v1/mail/messages/{message_id}/attachments/{n}POST
/api/v1/mail/messages/{message_id}/readPOST
/api/v1/mail/inboxes/{inbox_id}/messages/sendBody: to (string or array), cc, bcc, subject, text, html. Send an Idempotency-Key header to make retries safe.
POST
/api/v1/mail/messages/{message_id}/replyBody: text, html, all (reply-all). Threading headers are set for you.
POST
/api/v1/mail/messages/{message_id}/forwardThreads & usage
GET
/api/v1/mail/inboxes/{inbox_id}/threadsGET
/api/v1/mail/threads/{thread_key}GET
/api/v1/mail/usageReturns this month's inbox count, message counts and your plan caps.
A message object
{
"message_id": "msg_9f2c...",
"thread_key": "msg_9f2c...",
"direction": "in",
"from": "ap@acme.com",
"to": ["billing-bot@agents.cloudbox.biz"],
"subject": "Invoice 4821",
"snippet": "Please find attached...",
"text": "Please find attached...",
"attachments": [{"filename": "invoice.pdf", "size": 48213, "content_type": "application/pdf"}],
"is_read": false,
"created": "2026-08-02T10:14:00Z"
}NoteErrors follow the Storage API shape:
401 unauthorized, 403 scope/forbidden, 404 not found, 422 validation, 429 quota/inbox cap. See Errors & limits.