Docs Home Return to Homepage
Get Started Login

CraneMail

CraneMail endpoints are open to reseller CraneMail plans only, with a full access key or a key scoped to the service. Reads need the scope’s read permission; everything that changes something, and the login links, need write. While a service is suspended its domains can be read but not changed, and a domain staff suspended can’t be changed at all.

When the mail server can’t be reached, the mailbox, alias and domain alias lists answer 502, and changes 500; try again shortly.

Units: a domain’s disk_limit is in GB and its disk_usage in MB. A mailbox’s disk_limit and disk_usage are both in MB. A limit of 0 means unlimited (for a mailbox, the domain’s default).

List Services

GET /cranemail/services Returns the client's reseller CraneMail services, with each domain's usage. Scoped keys only see services they have access to. login_hostnames are the service's own addresses f...

Create Domain

POST /cranemail/domains Adds a domain to a reseller service. A key scoped to one service creates it there; a key that covers several must give service_id (the 422 response lists the choices). Settings...

Get Domain Details

GET /cranemail/domains/{domain} Includes the DNS records the domain needs and the TXT record that verifies it. Response { "domain": "example.com", "service_id": 12, &quot...

Update Domain Settings

PUT /cranemail/domains/{domain}/settings Changes only the fields given. Takes the same settings as Create Domain (every field but domain, service_id, username and password). Turning mxfilter_enabled o...

Suspend Domain

POST /cranemail/domains/{domain}/suspend Turns the domain off (its mail stops). It stays off until you unsuspend it, even if the service is suspended and unsuspended in the meantime. Response { "...

Unsuspend Domain

POST /cranemail/domains/{domain}/unsuspend Lifts a suspension made through this API. A domain that isn't verified yet goes back to pending. Response { "message": "Domain unsuspended.&qu...

Delete Domain

DELETE /cranemail/domains/{domain} Removes the domain and every mailbox on it. This can't be undone. Response { "message": "Domain deleted." } Errors Besides the errors any endpoin...

Refresh Domain Stats

POST /cranemail/domains/{domain}/refresh Fetches latest disk usage and account counts from the mail server. Response { "disk_usage": 2870.25, "user_count": 13, "user_alias_cou...

MXFilter Login

POST /cranemail/domains/{domain}/mxfilter/login Returns a one-time link into the domain's MXFilter panel, valid for 5 minutes. 400 when filtering isn't active on the domain, 403 when the domain has mx...

List Users

GET /cranemail/domains/{domain}/users disk_limit is the mailbox's own quota in MB, 0 when it shares the domain's. disk_usage is in MB. It can be null for a mailbox without a quota of its own on a doma...

Create User

POST /cranemail/domains/{domain}/users Parameters Field Type Required Default Description username string Yes Mailbox username (before @) password string Yes Password (min 8 chars) display_name string...

Update User

PUT /cranemail/domains/{domain}/users/{username} Changes only the fields given; the rest keep their current values. Parameters Field Type Required Description new_username string No Rename the mailbox...

Delete User

DELETE /cranemail/domains/{domain}/users/{username} Cannot delete the primary domain administrator. Response { "message": "User deleted." } Errors Besides the errors any endpoint c...

Change User Password

POST /cranemail/domains/{domain}/users/{username}/password Parameters Field Type Required Description password string Yes New password (min 8 chars) Response { "message": "Password chan...

Login as User

POST /cranemail/domains/{domain}/users/{username}/login Returns a one-time link that opens the mailbox's webmail without its password. 403 when the domain has webmail_sso off. Response { "url&quo...

List Aliases

GET /cranemail/domains/{domain}/aliases Response [ { "username": "info", "display_name": "Info Alias", "targets": ["[email protected]", &quot...

Create Alias

POST /cranemail/domains/{domain}/aliases Parameters Field Type Required Description username string Yes Alias name (before @) display_name string No Display name targets array Yes Array of target emai...

Update Alias

PUT /cranemail/domains/{domain}/aliases/{alias} Changes only the fields given; the rest, each feature included, keep their current values. Parameters Field Type Required Description username string No...

Delete Alias

DELETE /cranemail/domains/{domain}/aliases/{alias} Response { "message": "Alias deleted." } Errors Besides the errors any endpoint can return: Status Code When 403 domain_suspended...

List Domain Aliases

GET /cranemail/domains/{domain}/domain-aliases Response ["example.org", "example.net"] Errors Besides the errors any endpoint can return: Status Code When 400 domain_not_verified D...

Add Domain Alias

POST /cranemail/domains/{domain}/domain-aliases The alias must be proven like the domain was: a TXT record on the alias, at the same host prefix as the domain's own record (craneverify.alias-domain.co...

Delete Domain Alias

DELETE /cranemail/domains/{domain}/domain-aliases/{alias} Response { "message": "Domain alias deleted." } Errors Besides the errors any endpoint can return: Status Code When 403 do...

Snagged on something?

Our sysadmins answer tickets around the clock.