Skip to content

Errors ​

Errors follow RFC 7807 problem details (application/problem+json). The status mirrors the HTTP code.

The error object ​

FieldTypeDescription
typestring (uri)A URI reference that identifies the problem type
titlestringA short, human-readable summary of the problem type
statusintegerThe HTTP status code generated by the origin server
detailstringA human-readable explanation specific to this occurrence of the problem
instancestring | nullA URI reference that identifies the specific occurrence of the problem
errorsobjectOptional validation error details
json
{
  "type": "about:blank",
  "title": "Invalid request signature",
  "status": 401,
  "detail": "Invalid request signature",
  "instance": null,
  "errors": {}
}

For 422 errors, errors carries field-level validation messages:

json
{
  "type": "about:blank",
  "title": "Invalid request parameters",
  "status": 422,
  "detail": "Validation failed: Amount must be greater than 0",
  "instance": null,
  "errors": {
    "amount": ["must be greater than 0"]
  }
}

A signature 401 carries extra detail to help you debug it — see Sign requests. The two idempotency errors use a different body — see Idempotency.

Which errors to retry, and how: Handle errors and retries.

Status codes ​

StatusMeaning
400Bad request — malformed JSON, an event batch that failed validation, or an empty Idempotency-Key
401Invalid zay-api-key or signature
403Access forbidden
404Resource not found
413Event batch too large
422Validation error in request body
429Rate limit exceeded — see Rate limits — or a request with the same Idempotency-Key is still in progress — see Idempotency
503Service unavailable

Each endpoint lists the errors it returns, and what causes them.