Developers

Errors

Every error has the same shape and a stable code.

Errors use HTTP status codes and always return the same body:

{
  "error": {
    "type": "invalid_request_error",
    "code": "sold_out",
    "message": "Not enough tickets left for this ticket type.",
    "param": "quantity"
  }
}
  • type groups errors: authentication_error, permission_error, invalid_request_error, rate_limit_error or api_error.
  • code is stable and meant for your code. Branch on it, not on message.
  • message is for humans and may change.
  • param names the related parameter, when there is one.
  • Validation errors (422, code validation_failed) also include errors with every invalid field.

Common codes

StatusCodeMeaning
401invalid_tokenMissing, unknown or expired token, or the owner left the organisation
403insufficient_scopeThe token lacks the scope for this endpoint
403permission_deniedThe token's owner lacks the permission
403api_access_revokedThe owner may no longer use the API
403ip_not_allowedThe request came from an IP address outside the allowlist
403billing_mandate_requiredCreating orders needs an active direct debit mandate
404resource_missingThe object does not exist or is outside the token's reach
409duplicate_external_referenceAn order with this external_reference already exists
409request_in_progressA request with the same Idempotency-Key is still running
422validation_failedThe request is invalid; see param and errors
422sold_outNot enough stock or day capacity
422idempotency_key_reusedThe Idempotency-Key was used for a different request
429rate_limitedToo many requests; wait Retry-After seconds

On this page