Skip to main content

Status codes

Every HTTP status the published document declares, and what each one means in this API.

1 min read
View MarkdownEdit on GitHub

Every status below appears in the published document. The meaning is the one this API gives it, which is not always the one the RFC gives it: read 404 and 422 here before assuming.

2xxWorked
200The request worked.
201The thing was created. The body is the thing.
202Accepted and still settling. Poll the status operation, or subscribe to the event.
204It worked and there is nothing to return.
3xxRedirect
302A redirect, used by the hosted flows.
4xxYour request
400The request is malformed, or a field is wrong. The body names which.
401No credential, or one this API does not recognise.
402Payment required — the x402 paywall's own answer.
403The credential is valid and does not carry the scope, the role, or the mandate this call needs.
404Not found — including anything belonging to another organization. Existence is not probeable across the tenant boundary, so a resource that is not yours is answered exactly like one that never existed.
409A conflict with the state that already exists — a duplicate, or a transition the resource cannot make from where it is.
410Gone: it existed and was withdrawn.
413The payload is too large.
422Well-formed and refused on its meaning, not its shape.
424A dependency this call needs failed. Not your input.
429Too many requests. Back off.
5xxOur side, or an upstream
500Ours to fix. Quote the X-Request-Id.
501Declared and not implemented on this rail yet.
502An upstream provider answered badly.
503An upstream provider, or this service, is unavailable. Usually worth retrying.

The body of a refusal

⚠️ Two shapes coexist in this API, and a client that parses one as the other reads undefined where it expected a string. The newer routes answer:

{
  "error": {
    "code": "not_found",
    "message": "paywall not found"
  },
  "request_id": "req_01J8…"
}

Older routes answer a bare { "error": "not_found" }, sometimes with an issues array alongside it when the refusal is a validation failure. Each operation's page shows the shape that operation actually returns — read it there rather than assuming.

The codes INSIDE that body, and the fix for each, are in the error reference.

Status codes | CodeSpar