Every non-2xx response has one shape:
{"detail": {"code": "MANDATE_LIMIT_EXCEEDED", "category": "PER_TX", "message": "…", "authorization_id": "…"}}Codes are stable strings — match on detail.code, never on the message text.
Every error wears this envelope, including request validation: a malformed body or path
answers 422 with detail.code = "VALIDATION_ERROR", a message naming the first problem
(agent_id: Field required (+1 more)) and errors[] with loc, msg, type for each. An
unexpected failure answers 500 with detail.code = "INTERNAL_ERROR" and the correlation id
in the headers. Gateway tool calls (/gw/…, MCP) answer refusals flat — {"decision", "code", "reason", "decision_id"} — because there the agent reads a verdict, not an API error.
This page is generated against the live service contracts; codes listed here are the
ones the API actually emits.
Authentication & access
| HTTP | Code | Meaning · next step |
|---|---|---|
| 401 | NO_TOKEN | No credentials — send Authorization: Bearer rgnt_… (an org API key; a rgnt_ctrl_… control key is for control-api and the gateway, see Authentication) |
| 401 | INVALID_TOKEN / INVALID_API_KEY | Expired or wrong credential — issue a new key |
| 403 | NOT_MEMBER | Your key belongs to a different organization than the one in the path |
| 403 | INSUFFICIENT_ROLE | The action needs a higher org role (e.g. revoke needs admin) |
| 403 | EMAIL_NOT_VERIFIED | Confirm your email before registering agents |
| 403 | KYC_NOT_VERIFIED | Complete identity verification before registering agents or issuing mandates |
| 429 | RATE_LIMITED | Honor Retry-After. Current per-IP limits: 30 req/s (burst 20); login/signup 5/min |
Input validation
| HTTP | Code | Meaning · next step |
|---|---|---|
| 422 | AGENT_ID_MALFORMED | agent_id isn’t the canonical agent_… identifier. The message names the common mistake: passing the record UUID from the registration response |
| 404 | AGENT_NOT_FOUND | No such agent in this organization (also returned for agents of other orgs) |
| 404 | MANDATE_NOT_FOUND | No such mandate |
| 400 | KEY_REQUIRED | This enrolment invite requires the agent’s own key (regent-control keys generate); ask the owner for an invite that allows a bearer credential if the agent has no key store |
| 401 | SIGNATURE_REQUIRED | This agent acts only under its own signature (promised at enrolment): sign the request with the registered key — the SDK does when a signing key is configured |
| 401 | SIGNATURE_INVALID | The request carries a signature that does not verify for this agent’s registered keys |
| 422 | ASK_TOO_LARGE | An agent’s mandate request is above the ask ceiling for that currency and window (field, asked, ceiling in the detail); ask for less, or have the owner set the budget in the console |
| 403 | PAYEE_UNRESOLVED | Gateway: the tool’s payee_from source names no counterparty for this request (a missing body: field, a lookup without the merchant, an Agentcard cart with no store); failing closed |
| 403 | AMOUNT_UNRESOLVED | Gateway: the amount to decide on cannot be read from the request (an Agentcard confirm whose cart hash is not on the conversation or that spans two stores; a Stripe line priced by a metered price, or a path the operations map does not name); failing closed |
| 403 | AGENTCARD_LIVE_IN_SANDBOX | Console: a sandbox organization tried to link a live Agentcard card; take the organization live first (Agentcard) |
Authorization refusals (HTTP 402)
Every refusal happens before execution — no money has moved. The refusal itself is recorded and auditable.
| Code | Meaning · next step |
|---|---|
MANDATE_LIMIT_EXCEEDED | The amount breaks a per-transaction, daily, monthly, per-entity, or relational limit — category names the window and the message says which. Don’t retry the same amount; surface to the operator |
MANDATE_SUSPENDED | The kill switch: the agent was revoked and its mandates suspended. Stop all activity |
MANDATE_REVOKED / MANDATE_EXPIRED | This mandate is gone — a new one must be issued and approved |
MANDATE_NOT_OWNED | caller_agent_id doesn’t match the mandate’s agent — one agent cannot spend against another’s mandate |
MANDATE_NOT_FOUND (gate) | No active mandate for the agent in the purchase currency; the response’s currency names it — ask for a budget in that currency |
CURRENCY_UNKNOWN | The purchase named a currency outside Regent’s registry (GET /v1/currencies) |
SANDBOX_CEILING_EXCEEDED / SANDBOX_CEILING_UNKNOWN | Above the sandbox ceiling for the currency / a currency a sandbox cannot pay in |
SANCTIONED_COUNTERPARTY | The executing rail screened the counterparty’s address against OFAC’s SDN list and found it there (x402, real money). Money never moves to it; nothing to retry |
AGENT_NOT_ACTIVE | The agent’s identity record is not active (revoked or pending) |
RISK_SCORE_TOO_HIGH | Guardian’s behavioural score crossed the hard-reject threshold |
IDENTITY_UNREACHABLE | The identity service could not confirm the agent — fail-closed refusal, safe to retry once the service recovers |
JWT_ISSUE_FAILED | Authorization passed but the proof token could not be minted — fail-closed refusal, retry |
Until 2026-10-03 the payment service emitted the bare code LIMIT_EXCEEDED on this endpoint while the
control gate already used MANDATE_LIMIT_EXCEEDED; both surfaces now emit MANDATE_LIMIT_EXCEEDED. Match on the new name.
Transport and availability
| HTTP | Code | Meaning · next step |
|---|---|---|
| 403 (gateway) / raised (SDKs) | INTERNAL_ERROR | Regent could not be reached or answered 5xx: the gate fails closed, no provider was called, no money moved, no receipt exists. Retry with the same idempotency_key after a short back-off; a replay never decides twice (Latency and failure) |
| 402 | VELOCITY_EXCEEDED | Too many decisions for this agent in the window. Back off; do not retry in a loop |
| 402 | DUPLICATE_REQUEST | An identical money request was allowed moments ago and this one carried no idempotency_key. Check that decision; pass a key for a deliberate repeat |
| 402 | ESCALATION_REQUIRED | Not an error: a person must approve. Stop, point the owner at the request, retry the same call with the same idempotency_key after the answer |
| 202 | PROVIDER_APPROVAL_PENDING | Gateway, not an error: Regent allowed the call and the provider’s own approval rule paused it (a Stripe agent-tagged key under an approval rule). Do not retry — the provider runs the action itself once its reviewer approves; the body carries the provider’s code, its approval request id and request log; the decision id is in X-Regent-Decision-Id. A rejected or expired request is learnt from the provider and the decision voided |