Developer reference

Error codes

Explore Error codes API documentation, request parameters, response fields, code examples, and error handling for DomScan integrations.

Error codes

Structured errors

Every API error returns the same JSON shape: an error object with a stable code, a readable message, its type and HTTP status, whether it is retryable, the request_id and a docs_url. The request_id always matches the X-Request-Id response header, so include it when you contact support.

{
  "error": {
    "code": "INVALID_DOMAIN",
    "message": "Invalid domain format",
    "suggestion": "Use a registrable domain such as example.com",
    "type": "validation_error",
    "status": 400,
    "retryable": false,
    "request_id": "m5x7k2p-a9f3",
    "docs_url": "https://domscan.net/docs/check-availability"
  }
}

Error fields

FieldDescription
codeStable machine-readable error code. Codes are never renamed, so you can safely branch on them.
messageReadable explanation of the error. The wording can change, so do not parse it.
typeBroad error category, such as validation_error, authentication_error or rate_limit_error.
statusThe HTTP status code, repeated in the body for logs and queues.
retryableWhether the same request can succeed if you retry it later.
request_idUnique request identifier. Matches the X-Request-Id header.
docs_urlLink to the documentation section that explains this error.
suggestionOptional hint on how to fix the request.
detailsOptional structured context, such as the allowed methods or the invalid parameter.
retry_afterOptional number of seconds to wait before retrying. Also sent as the Retry-After header.

Common error codes

These are the codes most clients need to handle. Some endpoints return more specific codes that follow the same rules; the full list with status, type and retry behavior is in the OpenAPI specification under x-domscan-error-codes. RATE_LIMIT_EXCEEDED is still accepted as an alias of RATE_LIMITED.

CodeHTTP statusTypeRetryableDescription
BAD_REQUEST400validation_errorNoMissing or invalid parameters
MISSING_PARAMETER400validation_errorNoA required parameter is missing
INVALID_PARAMETER400validation_errorNoA parameter has an invalid value
INVALID_JSON400validation_errorNoThe request body is not valid JSON
INVALID_DOMAIN400validation_errorNoInvalid domain format
UNSUPPORTED_TLD400validation_errorNoTLD not supported
SUBDOMAIN_NOT_SUPPORTED400validation_errorNoThis endpoint accepts registrable domains, not subdomains
VALIDATION_ERROR422validation_errorNoThe request is well formed but cannot be processed
AUTH_REQUIRED401authentication_errorNoNo API key or session was provided
INVALID_API_KEY401authentication_errorNoThe API key is invalid or has been revoked
INSUFFICIENT_CREDITS402credits_errorNoYour account does not have enough credits for this request
FORBIDDEN403permission_errorNoYou do not have permission for this action
NOT_FOUND404not_found_errorNoThe endpoint or resource does not exist
METHOD_NOT_ALLOWED405request_errorNoThe endpoint exists but does not accept this HTTP method. The Allow header lists supported methods.
CONFLICT409conflict_errorNoThe request conflicts with the current state of the resource
IDEMPOTENCY_CONFLICT409conflict_errorNoThe idempotency key was already used with a different request
IDEMPOTENCY_KEY_REUSED422validation_errorNoThis Idempotency-Key was already used with a different request in the last 24 hours. Use a new key for a new request.
IDEMPOTENCY_IN_PROGRESS409conflict_errorYesA request with this Idempotency-Key is still running. Retry after a moment to receive its stored response.
RATE_LIMITED429rate_limit_errorYesToo many requests
INTERNAL500api_errorNoUnexpected server error. Contact support with the request ID if it persists.
UPSTREAM_ERROR502upstream_errorYesAn upstream source returned an unusable response
UPSTREAM_UNAVAILABLE503upstream_errorYesAn upstream source is temporarily unavailable
SERVICE_UNAVAILABLE503upstream_errorYesThe service is temporarily unavailable
TIMEOUT504timeout_errorYesAn upstream source or registry did not respond in time

Retry guidance

  • Retry only when retryable is true. For validation, authentication and permission errors, fix the request first.
  • When retry_after or the Retry-After header is present, wait at least that many seconds before the next attempt.
  • Otherwise use exponential backoff with jitter, for example 1, 2, 4 and 8 seconds, and stop after a few attempts.
  • For batch and job creation, send an Idempotency-Key header so a retried request never creates a duplicate job.
  • For other POST requests that charge credits, an Idempotency-Key header makes a retry return the stored response instead of charging again.

Compatibility

Since 10 October 2026 every endpoint uses this format. Fields that some endpoints already returned, such as credits_remaining, purchase_url, login_url, success or meta, are kept during a compatibility period, so existing integrations keep working. Read error details from the error object in new code.