Skip to main content
When a call matches an identity’s approval rules, it is held: Naive does not run it, and answers 202 with an approval. A person approves or denies it; on approve, Naive runs the original request once, as the original key, and records the result. In the console, Approvals has two lists: Pending and History. “Change what asks first” takes you to the identity’s rules.

The approval object

string
apr_…
string
Always approval.
string
pending, approved, denied, expired, executed (approved and run) or failed (approved, but the run failed or the key no longer allows it).
string
The rule’s action, e.g. domain.buy, trade.place.
string
A one-line description, e.g. “Buy acme-labs.com for $12.00”.
string | null
The identity the call was for, or null for a workspace resource.
integer | null
The amount the rule was checked against.
object
{ method, path, body_redacted } — what will run. Message text and other sensitive fields are redacted.
object
{ kind: "key" | "mcp", id, name } — who asked.
object
{ source: "identity" | "workspace", value } — the rule that held it.
object | null
{ id, email } of the person who decided.
string | null
When it was decided.
string | null
The approver’s note or the denial reason.
object | null
After an approved run: { status, body, request_id } — the response the original call would have returned.
string
A pending approval expires 24 hours after it is created and is then never run.
string
When the call was held.
A key or connection can have at most 50 pending approvals at once.

List approvals

GET /v1/approvals — scope approvals:read (a key with audit:read also works). Filter with ?status= and ?identity=. The page includes total, the count for the filter (the console’s badge).

Get one approval

GET /v1/approvals/{id} — scope approvals:read. Also available to MCP clients as approvals_get.

Wait for a decision

POST /v1/approvals/{id}/wait — scope approvals:read. A long poll: it answers as soon as the approval is decided, or after timeout_ms (at most 25000) with the approval still pending. Call it again to keep waiting. MCP clients use approvals_wait.
integer
How long to wait, up to 25000 milliseconds.

Approve or deny

POST /v1/approvals/{id}/approve (body { "note"?: string }) and POST /v1/approvals/{id}/deny (body { "reason"?: string }). People only: a signed-in owner or admin. Keys and MCP connections are refused with 403 forbidden, so an agent cannot approve its own request. The console calls these for you. From your own back office, a person’s session token can call client.approvals.approve(id, { note }) and client.approvals.deny(id, { reason }). Approve runs the original request. If the key was revoked, expired or narrowed in the meantime, the approval ends failed instead. The run uses the approval id as its idempotency key, so it can never run twice.

Handling a held call in your code

client.tools.run returns the approval by default; pass approvals: "wait" to block until it is decided, or approvals: "throw" to get an ApprovalRequiredError carrying .approval. Older SDK namespaces throw ApprovalRequiredError. Held calls only happen in developer workspaces, so existing integrations never see one.

Notifications and webhooks

Owners and admins can be emailed when an approval is requested; the setting is in Settings. Subscribe a webhook explicitly to approval.requested and approval.decided to get { approval_id, action, identity_id, status }. See Webhooks.

From the CLI