Reference

Error codes, and what to do with them.

An authorization layer is only as useful as its failure semantics. Every error below is a stop unless it says otherwise.

Response shape

4xx / 5xx
{
  "error": "invalid_request",
  "detail": { "action": "tool required" }
}

The table

HTTPerrorMeaningRetryAction
401missing_tokenNo credential presented.noSend Authorization: Bearer <key>.
401invalid_tokenThe key does not match any stored hash.noCheck the key; it is shown once at issue.
401revoked_tokenThe key was revoked.noIssue a new key.
401expired_tokenThe key is past its expiry.noIssue a new key or extend the expiry.
403scope_deniedThe key lacks the authorize scope, or asked for another client.noIssue a key scoped to that client.
403tool_not_permittedThe tool is outside the key's allowlist.noUse a permitted tool or widen the allowlist.
403client_pausedThe client is paused in the console.noResume the client.
403client_not_foundThe key references a client that no longer exists.noReissue the key.
404not_foundVerification: no record with that hash or decision id.noCheck the identifier.
410expiredEvidence pack share link has expired.noGenerate a new pack.
422invalid_requestBody is not valid JSON or a required field is missing.noFix the request; detail names the field.
429rate_limitedLocal or global window exhausted. retry_after is in seconds.yesHonour retry-after, then back off.
500internal_errorUnexpected failure. No decision was returned.yesTreat as deny; retry with the same idempotency key.

Retries and idempotency

Send an idempotency_key with every request that might be retried. A replay returns the original decision with replayed: true and the same record hash, so a retry can never produce two authorizations for one action.

A retry is not a new decision. If the first call returned deny, retrying with a fresh idempotency key asks a new question and may get a different answer. Do that deliberately, never as error handling.
A decision you can verify right now
permanent demo decisionALLOW
action
refund.create · $180
rule
Refunds up to 250 USD
record
seq 1
sha-256
078506dc86…8a5948
statement
anchored
receipt
moment-j5xx23u1
dec_demo_permanent

Cite: Aprve decision dec_demo_permanent, seq 1, sha-256 078506dc868d5413af74db8267801c4bf602dea47d0446ef97ca517d5e8a5948