Inbound
Raw message injection and the inbound webhooks of the mail providers.
| Method | Path | Summary |
|---|---|---|
POST | /inbound/raw | Inject Raw Message |
POST | /inbound/resend | Resend Webhook |
POST | /inbound/ses | SES Notification (SNS) |
Inject Raw Message
Stores a raw RFC 5322 message (the request body, any Content-Type, at most 40 MB) as if it had been received, once per recipient inbox in the credential’s scope. The recipient is X-Recipient, otherwise every To and Cc address.
Injected messages are marked received_via: "raw". Their trust report never believes the authentication results they carry (headers and provider verdicts are ignored): authentication is none, so the trust level is at most unknown.
An unrestricted key (*) does not imply inbound_raw; it must be granted by name.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie.
Headers
X-RecipientstringRequest body
Content type: message/rfc822. Required.
Type: string (binary)
Response
201 Stored (application/json)
countintegerRequirederrorsobject[]Each 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
Resend Webhook
Called by Resend, not by API clients. The body is a Resend webhook event signed with Svix (svix-id, svix-timestamp, svix-signature, verified against RESEND_WEBHOOK_SECRET, 5 minute tolerance).
email.received fetches the raw message from Resend and stores it for each to address; email.delivered, email.bounced and email.complained record delivery feedback; email.sent (and the feedback events) record the Message-ID the message went out with, which Amazon SES assigns, so replies thread; other types are acknowledged and ignored.
Without RESEND_WEBHOOK_SECRET the answer is 501 with the API error envelope.
Authentication: None.
Request body
Content type: application/json. Required.
Type: object
Response
200 Processed (application/json)
processedintegerRequirederrorsstring[]Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
500 | Unexpected server error. |
501 | email.received while RESEND_API_KEY is not configured (nothing stored). |
Example
SES Notification (SNS)
Called by Amazon SNS, not by API clients: SES receipt notifications and subscription confirmations. The SNS signature is verified, and the topic must match the configured one when set. Also served at SES_ENDPOINT when that is a different path. Answers are plain text.
Authentication: None.
Request body
Content type: text/plain. Required.
Type: string
Response
200 OK or Subscription confirmed (text/plain)
Errors
| Status | Meaning |
|---|---|
400 | Not a valid SNS message, or a bad SubscribeURL |
403 | Invalid signature or Unexpected topic |
500 | Processing failed |