Approvals API
The human approval queue and its decisions.
An approval is bound to the specific request that created it. Approving does not grant the agent a standing permission, and an approval cannot be replayed against a different request. Waiting for one is the caller’s choice, not the gateway’s: a batch job can block until a reviewer decides, but a conversational agent must not, because a chat turn times out in seconds and an approval can take a quarter of an hour. Such an agent defers instead — it is told at once that a human must decide, says so, and picks the decision up on a later turn. How it picks it up depends on the protection: a wrapped tool is run by the SDK once the decision lands, while a protected block of statements, which the SDK never holds, completes when the agent reaches it again. An approval is consumed the first time it is used and refused thereafter, so a decision that reaches the agent twice still only happens once.
#Endpoints
| Endpoint | Permission | Notes | |
|---|---|---|---|
GET |
/v1/approvals |
approval:read |
— |
GET |
/v1/approvals/{approvalId} |
approval:read |
— |
POST |
/v1/approvals/{approvalId}/approve |
approval:approve |
— |
POST |
/v1/approvals/{approvalId}/deny |
approval:deny |
— |
POST |
/v1/approvals/{approvalId}/cancel |
approval:configure |
— |
#What each endpoint does
#GET /v1/approvals
List approvals.
Requires approval:read.
#GET /v1/approvals/{approvalId}
Approval card with full decision context.
Requires approval:read.
#POST /v1/approvals/{approvalId}/approve
Approve. May require step-up.
Requires approval:approve.
#POST /v1/approvals/{approvalId}/deny
Deny with a reason.
Requires approval:deny.
Request body:
json{
"reason": "string"
}
#POST /v1/approvals/{approvalId}/cancel
Withdraw a waiting request without deciding it; the action will not happen.
Requires approval:configure.
Request body:
json{
"reason": "string"
}