Trusted Domains
Domains and addresses the organization, a pod or an inbox trusts: mail they genuinely sign is never quarantined or withheld from agents. Preview an entry first.
| Method | Path | Summary |
|---|---|---|
GET | /v0/inboxes/{inbox_id}/trusted-domains | List Trusted Domains in Inbox |
POST | /v0/inboxes/{inbox_id}/trusted-domains | Create Trusted Domain in Inbox |
POST | /v0/inboxes/{inbox_id}/trusted-domains/preview | Preview Trusted Domain in Inbox |
GET | /v0/inboxes/{inbox_id}/trusted-domains/{trusted_domain_id} | Get Trusted Domain in Inbox |
PATCH | /v0/inboxes/{inbox_id}/trusted-domains/{trusted_domain_id} | Update Trusted Domain in Inbox |
DELETE | /v0/inboxes/{inbox_id}/trusted-domains/{trusted_domain_id} | Delete Trusted Domain in Inbox |
GET | /v0/pods/{pod_id}/trusted-domains | List Trusted Domains in Pod |
POST | /v0/pods/{pod_id}/trusted-domains | Create Trusted Domain in Pod |
POST | /v0/pods/{pod_id}/trusted-domains/preview | Preview Trusted Domain in Pod |
GET | /v0/pods/{pod_id}/trusted-domains/{trusted_domain_id} | Get Trusted Domain in Pod |
PATCH | /v0/pods/{pod_id}/trusted-domains/{trusted_domain_id} | Update Trusted Domain in Pod |
DELETE | /v0/pods/{pod_id}/trusted-domains/{trusted_domain_id} | Delete Trusted Domain in Pod |
GET | /v0/trusted-domains | List Trusted Domains |
POST | /v0/trusted-domains | Create Trusted Domain |
POST | /v0/trusted-domains/preview | Preview Trusted Domain |
GET | /v0/trusted-domains/{trusted_domain_id} | Get Trusted Domain |
PATCH | /v0/trusted-domains/{trusted_domain_id} | Update Trusted Domain |
DELETE | /v0/trusted-domains/{trusted_domain_id} | Delete Trusted Domain |
List Trusted Domains in Inbox
Same as List Trusted Domains (GET /v0/trusted-domains), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Path parameters
inbox_idstringRequiredQuery parameters
limitintegerpage_tokenstringascendingbooleanResponse
200 A page of trusted domains (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of trusted_domains is a TrustedDomain:
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_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. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Create Trusted Domain in Inbox
Same as Create Trusted Domain (POST /v0/trusted-domains), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_create.
Path parameters
inbox_idstringRequiredRequest body
Content type: application/json.
domainstringRequiredinclude_subdomainsbooleanreasonstringexpires_atstring (date-time)confirmbooleanclient_idstringResponse
200 The existing entry for this domain or client_id (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequired201 Created (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
402 | The organization already has as many trusted domains as its plan allows (limit_key: “trusted_domains”): 10 on Free, 500 on paid plans, none for unclaimed sandbox agents. Remove one first. |
403 | The credential lacks trusted_domain_create, or is not an organization API key or a dashboard session. Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain. |
404 | Not found. Also returned for resources outside the credential scope. |
409 | client_id is already used at another level. |
422 | trusted_domain_not_allowed (with error.reason) or confirmation_required (resend with confirm: true). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Preview Trusted Domain in Inbox
Same as Preview Trusted Domain (POST /v0/trusted-domains/preview), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Path parameters
inbox_idstringRequiredRequest body
Content type: application/json.
domainstringRequiredinclude_subdomainsbooleanResponse
200 The preview (application/json)
domainstring | nullRequireddomain_unicodestring | nullRequiredentry_typeobjectRequiredallowedbooleanRequiredrefusal("free_mail" | "privacy_relay" | "shared_platform" | "public_suffix" | "disposable" | "invalid" | "confusable_idn" | null) | nullRequiredmessagestring | nullRequiredconfirmation_requiredbooleanRequiredwould_releaseobject | nullRequiredsuggestionsstring[] | nullRequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| 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 Trusted Domain in Inbox
Same as Get Trusted Domain (GET /v0/trusted-domains/{trusted_domain_id}), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Path parameters
inbox_idstringRequiredtrusted_domain_idstringRequiredResponse
200 The entry (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_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 Trusted Domain in Inbox
Same as Update Trusted Domain (PATCH /v0/trusted-domains/{trusted_domain_id}), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_update.
Path parameters
inbox_idstringRequiredtrusted_domain_idstringRequiredRequest body
Content type: application/json.
include_subdomainsbooleanconfirmbooleanreasonstring | nullexpires_atstring (date-time) | nullResponse
200 The updated entry (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| 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 trusted_domain_update, or is not an organization API key or a dashboard session. Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain. |
404 | Not found. Also returned for resources outside the credential scope. |
422 | Turning on include_subdomains: trusted_domain_not_allowed (with error.reason) or confirmation_required (resend with confirm: true). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Delete Trusted Domain in Inbox
Same as Delete Trusted Domain (DELETE /v0/trusted-domains/{trusted_domain_id}), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_delete.
Path parameters
inbox_idstringRequiredtrusted_domain_idstringRequiredResponse
204 Deleted
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
List Trusted Domains in Pod
Same as List Trusted Domains (GET /v0/trusted-domains), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Path parameters
pod_idstringRequiredQuery parameters
limitintegerpage_tokenstringascendingbooleanResponse
200 A page of trusted domains (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of trusted_domains is a TrustedDomain:
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_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. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Create Trusted Domain in Pod
Same as Create Trusted Domain (POST /v0/trusted-domains), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_create.
Path parameters
pod_idstringRequiredRequest body
Content type: application/json.
domainstringRequiredinclude_subdomainsbooleanreasonstringexpires_atstring (date-time)confirmbooleanclient_idstringResponse
200 The existing entry for this domain or client_id (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequired201 Created (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
402 | The organization already has as many trusted domains as its plan allows (limit_key: “trusted_domains”): 10 on Free, 500 on paid plans, none for unclaimed sandbox agents. Remove one first. |
403 | The credential lacks trusted_domain_create, or is not an organization API key or a dashboard session. Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain. |
404 | Not found. Also returned for resources outside the credential scope. |
409 | client_id is already used at another level. |
422 | trusted_domain_not_allowed (with error.reason) or confirmation_required (resend with confirm: true). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Preview Trusted Domain in Pod
Same as Preview Trusted Domain (POST /v0/trusted-domains/preview), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Path parameters
pod_idstringRequiredRequest body
Content type: application/json.
domainstringRequiredinclude_subdomainsbooleanResponse
200 The preview (application/json)
domainstring | nullRequireddomain_unicodestring | nullRequiredentry_typeobjectRequiredallowedbooleanRequiredrefusal("free_mail" | "privacy_relay" | "shared_platform" | "public_suffix" | "disposable" | "invalid" | "confusable_idn" | null) | nullRequiredmessagestring | nullRequiredconfirmation_requiredbooleanRequiredwould_releaseobject | nullRequiredsuggestionsstring[] | nullRequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| 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 Trusted Domain in Pod
Same as Get Trusted Domain (GET /v0/trusted-domains/{trusted_domain_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Path parameters
pod_idstringRequiredtrusted_domain_idstringRequiredResponse
200 The entry (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_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 Trusted Domain in Pod
Same as Update Trusted Domain (PATCH /v0/trusted-domains/{trusted_domain_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_update.
Path parameters
pod_idstringRequiredtrusted_domain_idstringRequiredRequest body
Content type: application/json.
include_subdomainsbooleanconfirmbooleanreasonstring | nullexpires_atstring (date-time) | nullResponse
200 The updated entry (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| 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 trusted_domain_update, or is not an organization API key or a dashboard session. Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain. |
404 | Not found. Also returned for resources outside the credential scope. |
422 | Turning on include_subdomains: trusted_domain_not_allowed (with error.reason) or confirmation_required (resend with confirm: true). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Delete Trusted Domain in Pod
Same as Delete Trusted Domain (DELETE /v0/trusted-domains/{trusted_domain_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_delete.
Path parameters
pod_idstringRequiredtrusted_domain_idstringRequiredResponse
204 Deleted
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
List Trusted Domains
Entries stored at exactly this level: /v0/trusted-domains lists the organization entries, /v0/pods/{pod_id}/trusted-domains a pod’s, /v0/inboxes/{inbox_id}/trusted-domains an inbox’s. Mail to an inbox is judged against all three.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Query parameters
limitintegerpage_tokenstringascendingbooleanResponse
200 A page of trusted domains (application/json)
countintegerRequiredlimitintegernext_page_tokenstringEach item of trusted_domains is a TrustedDomain:
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_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). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Create Trusted Domain
Trust a domain (example.com) or one address (invoices@example.com) at this level. Domains are stored in ASCII (punycode) form; responses carry both forms. Adding an entry that exists at this level (the same domain, or the same client_id) returns it unchanged with 200.
Trust takes effect only on mail that carries a DKIM signature of the trusted domain itself (d= equal to the domain, or a subdomain with include_subdomains); a block entry always wins over trust, and an allow-only scope still blocks every sender it does not allow.
Conflicts with block entries and allow-only scopes do not refuse the entry: they are returned as warnings.
Refused with 422: trusted_domain_not_allowed for names anyone can get mail from (error.reason: free_mail, privacy_relay, shared_platform, public_suffix, disposable, invalid, confusable_idn); confirmation_required for platforms where anyone can write the content (github.com, google.com, slack.com and similar, or one under the domain with include_subdomains) and for one address on a group or marketplace relay (team@googlegroups.com), until you resend with confirm: true. An address on a free mail provider (someone@gmail.com) can be trusted.
Refused with 402 plan_limit_exceeded (limit_key: "trusted_domains") past the organization’s limit: 10 on Free, 500 on paid plans, none for unclaimed sandbox agents. Entries at every level count.
Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_create.
Request body
Content type: application/json.
domainstringRequiredinclude_subdomainsbooleanreasonstringexpires_atstring (date-time)confirmbooleanclient_idstringResponse
200 The existing entry for this domain or client_id (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequired201 Created (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
402 | The organization already has as many trusted domains as its plan allows (limit_key: “trusted_domains”): 10 on Free, 500 on paid plans, none for unclaimed sandbox agents. Remove one first. |
403 | The credential lacks trusted_domain_create, or is not an organization API key or a dashboard session. Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain. |
409 | client_id is already used at another level. |
422 | trusted_domain_not_allowed (with error.reason) or confirmation_required (resend with confirm: true). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Preview Trusted Domain
What creating this entry at this level would do, without saving anything: whether it is allowed (and if not, why), whether it needs confirm: true, and its warnings. For validating as someone types. would_release and suggestions are not computed yet and are always null.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Request body
Content type: application/json.
domainstringRequiredinclude_subdomainsbooleanResponse
200 The preview (application/json)
domainstring | nullRequireddomain_unicodestring | nullRequiredentry_typeobjectRequiredallowedbooleanRequiredrefusal("free_mail" | "privacy_relay" | "shared_platform" | "public_suffix" | "disposable" | "invalid" | "confusable_idn" | null) | nullRequiredmessagestring | nullRequiredconfirmation_requiredbooleanRequiredwould_releaseobject | nullRequiredsuggestionsstring[] | nullRequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| 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 Trusted Domain
An entry stored at this level (404 for entries at another level).
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_read.
Path parameters
trusted_domain_idstringRequiredResponse
200 The entry (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_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 Trusted Domain
Change include_subdomains, reason or expires_at. The domain and level are fixed: delete and create to change them. Turning on include_subdomains is checked like a create with it: refused (422 trusted_domain_not_allowed) when a privacy relay or MachineMail shared domain lies under the domain, and 422 confirmation_required until you send confirm: true when a platform where anyone can write the content does. Returns the entry with its current warnings. Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_update.
Path parameters
trusted_domain_idstringRequiredRequest body
Content type: application/json.
include_subdomainsbooleanconfirmbooleanreasonstring | nullexpires_atstring (date-time) | nullResponse
200 The updated entry (application/json)
trusted_domain_idstringRequiredentry_type"domain" | "email"RequireddomainstringRequireddomain_unicodestringRequiredinclude_subdomainsbooleanRequiredscope"org" | "pod" | "inbox"Requiredpod_idstring | nullRequiredinbox_idstring | nullRequiredreasonstring | nullRequiredexpires_atstring (date-time) | nullRequiredcreated_byobject | nullRequiredmatch_countintegerRequiredlast_matched_atstring (date-time) | nullRequiredcreated_atstring (date-time)Requiredupdated_atstring (date-time)RequiredEach item of warnings is a Warning:
code"shadowed_by_block" | "shadowed_by_allow_only"Requiredscope"org" | "pod" | "inbox"Requiredpod_idstringinbox_idstringentryobjectmessagestringRequiredErrors
| 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 trusted_domain_update, or is not an organization API key or a dashboard session. Only an organization API key or a dashboard session can add or change an entry: pod and inbox keys, OAuth apps and agent access tokens get 403, whatever their permissions, so an agent cannot be talked into trusting a domain. |
404 | Not found. Also returned for resources outside the credential scope. |
422 | Turning on include_subdomains: trusted_domain_not_allowed (with error.reason) or confirmation_required (resend with confirm: true). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Delete Trusted Domain
Mail from the domain is judged normally again from now on. Any credential with trusted_domain_delete that can see the entry may remove it.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: trusted_domain_delete.
Path parameters
trusted_domain_idstringRequiredResponse
204 Deleted
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.