Skip to main content
Documentation
Docs
Esc

    Loading the search index…

    Errors

    The problem+json error shape the public API answers with, and every error code it can send, with what each one means.

    Every error from the public API is application/problem+json (RFC 9457), with a stable code to branch on. The detail is for people and can change; never parse it.

    403 Forbidden
    {
      "type": "https://pagebread.com/docs/api/v1/errors#ip-not-allowed",
      "title": "The request came from an address outside the key's allowlist",
      "status": 403,
      "code": "ip_not_allowed",
      "detail": "This key only accepts requests from the addresses on its allowlist.",
      "request_id": "req_01JFQ8Z3T9K2M4N6P8R0S2V4W8",
      "instance": "/v1/me"
    }
    • type links to the code's section on this page.
    • request_id is the response's Request-Id; quote it to support.
    • meta, when present, carries machine-readable detail, named under each code below.
    • A 401 also carries WWW-Authenticate: Bearer realm="pagebread", with error="invalid_token" unless no key was sent at all.

    New codes may be added under an existing status; changing or removing one only happens in a new version.

    Codes

    Missing API key

    401 missing_api_key. No Authorization header was sent.

    Invalid API key

    401 invalid_api_key. The key is malformed, fails its checksum, does not exist, or the secret is wrong. These are deliberately indistinguishable.

    API key expired

    401 api_key_expired. The key is past its expiry, including the end of a roll’s overlap.

    API key revoked

    401 api_key_revoked. The key was revoked.

    Credentials in URL

    400 credentials_in_url. A key-like query parameter (api_key, key, token, …) was sent. Send keys only in the Authorization header, and roll a key that was put in a URL.

    Browser request refused

    400 browser_request_refused. The request came from a browser (it carried an Origin header). Keys are for servers.

    Invalid API version

    400 invalid_api_version. Pagebread-Version names a version that does not exist. meta.supported_versions lists the ones that do.

    Malformed JSON

    400 malformed_json. The body is not valid JSON.

    Unsupported media type

    415 unsupported_media_type. A body was sent that is not application/json.

    Request too large

    413 request_too_large. The body is over 100 KB.

    Insufficient scope

    403 insufficient_scope. The key lacks the scope the endpoint needs. meta.required_scope names it; meta.reason is not_granted when the key never had it and custodian_role when the member responsible for the key no longer has the role for it.

    IP not allowed

    403 ip_not_allowed. The request came from an address outside the key’s IP allowlist.

    Feature not in plan

    403 feature_not_in_plan. The workspace’s plan does not include this kind of key (meta.feature is api.access for live keys), or the workspace is not in the private beta (meta.feature is api_beta). Live keys on a plan without them are not revoked: they work again if the plan changes.

    Subscription restricted

    403 subscription_restricted. The workspace’s subscription is restricted. Reads keep working; writes are refused.

    Workspace suspended

    403 workspace_suspended. The workspace is suspended or scheduled for deletion. Reads are refused too.

    API access suspended

    403 api_access_suspended. Pagebread has suspended this workspace’s API access. Contact support.

    Route not found

    404 route_not_found. There is no such endpoint.

    Rate limited

    429 rate_limited. A rate limit was hit. meta.policy says which:

    • key, burst or workspace: the key's or the workspace's limit. Once a key is over a limit it is answered 429 until that window resets, without being checked again.
    • preauth: too many refused requests from your address. Every request that is refused before it is served counts: one with no Authorization header, an invalid, revoked or expired key, a browser request, an address off the allowlist, and a key whose workspace or plan cannot use the API right now.
    • ip: far more requests from your address in a minute than any plan allows, whatever key they carry.

    Wait for Retry-After seconds.

    Internal error

    500 internal_error. Something went wrong on Pagebread’s side. Retry, and quote the request_id if it persists.

    Service paused

    503 service_paused. The API is paused for maintenance. This is answered before the key is checked, so a paused API says nothing about whether your key is valid. Retry after Retry-After seconds.

    Temporarily unavailable

    503 temporarily_unavailable. The API cannot answer right now. Retry after Retry-After seconds.