Skip to main content

Error response format

All errors follow a consistent JSON structure:
{
  "error": "Error Type",
  "message": "Human-readable description of what went wrong."
}

HTTP status codes

StatusMeaningCommon cause
200OKRequest succeeded
400Bad RequestMissing or malformed request body / parameter
401UnauthorizedMissing, invalid, or revoked API key
402Payment RequiredNo credits remaining on the account
422Unprocessable EntityInput failed validation (e.g. invalid email format)
429Too Many RequestsRate limit exceeded — see Rate Limits
500Internal Server ErrorUnexpected server-side error
503Service UnavailableUpstream provider temporarily unavailable

Common errors

{
  "error": "Unauthorized",
  "message": "Invalid or missing API key."
}
Check that your key is correctly formatted and included in the Authorization: Bearer header.
{
  "error": "Bad Request",
  "message": "Required field 'email' is missing from the request body."
}
Ensure your request body contains all required fields for the endpoint you are calling.
{
  "error": "Payment Required",
  "message": "Insufficient credits. Top up your account or upgrade your plan."
}
Your credit balance has reached zero. Purchase a top-up from the billing page or upgrade your plan.
{
  "error": "Unprocessable Entity",
  "message": "The value provided for 'email' is not a valid email address."
}
The input passed basic format validation but failed deeper validation. Check the message field for specifics.
{
  "error": "Service Unavailable",
  "message": "One or more upstream providers are currently unavailable. Please retry shortly."
}
DataLink routes through multiple upstream providers with automatic failover. A 503 means all providers for this data type are temporarily unreachable. Check status.datalinkapis.com for live platform health.