API reference
Mailboxes, forwarders, autoresponders, filters, routing, spam, deliverability; the mail server and its queue.
List mailboxes
GET/api/v1/accounts/{id}/email/accounts
Parameters
| Name | In |
|---|---|
id | path |
refresh | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreMailAccount - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Create a mailbox
POST/api/v1/accounts/{id}/email/accounts
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
domain_id | string |
local_part | string |
password | string |
quota_mb | integer |
Responses
- 201 Created
Body
Field Type account_idalwaysstring addressalwaysstring autoresponderalwaysboolean created_atalwaysinteger domainalwaysstring domain_idalwaysstring filters_countalwaysinteger idalwaysstring is_systemalwaysboolean local_partalwaysstring login_statealwaysstring quota_mbinteger receive_statealwaysstring send_statealwaysstring used_bytesalwaysinteger used_updated_atinteger - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: limit-reached, validation
- 500 Internal Server Error: internal
Delete a mailbox
DELETE/api/v1/accounts/{id}/email/accounts/{mid}
Parameters
| Name | In |
|---|---|
id | path |
mid | path |
keep_data | query |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: system-mailbox
- 500 Internal Server Error: internal
Change a mailbox's quota and restrictions
PUT/api/v1/accounts/{id}/email/accounts/{mid}
Changes quota and restrictions (suspend login / receiving / sending).
Parameters
| Name | In |
|---|---|
id | path |
mid | path |
Request body
| Field | Type |
|---|---|
login_state | string |
quota_mb | integer |
receive_state | string |
send_state | string |
unlimited | boolean |
Responses
- 200 OK
Body
Field Type account_idalwaysstring addressalwaysstring autoresponderalwaysboolean created_atalwaysinteger domainalwaysstring domain_idalwaysstring filters_countalwaysinteger idalwaysstring is_systemalwaysboolean local_partalwaysstring login_statealwaysstring quota_mbinteger receive_statealwaysstring send_statealwaysstring used_bytesalwaysinteger used_updated_atinteger - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Mail client settings of a mailbox
GET/api/v1/accounts/{id}/email/accounts/{mid}/client-settings
Parameters
| Name | In |
|---|---|
id | path |
mid | path |
Responses
- 200 OK
Body
Field Type addressalwaysstring autoconfig_urlalwaysstring autodiscover_urlalwaysstring plainalwaysobject Field Type imapalwaysServerEndpoint pop3alwaysServerEndpoint smtpalwaysServerEndpoint securealwaysobject Field Type imapalwaysServerEndpoint pop3alwaysServerEndpoint smtpalwaysServerEndpoint usernamealwaysstring webmail_urlalwaysstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Download the Apple mail profile
GET/api/v1/accounts/{id}/email/accounts/{mid}/mobileconfig
Parameters
| Name | In |
|---|---|
id | path |
mid | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Change a mailbox's password
PUT/api/v1/accounts/{id}/email/accounts/{mid}/password
Parameters
| Name | In |
|---|---|
id | path |
mid | path |
Request body
| Field | Type |
|---|---|
password | string |
Responses
- 204 Done, no content
- 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Open the webmail signed in
POST/api/v1/accounts/{id}/email/accounts/{mid}/webmail
Creates a direct sign-in link to the webmail (single use, 60 s).
Parameters
| Name | In |
|---|---|
id | path |
mid | path |
Responses
- 200 OK
Body
Field Type expires_instring urlstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: login-suspended
- 500 Internal Server Error: internal
List autoresponders
GET/api/v1/accounts/{id}/email/autoresponders
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Create an autoresponder
POST/api/v1/accounts/{id}/email/autoresponders
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Delete an autoresponder
DELETE/api/v1/accounts/{id}/email/autoresponders/{aid}
Parameters
| Name | In |
|---|---|
id | path |
aid | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Update an autoresponder
PUT/api/v1/accounts/{id}/email/autoresponders/{aid}
Parameters
| Name | In |
|---|---|
id | path |
aid | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
List default addresses (catch-all)
GET/api/v1/accounts/{id}/email/default-addresses
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type itemsarray of DefaultAddressView - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Set a domain's default address
PUT/api/v1/accounts/{id}/email/default-addresses/{did}
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Request body
| Field | Type |
|---|---|
action | string |
destination | string |
fail_message | string |
Responses
- 200 OK
Body
Field Type actionalwaysstring configuredalwaysboolean destinationstring domainalwaysstring domain_idalwaysstring fail_messagestring - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 422 Unprocessable Entity: rejected
- 500 Internal Server Error: internal
Email deliverability of every domain
GET/api/v1/accounts/{id}/email/deliverability
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type itemsarray of HostingDeliverabilityReport - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Email deliverability of a domain (SPF, DKIM, DMARC, PTR)
GET/api/v1/accounts/{id}/email/deliverability/{did}
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Responses
- 200 OK
Body
Field Type checked_atalwaysinteger domainalwaysstring domain_idalwaysstring okalwaysboolean recordsalwaysarray of HostingRecordCheck spf_customalwaysStoreSPFCustom zone_localalwaysboolean - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Install the suggested email DNS records
POST/api/v1/accounts/{id}/email/deliverability/{did}/repair
Installs the suggested records the domain's local zone is missing (or has wrong). Body {records:["spf","dkim","dmarc"]}; empty = every record that isn't valid in the zone.
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Request body
| Field | Type |
|---|---|
records | array of string |
Responses
- 200 OK
Body
Field Type changedarray of string reportHostingDeliverabilityReport - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: zone-not-local
- 500 Internal Server Error: internal
Customize and install the SPF record
PUT/api/v1/accounts/{id}/email/deliverability/{did}/spf
Saves the SPF customizer and, when the zone is local, installs the resulting record.
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Request body
| Field | Type |
|---|---|
all | string |
hosts | array of string |
includes | array of string |
ip4 | array of string |
ip6 | array of string |
Responses
- 200 OK
Body
Field Type changedarray of string reportHostingDeliverabilityReport - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Track delivery of the account's mail
GET/api/v1/accounts/{id}/email/deliveries
Is the customer's Track Delivery: mail the account sent, and mail to or from its domains.
Parameters
| Name | In |
|---|---|
id | path |
event | query |
q | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreMailDelivery retention_daysinteger totalinteger - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Remove a domain forwarder
DELETE/api/v1/accounts/{id}/email/domain-forwarders/{did}
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Forward a whole domain
PUT/api/v1/accounts/{id}/email/domain-forwarders/{did}
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Request body
| Field | Type |
|---|---|
to_domain | string |
Responses
- 200 OK
Body
Field Type domainalwaysstring domain_idalwaysstring to_domainalwaysstring - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 422 Unprocessable Entity: rejected
- 500 Internal Server Error: internal
List the account's email filters
GET/api/v1/accounts/{id}/email/filters
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Create an account email filter
POST/api/v1/accounts/{id}/email/filters
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Reorder the account's email filters
PUT/api/v1/accounts/{id}/email/filters-order
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Delete an account email filter
DELETE/api/v1/accounts/{id}/email/filters/{fid}
Parameters
| Name | In |
|---|---|
id | path |
fid | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Update an account email filter
PUT/api/v1/accounts/{id}/email/filters/{fid}
Parameters
| Name | In |
|---|---|
id | path |
fid | path |
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
List forwarders
GET/api/v1/accounts/{id}/email/forwarders
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type domain_forwardersarray of StoreDomainForward itemsarray of StoreForwarder - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Add a forwarder
POST/api/v1/accounts/{id}/email/forwarders
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
dest_type | string |
destinations | array of string |
domain_id | string |
fail_message | string |
local_part | string |
Responses
- 201 Created
Body
Field Type itemsarray of StoreForwarder - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 409 Conflict: validation
- 422 Unprocessable Entity: rejected
- 500 Internal Server Error: internal
Delete a forwarder
DELETE/api/v1/accounts/{id}/email/forwarders/{fid}
Parameters
| Name | In |
|---|---|
id | path |
fid | path |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Email routing of every domain
GET/api/v1/accounts/{id}/email/routing
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type itemsarray of Item - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Set a domain's email routing
PUT/api/v1/accounts/{id}/email/routing/{did}
Parameters
| Name | In |
|---|---|
id | path |
did | path |
Request body
| Field | Type |
|---|---|
routing | string |
Responses
- 200 OK
Body
Field Type domainstring domain_idstring routingstring - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Get the spam filter settings
GET/api/v1/accounts/{id}/email/spam
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type allow_listarray of string auto_deleteboolean auto_delete_thresholdnumber block_listarray of string enabledboolean spam_boxboolean subject_prefixstring tag_subjectboolean thresholdnumber updated_atinteger - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Save the spam filter settings
PUT/api/v1/accounts/{id}/email/spam
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
allow_list | array of string |
auto_delete | boolean |
auto_delete_threshold | number |
block_list | array of string |
enabled | boolean |
spam_box | boolean |
subject_prefix | string |
tag_subject | boolean |
threshold | number |
updated_at | integer |
Responses
- 200 OK
Body
Field Type allow_listarray of string auto_deleteboolean auto_delete_thresholdnumber block_listarray of string enabledboolean spam_boxboolean subject_prefixstring tag_subjectboolean thresholdnumber updated_atinteger - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 422 Unprocessable Entity: rejected
- 500 Internal Server Error: internal
Email deliverability of the server's hostname
GET/api/v1/server/mail/deliverability
Responses
- 200 OK
Body
Field Type checked_atalwaysinteger heloalwaysstring hostnamealwaysstring ipalwaysstring okalwaysboolean recordsalwaysarray of HostingRecordCheck zone_localstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Install the hostname's suggested email DNS records
POST/api/v1/server/mail/deliverability/repair
Request body
| Field | Type |
|---|---|
kinds | array of string |
Responses
- 200 OK
Body
Field Type repairedarray of string - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 409 Conflict: repair-failed
Track delivery on the whole server
GET/api/v1/server/mail/deliveries
Parameters
| Name | In |
|---|---|
account_id | query |
event | query |
q | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreMailDelivery retention_daysinteger stats_24hmap of integer totalinteger - 400 Bad Request: validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Read new entries of the mail log now
POST/api/v1/server/mail/deliveries/refresh
Responses
- 200 OK
Body
Field Type new_rowsinteger - 400 Bad Request: rejected
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Hold outgoing mail of a domain or account
POST/api/v1/server/mail/holds
Request body
| Field | Type |
|---|---|
account_id | string |
reason | string |
Responses
- 201 Created
Body
Field Type incident_idstring usernamestring - 400 Bad Request: rejected, validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Release held mail
DELETE/api/v1/server/mail/holds/{id}
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type resolvedinteger - 400 Bad Request: rejected
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Outgoing mail limits and current counts
GET/api/v1/server/mail/limits
Responses
- 200 OK
Body
Field Type heldarray of string incidentsarray of StoreIncident last_hourarray of StoreSenderVolume queue_countinteger settingsHostingMailAdminSettings - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
List the mail queue
GET/api/v1/server/mail/queue
Parameters
| Name | In |
|---|---|
q | query |
server | query |
state | query |
Responses
- 200 OK
Body
Field Type itemsarray of map of any totalinteger truncatedboolean - 400 Bad Request: rejected, wrong-server
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Get a queued message
GET/api/v1/server/mail/queue/{mid}
Parameters
| Name | In |
|---|---|
mid | path |
part | query |
server | query |
Responses
- 200 OK
Body
map of any
- 400 Bad Request: rejected, wrong-server
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Deliver, freeze or delete queued messages
POST/api/v1/server/mail/queue/action
Parameters
| Name | In |
|---|---|
server | query |
Request body
| Field | Type |
|---|---|
action | string |
ids | array of string |
Responses
- 200 OK
Body
map of any
- 400 Bad Request: rejected, wrong-server
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Mail routing of the server and its email nodes
GET/api/v1/server/mail/routing
Responses
- 200 OK
Body
Field Type itemsarray of StoreMailRoutingRow - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Save the mail server settings
PUT/api/v1/server/mail/settings
Request body
| Field | Type |
|---|---|
auto_hold | boolean |
default_max_per_hour | integer |
retention_days | integer |
unique_recipients_alert | integer |
Responses
- 200 OK
Body
Field Type auto_holdboolean default_max_per_hourinteger retention_daysinteger unique_recipients_alertinteger - 400 Bad Request: rejected, validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Trace how an address would be delivered
POST/api/v1/server/mail/troubleshoot
Parameters
| Name | In |
|---|---|
server | query |
Request body
| Field | Type |
|---|---|
address | string |
Responses
- 200 OK
Body
map of any
- 400 Bad Request: rejected, validation, wrong-server
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal