Messages
Send, receive, search and manage messages.
| Method | Path | Summary |
|---|---|---|
GET | /v0/inboxes/{inbox_id}/messages | List Messages |
POST | /v0/inboxes/{inbox_id}/messages/batch-get | Batch Get Messages |
POST | /v0/inboxes/{inbox_id}/messages/batch-update | Batch Update Messages |
GET | /v0/inboxes/{inbox_id}/messages/search | Search Messages |
POST | /v0/inboxes/{inbox_id}/messages/send | Send Message |
GET | /v0/inboxes/{inbox_id}/messages/{message_id} | Get Message |
PATCH | /v0/inboxes/{inbox_id}/messages/{message_id} | Update Message |
DELETE | /v0/inboxes/{inbox_id}/messages/{message_id} | Delete Message |
GET | /v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id} | Get Attachment |
GET | /v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}/download | Download Attachment |
POST | /v0/inboxes/{inbox_id}/messages/{message_id}/forward | Forward Message |
GET | /v0/inboxes/{inbox_id}/messages/{message_id}/raw | Get Raw Message |
POST | /v0/inboxes/{inbox_id}/messages/{message_id}/reply | Reply To Message |
POST | /v0/inboxes/{inbox_id}/messages/{message_id}/reply-all | Reply All Message |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages | List Messages in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/batch-get | Batch Get Messages in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/batch-update | Batch Update Messages in Pod |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/search | Search Messages in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/send | Send Message in Pod |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id} | Get Message in Pod |
PATCH | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id} | Update Message in Pod |
DELETE | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id} | Delete Message in Pod |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id} | Get Attachment in Pod |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}/download | Download Attachment in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id}/forward | Forward Message in Pod |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id}/raw | Get Raw Message in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id}/reply | Reply To Message in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/messages/{message_id}/reply-all | Reply All Message in Pod |
List Messages
Messages in the inbox, newest first.
Spam, blocked, trash, quarantined and unauthenticated messages are hidden unless you pass the matching include_* flag or ask for the label in labels. Spam, blocked, trash and unauthenticated also need the matching label_*_read permission; without it the flag is ignored.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredQuery parameters
limitintegerpage_tokenstringascendingbooleanlabelsstring[]beforestring (date-time)afterstring (date-time)include_spambooleaninclude_blockedbooleaninclude_unauthenticatedbooleaninclude_trashbooleaninclude_quarantinebooleanqstringResponse
200 A page of messages (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of messages is a MessageItem:
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"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
Batch Get Messages
Up to 100 messages by ID in one request, as full Message objects. Duplicate IDs are read once; IDs past the first 100 distinct ones are dropped. Missing IDs and IDs from other inboxes are omitted: compare count with limit (the number of IDs you sent).
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredRequest body
Content type: application/json.
message_idsstring[]RequiredResponse
200 The messages found (application/json)
limitintegerRequiredcountintegerRequiredEach item of messages is a Message:
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"reply_tostring[]textstringhtmlstringextracted_textstringextracted_htmlstringreceived_via"raw"trustTrustReportErrors
| 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
Batch Update Messages
Apply one label change to up to 100 messages: the same add_labels and remove_labels apply to every message. Messages are updated one at a time, not atomically. Missing IDs are skipped: compare count with limit.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_update.
Path parameters
inbox_idstringRequiredRequest body
Content type: application/json.
message_idsstring[]Requiredadd_labelsstring | string[]remove_labelsstring | string[]Response
200 The updated messages (application/json)
limitintegerRequiredcountintegerRequiredEach item of updates is a UpdateMessageResponse:
message_idstringRequiredlabelsstring[]RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Search Messages
Full-text search across messages in the inbox, newest first (not ranked by relevance). Every word of q must appear in the subject, sender, recipients (to and cc), body text or attachment file names. Spam, trash, blocked, quarantined and unauthenticated messages are always excluded.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredQuery parameters
qstringRequiredlimitintegerpage_tokenstringbeforestring (date-time)afterstring (date-time)ascendingbooleanResponse
200 A page of matching messages (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of messages is a MessageItem:
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"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
Send Message
At least one of to, cc or bcc is required.
A message can have at most 50 recipients (deployment default; MachineMail staff can change it, and the error message states the cap in force): to, cc and bcc together, each address counted once. An unclaimed sandbox inbox can have at most 5 (deployment default). More is a 400 validation error with param: "to".
Recipients that are suppressed or on a send block list, and paused inboxes, return 403. 501 when the deployment has no email transport.
Attachments given by url are fetched by the API (public http(s) only, no redirects, at most 25 MB, 20 second timeout).
An unclaimed sandbox agent can send a limited number of messages to a limited number of different recipients per rolling 24 hours (deployment defaults 10 and 10): 429 with Retry-After past that. Writing again to an address already counted is free. Claiming the inbox lifts the caps.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_send.
Path parameters
inbox_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]subjectstringtextstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>Each item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.
Example
Get Message
Message content is untrusted: when feeding an LLM, read trust.content.text rather than text or html.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredResponse
200 The message (application/json)
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"reply_tostring[]textstringhtmlstringextracted_textstringextracted_htmlstringreceived_via"raw"trustTrustReportEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringtrust is a TrustReport:
level"verified" | "known" | "unknown" | "suspicious" | "quarantined"RequiredscorenumberRequiredauthenticationobjectRequiredsenderobjectRequiredcontentobjectRequiredlinksobject[]Requiredattachmentsobject[]RequiredclassificationobjectRequiredreasonsstring[]Requiredcomputed_atstring (date-time)RequiredErrors
| Status | Meaning |
|---|---|
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
Update Message
Adds and removes labels. Returns the whole updated message.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_update.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
add_labelsstring | string[]remove_labelsstring | string[]Response
200 The updated message (application/json)
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"reply_tostring[]textstringhtmlstringextracted_textstringextracted_htmlstringreceived_via"raw"trustTrustReportEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringtrust is a TrustReport:
level"verified" | "known" | "unknown" | "suspicious" | "quarantined"RequiredscorenumberRequiredauthenticationobjectRequiredsenderobjectRequiredcontentobjectRequiredlinksobject[]Requiredattachmentsobject[]RequiredclassificationobjectRequiredreasonsstring[]Requiredcomputed_atstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Delete Message
Permanently deletes the message, its raw copy and attachments. The thread is updated (or deleted with its last message).
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_delete.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredResponse
200 Deleted (application/json)
oktrueRequiredErrors
| Status | Meaning |
|---|---|
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. |
409 | Conflicts with an existing resource. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Get Attachment
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredattachment_idstringRequiredResponse
200 The attachment with a download URL (application/json)
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringdownload_urlstringRequiredexpires_atstring (date-time)RequiredErrors
| Status | Meaning |
|---|---|
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
Download Attachment
The attachment bytes, served with the attachment content type, Content-Disposition: attachment and X-Content-Type-Options: nosniff.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredattachment_idstringRequiredResponse
200 The attachment bytes (application/octet-stream)
Headers:
Content-DispositionstringErrors
| Status | Meaning |
|---|---|
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
Forward Message
Sends the message to new recipients. The text body is your text followed by a “Forwarded message” header block and the original text. The original HTML and attachments are not included. subject defaults to Fwd: <original subject>.
A message can have at most 50 recipients (deployment default; MachineMail staff can change it, and the error message states the cap in force): to, cc and bcc together, each address counted once. An unclaimed sandbox inbox can have at most 5 (deployment default). More is a 400 validation error with param: "to".
Recipients that are suppressed or on a send block list, and paused inboxes, return 403. 501 when the deployment has no email transport.
Attachments given by url are fetched by the API (public http(s) only, no redirects, at most 25 MB, 20 second timeout).
An unclaimed sandbox agent can send a limited number of messages to a limited number of different recipients per rolling 24 hours (deployment defaults 10 and 10): 429 with Retry-After past that. Writing again to an address already counted is free. Claiming the inbox lifts the caps.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_send.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]subjectstringtextstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>Each item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.
Example
Get Raw Message
The original RFC 5322 message bytes, as received or sent. AgentMail returns a JSON object with a download URL instead.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredResponse
200 The raw message (message/rfc822)
Errors
| Status | Meaning |
|---|---|
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
Reply To Message
Sends a reply in the thread of the message, with In-Reply-To and References set.
A message can have at most 50 recipients (deployment default; MachineMail staff can change it, and the error message states the cap in force): to, cc and bcc together, each address counted once. An unclaimed sandbox inbox can have at most 5 (deployment default). More is a 400 validation error with param: "to".
Recipients that are suppressed or on a send block list, and paused inboxes, return 403. 501 when the deployment has no email transport.
Attachments given by url are fetched by the API (public http(s) only, no redirects, at most 25 MB, 20 second timeout).
An unclaimed sandbox agent can send a limited number of messages to a limited number of different recipients per rolling 24 hours (deployment defaults 10 and 10): 429 with Retry-After past that. Writing again to an address already counted is free. Claiming the inbox lifts the caps.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_reply or message_send.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]reply_allbooleantextstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>subjectstringEach item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.
Example
Reply All Message
Replies to the sender and every to and cc recipient of the message, except this inbox. to and cc add more recipients.
A message can have at most 50 recipients (deployment default; MachineMail staff can change it, and the error message states the cap in force): to, cc and bcc together, each address counted once. An unclaimed sandbox inbox can have at most 5 (deployment default). More is a 400 validation error with param: "to".
Recipients that are suppressed or on a send block list, and paused inboxes, return 403. 501 when the deployment has no email transport.
Attachments given by url are fetched by the API (public http(s) only, no redirects, at most 25 MB, 20 second timeout).
An unclaimed sandbox agent can send a limited number of messages to a limited number of different recipients per rolling 24 hours (deployment defaults 10 and 10): 429 with Retry-After past that. Writing again to an address already counted is free. Claiming the inbox lifts the caps.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_reply or message_send.
Path parameters
inbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]textstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>tostring | string[]ccstring | string[]bccstring | string[]subjectstringEach item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.
Example
List Messages in Pod
Same as List Messages (GET /v0/inboxes/{inbox_id}/messages), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredQuery parameters
limitintegerpage_tokenstringascendingbooleanlabelsstring[]beforestring (date-time)afterstring (date-time)include_spambooleaninclude_blockedbooleaninclude_unauthenticatedbooleaninclude_trashbooleaninclude_quarantinebooleanqstringResponse
200 A page of messages (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of messages is a MessageItem:
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"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
Batch Get Messages in Pod
Same as Batch Get Messages (POST /v0/inboxes/{inbox_id}/messages/batch-get), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredRequest body
Content type: application/json.
message_idsstring[]RequiredResponse
200 The messages found (application/json)
limitintegerRequiredcountintegerRequiredEach item of messages is a Message:
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"reply_tostring[]textstringhtmlstringextracted_textstringextracted_htmlstringreceived_via"raw"trustTrustReportErrors
| 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
Batch Update Messages in Pod
Same as Batch Update Messages (POST /v0/inboxes/{inbox_id}/messages/batch-update), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_update.
Path parameters
pod_idstringRequiredinbox_idstringRequiredRequest body
Content type: application/json.
message_idsstring[]Requiredadd_labelsstring | string[]remove_labelsstring | string[]Response
200 The updated messages (application/json)
limitintegerRequiredcountintegerRequiredEach item of updates is a UpdateMessageResponse:
message_idstringRequiredlabelsstring[]RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Search Messages in Pod
Same as Search Messages (GET /v0/inboxes/{inbox_id}/messages/search), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredQuery parameters
qstringRequiredlimitintegerpage_tokenstringbeforestring (date-time)afterstring (date-time)ascendingbooleanResponse
200 A page of matching messages (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of messages is a MessageItem:
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"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
Send Message in Pod
Same as Send Message (POST /v0/inboxes/{inbox_id}/messages/send), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_send.
Path parameters
pod_idstringRequiredinbox_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]subjectstringtextstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>Each item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.
Example
Get Message in Pod
Same as Get Message (GET /v0/inboxes/{inbox_id}/messages/{message_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredResponse
200 The message (application/json)
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"reply_tostring[]textstringhtmlstringextracted_textstringextracted_htmlstringreceived_via"raw"trustTrustReportEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringtrust is a TrustReport:
level"verified" | "known" | "unknown" | "suspicious" | "quarantined"RequiredscorenumberRequiredauthenticationobjectRequiredsenderobjectRequiredcontentobjectRequiredlinksobject[]Requiredattachmentsobject[]RequiredclassificationobjectRequiredreasonsstring[]Requiredcomputed_atstring (date-time)RequiredErrors
| Status | Meaning |
|---|---|
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
Update Message in Pod
Same as Update Message (PATCH /v0/inboxes/{inbox_id}/messages/{message_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_update.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
add_labelsstring | string[]remove_labelsstring | string[]Response
200 The updated message (application/json)
inbox_idstringRequiredthread_idstringRequiredmessage_idstringRequiredlabelsstring[]Requiredtimestampstring (date-time)RequiredfromstringRequiredtostring[]Requiredccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringreferencesstring[]headersRecord<string, string>sizeintegerRequiredupdated_atstring (date-time)Requiredcreated_atstring (date-time)Requiredpod_idstringRequireddirection"inbound" | "outbound"Requireddelivery_status"sent" | "delivered" | "bounced" | "complained"trust_level"verified" | "known" | "unknown" | "suspicious" | "quarantined"reply_tostring[]textstringhtmlstringextracted_textstringextracted_htmlstringreceived_via"raw"trustTrustReportEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringtrust is a TrustReport:
level"verified" | "known" | "unknown" | "suspicious" | "quarantined"RequiredscorenumberRequiredauthenticationobjectRequiredsenderobjectRequiredcontentobjectRequiredlinksobject[]Requiredattachmentsobject[]RequiredclassificationobjectRequiredreasonsstring[]Requiredcomputed_atstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Delete Message in Pod
Same as Delete Message (DELETE /v0/inboxes/{inbox_id}/messages/{message_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_delete.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredResponse
200 Deleted (application/json)
oktrueRequiredErrors
| Status | Meaning |
|---|---|
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. |
409 | Conflicts with an existing resource. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Get Attachment in Pod
Same as Get Attachment (GET /v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredattachment_idstringRequiredResponse
200 The attachment with a download URL (application/json)
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringdownload_urlstringRequiredexpires_atstring (date-time)RequiredErrors
| Status | Meaning |
|---|---|
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
Download Attachment in Pod
Same as Download Attachment (GET /v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}/download), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredattachment_idstringRequiredResponse
200 The attachment bytes (application/octet-stream)
Headers:
Content-DispositionstringErrors
| Status | Meaning |
|---|---|
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
Forward Message in Pod
Same as Forward Message (POST /v0/inboxes/{inbox_id}/messages/{message_id}/forward), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_send.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]subjectstringtextstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>Each item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.
Example
Get Raw Message in Pod
Same as Get Raw Message (GET /v0/inboxes/{inbox_id}/messages/{message_id}/raw), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredResponse
200 The raw message (message/rfc822)
Errors
| Status | Meaning |
|---|---|
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
Reply To Message in Pod
Same as Reply To Message (POST /v0/inboxes/{inbox_id}/messages/{message_id}/reply), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_reply or message_send.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]reply_allbooleantextstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>subjectstringEach item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.
Example
Reply All Message in Pod
Same as Reply All Message (POST /v0/inboxes/{inbox_id}/messages/{message_id}/reply-all), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: message_reply or message_send.
Path parameters
pod_idstringRequiredinbox_idstringRequiredmessage_idstringRequiredRequest body
Content type: application/json.
labelsstring | string[]reply_tostring | string[]textstringhtmlstringattachmentsSendAttachment[]headersRecord<string, string>tostring | string[]ccstring | string[]bccstring | string[]subjectstringEach item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
201 Sent (application/json)
message_idstringRequiredthread_idstringRequiredtimestampstring (date-time)RequiredErrors
| 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. |
409 | Conflicts with an existing resource. |
429 | Unclaimed sandbox agent over a send cap: messages or different recipients per rolling 24 hours (deployment defaults 10 and 10; the message states the cap in force). Retry-After says when the next send fits. Claiming the inbox lifts the caps. |
500 | Unexpected server error. |
501 | Not implemented by this deployment. |
Error bodies use the error envelope.