Skip to content
Guides menu
Guides/API key errors

API key errors

Handle authentication, permission, route, and rate limit errors from the shop API.

Preview: opening soon. Error names here describe the planned key gate; route errors appear in the reference.

API key refusals are JSON (application/json) with an HTTP status and a machine readable code. Read code; message is for people and its words may change. A refusal from the key gate looks like this:

{
  "error": "ApiKeyRefused",
  "code": "invalid_key",
  "message": "This API key is not valid. It may be revoked or expired",
  "context": {},
  "path": "/v1/shops/00000000-0000-4000-8000-000000000001/bookings",
  "method": "GET"
}

A refusal from the route itself, such as scope_missing or read_only_key, has the same fields with another error name. scope_missing names the area the key lacks in context.area. A route that is not open answers 404 with {"detail": "Not Found"}, exactly like an address that does not exist. Every answer to a key carries Cache-Control: no-store.

StatusCodeWhat to do
400key_misplacedSend one key only in the bearer header. Remove it from the URL and body.
401invalid_keyCheck the secret and whether it has expired or been revoked.
403scope_missingCheck the route's area and the person's current access. A key cannot widen either.
403read_only_keyRemove the write. Phase one keys can only read.
403ip_not_allowedCall from a saved IP range or update the allowlist in Settings.
403key_from_browserMove the call to a server without a browser Origin header.
403api_keys_offThe shop's owner switched API keys off. Keys work again when it is switched back on.
404Route or record unavailableCheck the generated reference, shop ID, and record ID. Closed routes also answer 404.
413body_too_largeSend a smaller request body.
429too_many_requestsToo many calls in a minute, or too many invalid keys from one address. Wait Retry-After seconds.
429daily_quotaThe key or the shop reached its daily limit. It resets at midnight, shop time; honor Retry-After.
429customer_budgetThe key read its daily number of customer records. Honor Retry-After; see limits.

Do not log the bearer value or the full request URL while debugging. The status and code are enough for a support report.