Responses and Errors
Last updated Changelog
On this page
Responses use standard HTTP status codes. Success responses return data directly (no envelope wrapper).
Success
json
// 200 OK
{ "domain": "example.com", "status": "active", "expiry_date": "2027-03-03" }
// 201 Created
{ "id": "550e8400-...", "name": "www", "type": "A", "content": "1.2.3.4", "ttl": 3600 }
// 200 OK, a collection
[{ "domain": "example.com", "status": "active" }, { ... }]
Errors
Every error has two fields: error, a sentence saying what went wrong, for showing to a person, and code, a word for your integration to act on. Match on code, never on error: we may reword a message, but a code doesn’t change. Some errors add fields of their own (balance and required, limit, services).
json
// 400
{ "error": "Domain limit reached (5).", "code": "limit_reached", "limit": 5 }
// 402
{ "error": "Insufficient credit balance.", "code": "insufficient_credit", "balance": 5.00, "required": 12.95 }
// 422, validation: errors names each field that failed (message repeats error)
{
"error": "The domain field is required.",
"code": "validation_failed",
"message": "The domain field is required.",
"errors": { "domain": ["The domain field is required."] }
}
Errors Any Endpoint Can Return
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
The API key is missing, malformed or unknown. |
| 401 | key_disabled |
The API key has been disabled. |
| 401 | ip_not_allowed |
The request came from an IP address outside the key’s allowlist. |
| 401 | account_inactive |
The account the key belongs to is not active. |
| 422 | validation_failed |
A parameter is missing or not valid. errors names each one. |
| 500 | server_error |
Something went wrong on our side. Try again, and contact support if it persists. |
| 503 | service_unavailable |
The API or this part of it is temporarily unavailable (maintenance). Try again shortly. |
Each endpoint’s page lists the other errors it can return.
Error Codes
| Status | Code | When |
|---|---|---|
| 400 | invalid_request |
A value in the request isn’t valid (an unknown record type, a malformed domain name). |
| 400 | limit_reached |
The plan allows no more of this (domains, databases, sub-users, snapshots, keys). |
| 400 | invalid_state |
The resource’s state doesn’t allow this right now. error says why. |
| 400 | domain_not_verified |
The CraneMail domain isn’t active and verified yet. |
| 400 | domain_unavailable |
The domain is already registered or otherwise not available. |
| 400 | domain_held |
The domain name is held and can’t be registered or transferred in. |
| 400 | extension_not_offered |
We don’t sell this extension, or not for this operation. |
| 400 | operation_rejected |
The server behind the API (mail, database, storage) or the registrar refused the operation. error says why. |
| 401 | unauthenticated |
The API key is missing, malformed or unknown. |
| 401 | key_disabled |
The API key has been disabled. |
| 401 | ip_not_allowed |
The request came from an IP address outside the key’s allowlist. |
| 401 | account_inactive |
The account the key belongs to is not active. |
| 402 | insufficient_credit |
The credit balance is too low. balance and required give the amounts. |
| 403 | scope_denied |
The key’s scopes don’t cover this operation, or this service or domain. |
| 403 | high_profile_protected |
The account has High-Profile Protection, which turns off domain changes through the API. |
| 403 | service_inactive |
The service (CraneMail, CraneBase or a crate) is not active. |
| 403 | domain_suspended |
The CraneMail domain is suspended. |
| 403 | not_in_plan |
The service’s plan doesn’t include this. |
| 403 | passwordless_login_disabled |
Signing in without a password is turned off for this domain. |
| 403 | forbidden |
Not allowed, for a reason not covered by a more specific code. |
| 404 | not_found |
The domain, service, record or other resource doesn’t exist, or the account doesn’t own it. |
| 405 | method_not_allowed |
The endpoint doesn’t accept this HTTP method. |
| 409 | conflict |
The DNS records changed between reading and writing them. Read them again and retry. |
| 422 | validation_failed |
A parameter is missing or not valid. errors names each one. |
| 422 | service_required |
The key covers more than one service: say which with service_id. services lists them. |
| 423 | zone_locked |
DNS changes for this domain are locked. Contact support. |
| 429 | rate_limited |
Too many requests. Wait and try again. |
| 500 | server_error |
Something went wrong on our side. Try again, and contact support if it persists. |
| 502 | upstream_unavailable |
A server behind the API (mail, spam filtering, storage) didn’t answer. Try again shortly. |
| 503 | service_unavailable |
The API or this part of it is temporarily unavailable (maintenance). Try again shortly. |
Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Resource created |
| 400 | The request can’t be done: a limit, the resource’s state, or the server or registrar refused it (the code says which) |
| 401 | The API key wasn’t accepted |
| 402 | Payment required (insufficient credit) |
| 403 | Not allowed: the key’s scopes, the plan, or High-Profile Protection |
| 404 | Not found |
| 405 | Method not allowed |
| 409 | Conflict: the DNS records changed meanwhile |
| 422 | Validation error |
| 423 | Locked: DNS changes for the domain are locked |
| 429 | Too many requests |
| 500 | Server error |
| 502 | A server behind the API didn’t answer |
| 503 | Temporarily unavailable |