Export
Inbox export.
| Method | Path | Summary |
|---|---|---|
GET | /v0/inboxes/{inbox_id}/export | Export Inbox |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/export | Export Inbox in Pod |
Export Inbox
Every message in the inbox, oldest first, streamed as an attachment named <inbox_id>.<format>.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredID of the inbox: its email address, as in AgentMail (inbox_id == email).
Query parameters
format"mbox" | "jsonl"mbox: every message as raw MIME in one mbox file. jsonl: one Message JSON object per line.
Response
200 The export (application/mbox, application/x-ndjson)
Headers:
Content-Dispositionstringattachment; filename="<inbox_id>.<format>"
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Export Inbox in Pod
Same as Export Inbox (GET /v0/inboxes/{inbox_id}/export), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredID of the pod.
inbox_idstringRequiredID of the inbox: its email address, as in AgentMail (inbox_id == email).
Query parameters
format"mbox" | "jsonl"mbox: every message as raw MIME in one mbox file. jsonl: one Message JSON object per line.
Response
200 The export (application/mbox, application/x-ndjson)
Headers:
Content-Dispositionstringattachment; filename="<inbox_id>.<format>"
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.