API Keys
Organization, pod and inbox scoped keys.
| Method | Path | Summary |
|---|---|---|
GET | /v0/api-keys | List API Keys |
POST | /v0/api-keys | Create API Key |
GET | /v0/api-keys/{api_key_id} | Get API Key |
PATCH | /v0/api-keys/{api_key_id} | Update API Key |
DELETE | /v0/api-keys/{api_key_id} | Delete API Key |
GET | /v0/inboxes/{inbox_id}/api-keys | List API Keys in Inbox |
POST | /v0/inboxes/{inbox_id}/api-keys | Create API Key in Inbox |
GET | /v0/inboxes/{inbox_id}/api-keys/{api_key_id} | Get API Key in Inbox |
PATCH | /v0/inboxes/{inbox_id}/api-keys/{api_key_id} | Update API Key in Inbox |
DELETE | /v0/inboxes/{inbox_id}/api-keys/{api_key_id} | Delete API Key in Inbox |
GET | /v0/pods/{pod_id}/api-keys | List API Keys in Pod |
POST | /v0/pods/{pod_id}/api-keys | Create API Key in Pod |
GET | /v0/pods/{pod_id}/api-keys/{api_key_id} | Get API Key in Pod |
PATCH | /v0/pods/{pod_id}/api-keys/{api_key_id} | Update API Key in Pod |
DELETE | /v0/pods/{pod_id}/api-keys/{api_key_id} | Delete API Key in Pod |
List API Keys
Keys that are not revoked. Under /v0/pods/{pod_id} or /v0/inboxes/{inbox_id}, only the keys scoped to that pod or inbox; a pod or inbox credential sees only keys in its own scope.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_read.
Query parameters
type"bearer" | "public_key"limitintegerpage_tokenstringascendingbooleanResponse
200 A page of keys (application/json)
countintegerRequiredlimitintegerRequirednext_page_tokenstringEach item of api_keys is a BearerApiKey:
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_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 API Key
The route sets the scope of the new key: POST /v0/api-keys makes an organization key, POST /v0/pods/{pod_id}/api-keys a pod key, POST /v0/inboxes/{inbox_id}/api-keys an inbox key.
Only organization-scoped credentials (and dashboard sessions) can create keys, and only with permissions they have themselves (403). api_key is returned once.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_create.
Request body
Content type: application/json.
The route sets the scope: /v0/api-keys makes an organization key, /v0/pods/{pod_id}/api-keys a pod key, /v0/inboxes/{inbox_id}/api-keys an inbox key.
namestringpermissionsobject | nullexpires_atstring (date-time) | nullResponse
201 Created. api_key is shown once. (application/json)
api_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)api_keystringRequiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key
Also returns revoked keys (with revoked_at).
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_read.
Path parameters
api_key_idstringRequiredResponse
200 The key (application/json)
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_atstring (date-time)Requiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key
Rename a key or replace its permissions. Only organization-scoped credentials (and dashboard sessions) can update keys, and cannot grant permissions they lack (403).
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_update.
Path parameters
api_key_idstringRequiredRequest body
Content type: application/json.
Fields you omit are unchanged. permissions replaces the permission object in full. Scope and expiry cannot be changed.
namestringpermissionsobjectResponse
200 The updated key (application/json)
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_atstring (date-time)Requiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key
Revokes the key: it stops working immediately. The record is kept (with revoked_at) and no longer listed.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_delete.
Path parameters
api_key_idstringRequiredResponse
200 Revoked (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
List API Keys in Inbox
Same as List API Keys (GET /v0/api-keys), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_read.
Path parameters
inbox_idstringRequiredQuery parameters
type"bearer" | "public_key"limitintegerpage_tokenstringascendingbooleanResponse
200 A page of keys (application/json)
countintegerRequiredlimitintegerRequirednext_page_tokenstringEach item of api_keys is a BearerApiKey:
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_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 API Key in Inbox
Same as Create API Key (POST /v0/api-keys), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_create.
Path parameters
inbox_idstringRequiredRequest body
Content type: application/json.
The route sets the scope: /v0/api-keys makes an organization key, /v0/pods/{pod_id}/api-keys a pod key, /v0/inboxes/{inbox_id}/api-keys an inbox key.
namestringpermissionsobject | nullexpires_atstring (date-time) | nullResponse
201 Created. api_key is shown once. (application/json)
api_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)api_keystringRequiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key in Inbox
Same as Get API Key (GET /v0/api-keys/{api_key_id}), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_read.
Path parameters
inbox_idstringRequiredapi_key_idstringRequiredResponse
200 The key (application/json)
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_atstring (date-time)Requiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key in Inbox
Same as Update API Key (PATCH /v0/api-keys/{api_key_id}), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_update.
Path parameters
inbox_idstringRequiredapi_key_idstringRequiredRequest body
Content type: application/json.
Fields you omit are unchanged. permissions replaces the permission object in full. Scope and expiry cannot be changed.
namestringpermissionsobjectResponse
200 The updated key (application/json)
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_atstring (date-time)Requiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key in Inbox
Same as Delete API Key (DELETE /v0/api-keys/{api_key_id}), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_delete.
Path parameters
inbox_idstringRequiredapi_key_idstringRequiredResponse
200 Revoked (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
List API Keys in Pod
Same as List API Keys (GET /v0/api-keys), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_read.
Path parameters
pod_idstringRequiredQuery parameters
type"bearer" | "public_key"limitintegerpage_tokenstringascendingbooleanResponse
200 A page of keys (application/json)
countintegerRequiredlimitintegerRequirednext_page_tokenstringEach item of api_keys is a BearerApiKey:
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_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 API Key in Pod
Same as Create API Key (POST /v0/api-keys), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_create.
Path parameters
pod_idstringRequiredRequest body
Content type: application/json.
The route sets the scope: /v0/api-keys makes an organization key, /v0/pods/{pod_id}/api-keys a pod key, /v0/inboxes/{inbox_id}/api-keys an inbox key.
namestringpermissionsobject | nullexpires_atstring (date-time) | nullResponse
201 Created. api_key is shown once. (application/json)
api_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)api_keystringRequiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key in Pod
Same as Get API Key (GET /v0/api-keys/{api_key_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_read.
Path parameters
pod_idstringRequiredapi_key_idstringRequiredResponse
200 The key (application/json)
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_atstring (date-time)Requiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key in Pod
Same as Update API Key (PATCH /v0/api-keys/{api_key_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_update.
Path parameters
pod_idstringRequiredapi_key_idstringRequiredRequest body
Content type: application/json.
Fields you omit are unchanged. permissions replaces the permission object in full. Scope and expiry cannot be changed.
namestringpermissionsobjectResponse
200 The updated key (application/json)
type"bearer"Requiredapi_key_idstringRequiredprefixstringRequirednamestringRequiredpod_idstringinbox_idstringpermissionsApiKeyPermissionscreated_atstring (date-time)Requiredexpires_atstring (date-time)organization_idstringRequiredused_atstring (date-time)revoked_atstring (date-time)updated_atstring (date-time)Requiredpermissions is a ApiKeyPermissions:
*booleaninbox_readbooleaninbox_createbooleaninbox_updatebooleaninbox_deletebooleanthread_readbooleanthread_deletebooleanmessage_readbooleanmessage_replybooleanmessage_sendbooleanmessage_updatebooleanmessage_deletebooleanlabel_spam_readbooleanlabel_blocked_readbooleanlabel_unauthenticated_readbooleanlabel_trash_readbooleandraft_readbooleandraft_createbooleandraft_updatebooleandraft_deletebooleandraft_sendbooleanwebhook_readbooleanwebhook_createbooleanwebhook_updatebooleanwebhook_deletebooleandomain_readbooleandomain_createbooleandomain_updatebooleandomain_deletebooleanlist_entry_readbooleanlist_entry_createbooleanlist_entry_deletebooleanmetrics_readbooleanapi_key_readbooleanapi_key_createbooleanapi_key_updatebooleanapi_key_deletebooleanpod_readbooleanpod_createbooleanpod_updatebooleanpod_deletebooleaninbound_rawbooleanErrors
| 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 API Key in Pod
Same as Delete API Key (DELETE /v0/api-keys/{api_key_id}), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: api_key_delete.
Path parameters
pod_idstringRequiredapi_key_idstringRequiredResponse
200 Revoked (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.