Developer documentation
Errors and failed checks
Handle transport errors separately from identity and mandate decisions. A failed check is never evidence that access is allowed.
HTTP status codes
Most public JSON errors use error.code and include apiVersion and notPermission. The agent key directory returns { keys } on success and { error: { code } } on failure, without that metadata. Agent-Token minting errors use a flat error string with apiVersion and notPermission. A 200 mandate answer can still refuse an act; inspect decision.
The reference page for each operation lists the statuses in its OpenAPI contract.
| Status | Meaning | What to do |
|---|---|---|
| 400 / 422 | Invalid input | Fix the request fields before retrying. |
| 401 / 403 | Missing proof or insufficient authority | Check the signing proof or control key scope. |
| 404 | Unknown or unpublished resource | Check the ID. Do not assume the resource exists. |
| 409 | Conflict or ambiguous passport | Inspect error.code. Do not choose an identity yourself. |
| 413 / 415 | Body too large or wrong content type | Send the documented JSON shape and size. |
| 429 | Request limit reached | Wait for Retry-After before retrying. |
| 501 | Signing is not configured | The issuer must configure signing before minting Agent-Tokens. |
| 503 | Check unavailable | Retry later. Do not treat the result as active or inside. |
Verifier reason strings
verifyAgent and verifyAgentRequest return ok: false with a reason. Reasons depend on the helper. They are not HTTP status codes.
| Reasons | What to do |
|---|---|
| untrusted_issuer / invalid_options | Fix your trusted issuer configuration. Never trust an issuer selected by a token. |
| unknown_key | Refuse the key. A directory HTTP 404 includes unknown or stopped agents; it is not an availability failure. |
| jwks_unreachable / directory_unavailable | Check issuer availability. Network errors and directory 5xx responses are unavailable; fail closed. |
| bad_signature / malformed / claims | Refuse the request. Check token and signature serialization. |
| wrong_type / unsupported_version / unsupported_algorithm | Use the documented token or request-signature profile. |
| wrong_audience | Mint a token for your exact receiving service. |
| expired / not_yet_valid / too_old | Check clocks and obtain a fresh proof. Do not extend the acceptance window. |
| revoked | Refuse the passport. |
| stale_revocations / revocation_unavailable | Obtain a signed list within your freshness limit. Do not accept stale data. |
| replay | Refuse the repeated request. Check nonce reuse or store capacity. |
Mandate decisions
inside means the owner's current clauses cover the signed act. It does not grant your service's permission. clause is a zero-based rule index. remaining reports what is left after the decision.
outside can include total, count, currency, per_act, mandate_changed, invalid_proof, unsigned_intent, replay, cannot_count, trial, clause, not_started, not_found or invalid_passport. A stale public hash can include narrowed_since. Fetch current clauses and obtain a fresh signature when the intent changes.
revoked, expired and stopped refuse the act. The helper returns refused when it rejects inputs or the Agent-Token before calling the live check: invalid_issuer, invalid_token, missing_mandate or invalid_request. Token validation may fetch JWKS first. unavailable means the live check could not complete, including key-fetch, network, timeout, response size or non-success HTTP errors. Handle all of these without performing the act.
Do not blindly retry a new committing proof after an uncertain response. A different signed request is a different act. Keep the original proof and reconcile its outcome.