Drafts
Drafts (unsent messages a person can send or delete) and scheduled sends (send_at).
| Method | Path | Summary |
|---|---|---|
GET | /v0/drafts | List Drafts |
GET | /v0/drafts/{draft_id} | Get Draft |
GET | /v0/inboxes/{inbox_id}/drafts | List Drafts |
POST | /v0/inboxes/{inbox_id}/drafts | Create Draft |
GET | /v0/inboxes/{inbox_id}/drafts/{draft_id} | Get Draft |
PATCH | /v0/inboxes/{inbox_id}/drafts/{draft_id} | Update Draft |
DELETE | /v0/inboxes/{inbox_id}/drafts/{draft_id} | Delete Draft |
POST | /v0/inboxes/{inbox_id}/drafts/{draft_id}/send | Send Draft |
GET | /v0/pods/{pod_id}/drafts | List Drafts in Pod |
GET | /v0/pods/{pod_id}/drafts/{draft_id} | Get Draft in Pod |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/drafts | List Drafts in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/drafts | Create Draft in Pod |
GET | /v0/pods/{pod_id}/inboxes/{inbox_id}/drafts/{draft_id} | Get Draft in Pod |
PATCH | /v0/pods/{pod_id}/inboxes/{inbox_id}/drafts/{draft_id} | Update Draft in Pod |
DELETE | /v0/pods/{pod_id}/inboxes/{inbox_id}/drafts/{draft_id} | Delete Draft in Pod |
POST | /v0/pods/{pod_id}/inboxes/{inbox_id}/drafts/{draft_id}/send | Send Draft in Pod |
List Drafts
Drafts of every inbox in scope, newest first. The labels filter is not supported.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Query parameters
limitintegerpage_tokenstringbeforestring (date-time)afterstring (date-time)ascendingbooleanResponse
200 A page of drafts (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of drafts is a DraftItem:
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredErrors
| 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). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Get Draft
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Path parameters
draft_idstringRequiredResponse
200 The draft (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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
List Drafts
Drafts of the inbox, newest first. The labels filter is not supported.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Path parameters
inbox_idstringRequiredQuery parameters
limitintegerpage_tokenstringbeforestring (date-time)afterstring (date-time)ascendingbooleanResponse
200 A page of drafts (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of drafts is a DraftItem:
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredErrors
| 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
Create Draft
With send_at the draft is scheduled: a background worker sends it at that time (send_status: scheduled). A scheduled send that fails sets send_status: failed and is not retried.
Reply drafts: set in_reply_to to a message ID in this inbox; recipients are not filled in for you. Forward drafts (forward_of) and reply_all are not supported.
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". The cap is checked when the draft is created or updated, and again when it is sent: a scheduled draft over the cap at send time gets send_status: failed.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_create.
Path parameters
inbox_idstringRequiredRequest body
Content type: application/json.
labelsstring[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]subjectstringtextstringhtmlstringattachmentsSendAttachment[]in_reply_tostringsend_atstring (date-time) | nullclient_idstringEach item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
200 A draft with this client_id already exists; it is returned unchanged. (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstring201 Created (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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
Get Draft
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Path parameters
inbox_idstringRequireddraft_idstringRequiredResponse
200 The draft (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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 Draft
Fields you omit are unchanged; null clears a field. in_reply_to cannot be changed.
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".
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_update.
Path parameters
inbox_idstringRequireddraft_idstringRequiredRequest body
Content type: application/json.
reply_tostring | string[] | nulltostring | string[] | nullccstring | string[] | nullbccstring | string[] | nullsubjectstring | nulltextstring | nullhtmlstring | nulladd_attachmentsSendAttachment[]remove_attachmentsstring[]add_labelsstring[]remove_labelsstring[]send_atstring (date-time) | nullEach item of add_attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
200 The updated draft (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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
Delete Draft
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_delete.
Path parameters
inbox_idstringRequireddraft_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. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Send Draft
Sends the draft now and deletes it; a draft.sent and a message.sent event are emitted. The sent message gets the draft labels plus add_labels, minus remove_labels.
Suppressed recipients and recipients on a send block list return 403, a paused inbox 403. A draft already being sent returns 409; 501 when the deployment has no email transport.
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".
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.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_send.
Path parameters
inbox_idstringRequireddraft_idstringRequiredRequest body
Content type: application/json.
add_labelsstring | string[]remove_labelsstring | string[]Response
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 Drafts in Pod
Same as List Drafts (GET /v0/drafts), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Path parameters
pod_idstringRequiredQuery parameters
limitintegerpage_tokenstringbeforestring (date-time)afterstring (date-time)ascendingbooleanResponse
200 A page of drafts (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of drafts is a DraftItem:
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredErrors
| 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
Get Draft in Pod
Same as Get Draft (GET /v0/drafts/{draft_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Path parameters
pod_idstringRequireddraft_idstringRequiredResponse
200 The draft (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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
List Drafts in Pod
Same as List Drafts (GET /v0/inboxes/{inbox_id}/drafts), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Path parameters
pod_idstringRequiredinbox_idstringRequiredQuery parameters
limitintegerpage_tokenstringbeforestring (date-time)afterstring (date-time)ascendingbooleanResponse
200 A page of drafts (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of drafts is a DraftItem:
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredErrors
| 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
Create Draft in Pod
Same as Create Draft (POST /v0/inboxes/{inbox_id}/drafts), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_create.
Path parameters
pod_idstringRequiredinbox_idstringRequiredRequest body
Content type: application/json.
labelsstring[]reply_tostring | string[]tostring | string[]ccstring | string[]bccstring | string[]subjectstringtextstringhtmlstringattachmentsSendAttachment[]in_reply_tostringsend_atstring (date-time) | nullclient_idstringEach item of attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
200 A draft with this client_id already exists; it is returned unchanged. (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstring201 Created (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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
Get Draft in Pod
Same as Get Draft (GET /v0/inboxes/{inbox_id}/drafts/{draft_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_read.
Path parameters
pod_idstringRequiredinbox_idstringRequireddraft_idstringRequiredResponse
200 The draft (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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 Draft in Pod
Same as Update Draft (PATCH /v0/inboxes/{inbox_id}/drafts/{draft_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_update.
Path parameters
pod_idstringRequiredinbox_idstringRequireddraft_idstringRequiredRequest body
Content type: application/json.
reply_tostring | string[] | nulltostring | string[] | nullccstring | string[] | nullbccstring | string[] | nullsubjectstring | nulltextstring | nullhtmlstring | nulladd_attachmentsSendAttachment[]remove_attachmentsstring[]add_labelsstring[]remove_labelsstring[]send_atstring (date-time) | nullEach item of add_attachments is a SendAttachment:
filenamestringcontent_typestringcontent_disposition"inline" | "attachment"content_idstringcontentstringurlstringResponse
200 The updated draft (application/json)
inbox_idstringRequireddraft_idstringRequiredlabelsstring[]Requiredtostring[]ccstring[]bccstring[]subjectstringpreviewstringattachmentsAttachment[]in_reply_tostringsend_status"scheduled" | "sending" | "failed"send_atstring (date-time)updated_atstring (date-time)Requiredclient_idstringreply_tostring[]textstringhtmlstringreferencesstring[]created_atstring (date-time)Requiredpod_idstringRequiredEach item of attachments is a Attachment:
attachment_idstringRequiredfilenamestringsizeintegerRequiredcontent_typestringcontent_dispositionstringcontent_idstringErrors
| 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
Delete Draft in Pod
Same as Delete Draft (DELETE /v0/inboxes/{inbox_id}/drafts/{draft_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_delete.
Path parameters
pod_idstringRequiredinbox_idstringRequireddraft_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. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Send Draft in Pod
Same as Send Draft (POST /v0/inboxes/{inbox_id}/drafts/{draft_id}/send), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: draft_send.
Path parameters
pod_idstringRequiredinbox_idstringRequireddraft_idstringRequiredRequest body
Content type: application/json.
add_labelsstring | string[]remove_labelsstring | string[]Response
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.