Error codes

The HTTP status and error codes the API returns for zones, records, delegation checks, batches, merges and the email check.

On this page

Errors come as JSON with a stable code, a human-readable message and, for validation errors, the field at fault:

{"error": {"code": "invalid", "message": "must be between 60 and 86400 seconds", "field": "ttl"}}

Program against code, not message. The CLI exits with 1 on errors, 2 on usage errors and 3 on a version conflict.

Request and permission errors

StatusCodeWhen
400bad_requestMalformed JSON, unknown fields, bad If-Match or dry_run values
401unauthorizedMissing, invalid, expired or revoked token
403forbiddenThe role or scope does not allow the action (for example a readonly token writing records, or a domain-scoped token adding zones)
403token_scopeA purge-only token called anything other than the cache purge
404not_foundThe zone, record or resource does not exist or is outside your scope
413too_largeA BIND zone file over 1 MiB

Validation

StatusCodeWhen
422invalidA field is not valid: see field and message. Examples: an unsupported record type, a TTL outside 60–86,400, a priority on an A record, a proxied wildcard, a coexistence rule, a public suffix as zone name, more than 500 operations in a batch (field names the operation, such as create[2].content)
422reason_requiredA configuration change without X-Change-Reason (1–500 characters)

Zones

StatusCodeWhen
403zone_limitThe organization has reached its domain limit. Delete unused domains or ask support to raise it
409zone_existsThe domain is already added in OpenWAF
409zone_overlapsThe domain is a parent or a subdomain of a domain managed by another organization or client
409zone_not_externalAn external-only operation (such as GET …/hosts) on a delegated zone
409conflictThe zone is disabled, the operation does not apply to an external zone (for example importing records), or a name is already taken
409zone_mergedThe zone was merged into another and is read-only
409merge_not_equivalentA merge would change what some name serves, or cannot be expressed; see plan.problems
409merge_not_reversibleThe parent zone changed after the merge
409missing_certsThe change would leave a site without a valid certificate; hostnames lists them
412version_conflictIf-Match (or expected_version) does not match the zone's current version; current_version has it
428if_match_requiredA revert without If-Match

Upstream and availability

StatusCodeWhen
502dns_backendThe DNS servers rejected the change; nothing was applied. Retry, and contact support if it persists
502dns_out_of_syncThe change was rolled back because it could not be published; contact support
502dns_unavailableThe email check could not get answers from public DNS
503busyToo many email checks running; retry in a few seconds
503unavailableThe feature is temporarily unavailable

Clients and white label

StatusCodeWhen
409client_has_zonesDeleting a client that still has domains
409host_takenThe dashboard domain or nameserver name belongs to another organization
409conflictRemoving or demoting the last owner, or a client name already in use

Last updated:

↑↓ to navigate↵ to openesc to close