Skip to main content
The Main API returns standard HTTP status codes and a JSON error body for every non-2xx response.

Error body shape

{
  "error": {
    "code": "string",
    "message": "string",
    "details": { }
  }
}
FieldTypeDescription
codestringMachine-readable identifier (e.g. validation_failed, not_found)
messagestringHuman-readable summary, safe to show to your users
detailsobjectOptional context — field-level validation errors, conflict details, etc.

Status codes

StatusMeaningTypical cause
400 Bad RequestValidation failedMissing required field, invalid format, payload too large
401 UnauthorizedMissing or invalid tokenNo Authorization header, expired key, revoked key
403 ForbiddenAuthenticated but not allowedKey scope insufficient, resource belongs to another organisation
404 Not FoundResource does not existWrong ID, resource deleted
409 ConflictState conflictDuplicate email on contact, segment name in use
422 Unprocessable EntityBusiness rule violationSending to an unsubscribed contact, invalid journey graph
429 Too Many RequestsRate limitedRetry after the Retry-After header
500 Internal Server ErrorUnexpected platform errorRetry with backoff; if persistent, contact support
503 Service UnavailableTemporary capacity issueRetry with backoff

Common error codes

codeWhen it appears
validation_failedOne or more fields failed schema validation; see details
not_foundThe referenced resource does not exist or is not visible to your key
forbiddenYour key lacks the required scope
duplicateA unique constraint was violated
quota_exceededPlan limit reached (contacts, sends, etc.)
provider_errorYour configured provider rejected the operation; see details

Retry guidance

  • Idempotent reads (GET): retry freely on 5xx and 429.
  • Mutations (POST/PUT/PATCH/DELETE): include an Idempotency-Key header so retries are safe. Retry on 5xx and 429; do not retry on 4xx.

Reporting bugs

Include the request_id from the response headers when reporting an error. It lets us trace your specific request end-to-end.