REST APIError Reference

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

HTTPCodeMeaning · next step
401NO_TOKENNo credentials — send Authorization: Bearer rgnt_… (an org API key; a rgnt_ctrl_… control key is for control-api and the gateway, see Authentication)
401INVALID_TOKEN / INVALID_API_KEYExpired or wrong credential — issue a new key
403NOT_MEMBERYour key belongs to a different organization than the one in the path
403INSUFFICIENT_ROLEThe action needs a higher org role (e.g. revoke needs admin)
403EMAIL_NOT_VERIFIEDConfirm your email before registering agents
403KYC_NOT_VERIFIEDComplete identity verification before registering agents or issuing mandates
429RATE_LIMITEDHonor Retry-After. Current per-IP limits: 30 req/s (burst 20); login/signup 5/min

Input validation

HTTPCodeMeaning · next step
422AGENT_ID_MALFORMEDagent_id isn’t the canonical agent_… identifier. The message names the common mistake: passing the record UUID from the registration response
404AGENT_NOT_FOUNDNo such agent in this organization (also returned for agents of other orgs)
404MANDATE_NOT_FOUNDNo such mandate
400KEY_REQUIREDThis 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
401SIGNATURE_REQUIREDThis 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
401SIGNATURE_INVALIDThe request carries a signature that does not verify for this agent’s registered keys
422ASK_TOO_LARGEAn 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
403PAYEE_UNRESOLVEDGateway: 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
403AMOUNT_UNRESOLVEDGateway: 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
403AGENTCARD_LIVE_IN_SANDBOXConsole: 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.

CodeMeaning · next step
MANDATE_LIMIT_EXCEEDEDThe 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_SUSPENDEDThe kill switch: the agent was revoked and its mandates suspended. Stop all activity
MANDATE_REVOKED / MANDATE_EXPIREDThis mandate is gone — a new one must be issued and approved
MANDATE_NOT_OWNEDcaller_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_UNKNOWNThe purchase named a currency outside Regent’s registry (GET /v1/currencies)
SANDBOX_CEILING_EXCEEDED / SANDBOX_CEILING_UNKNOWNAbove the sandbox ceiling for the currency / a currency a sandbox cannot pay in
SANCTIONED_COUNTERPARTYThe 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_ACTIVEThe agent’s identity record is not active (revoked or pending)
RISK_SCORE_TOO_HIGHGuardian’s behavioural score crossed the hard-reject threshold
IDENTITY_UNREACHABLEThe identity service could not confirm the agent — fail-closed refusal, safe to retry once the service recovers
JWT_ISSUE_FAILEDAuthorization 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

HTTPCodeMeaning · next step
403 (gateway) / raised (SDKs)INTERNAL_ERRORRegent 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)
402VELOCITY_EXCEEDEDToo many decisions for this agent in the window. Back off; do not retry in a loop
402DUPLICATE_REQUESTAn identical money request was allowed moments ago and this one carried no idempotency_key. Check that decision; pass a key for a deliberate repeat
402ESCALATION_REQUIREDNot 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
202PROVIDER_APPROVAL_PENDINGGateway, 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