Overview
The approvals API manages human-in-the-loop workflows for sensitive operations. When a policy decision isask or require_approval, the tool call is queued pending human review.
Approvals expire after 1 hour by default (configurable with
--approval-timeout).Endpoints
List Approvals
run_id.
Request Headers
Bearer token for authentication
Response Fields
Array of pending approval objects
Array of run groups (runs with 2+ pending approvals)
Example
Get Single Approval
Path Parameters
Approval ID
Request Headers
Bearer token for authentication
Response Fields
Approval ID
Tool name
Command or path
Agent identifier
Session identifier
Decision message
Status:
pending, approved, or deniedISO 8601 timestamp
ISO 8601 timestamp
ISO 8601 timestamp (only if resolved)
Resolver identifier (only if resolved)
Example
Status Codes
| Status | Meaning |
|---|---|
200 OK | Approval found |
401 Unauthorized | Missing or invalid token |
404 Not Found | Approval not found |
Create Approval
This endpoint is typically used by integrations that need to create approvals outside of the normal tool evaluation flow.
Request Headers
Bearer token for authentication
Must be
application/jsonRequest Body
Tool name (e.g.,
exec, read, write)Agent identifier
Human-readable reason for approval request
Command to execute (for
exec tool)File path (for
read/write tools)Run identifier for grouping
Response Fields
Created approval ID
Status:
pending or approved (auto-approved if run is bulk-approved)ISO 8601 timestamp when approval expires
Additional message (only for auto-approved cases)
Example
Status Codes
| Status | Meaning |
|---|---|
201 Created | Approval created |
200 OK | Auto-approved by run cache |
400 Bad Request | Invalid JSON |
401 Unauthorized | Missing or invalid token |
503 Service Unavailable | Approval queue full |
Resolve Approval
Path Parameters
Approval ID to resolve
Request Headers
Bearer token (not required if valid signed
sig + exp query params are provided)Must be
application/jsonRequest Body
true to approve, false to denyIdentifier of the resolver (e.g.,
security-team, api, cli). Defaults to api.If
true and approved is true, adds an auto-allow rule to ~/.rampart/policies/auto-allowed.yamlResponse Fields
Approval ID
New status:
approved or deniedWhether the approval was granted
Whether an auto-allow rule was created
Example — Approve
Example — Deny
Example — Approve and Persist
When
persist: true, Rampart adds an auto-allow rule to ~/.rampart/policies/auto-allowed.yaml so future identical tool calls are automatically approved.Status Codes
| Status | Meaning |
|---|---|
200 OK | Approval resolved |
400 Bad Request | Invalid JSON |
401 Unauthorized | Invalid token/signature |
404 Not Found | Unknown approval ID |
410 Gone | Approval already resolved (replay attempt) |
Bulk Resolve
run_id.
Request Headers
Bearer token for authentication
Must be
application/jsonRequest Body
Run identifier — all pending approvals with this
run_id will be resolvedMust be
approve or denyResolver identifier. Defaults to
api.Response Fields
Number of approvals resolved
Array of resolved approval IDs
Example
Status Codes
| Status | Meaning |
|---|---|
200 OK | Bulk resolve completed |
400 Bad Request | Missing/empty run_id or invalid action |
401 Unauthorized | Missing or invalid token |
When you bulk-approve a run, the
run_id is cached. Subsequent tool calls with the same run_id are automatically approved without creating new approvals.Signed URL Authorization
When server-side signing is enabled (rampart serve --sign), approval resolution can be authorized via HMAC-signed URLs instead of bearer tokens.
Example Signed URL
sig— HMAC signatureexp— Unix timestamp when the signature expires
Usage
Signed URLs are single-use and time-limited. They’re included in webhook notifications when signing is enabled.
Common Use Cases
Approval Dashboard
Bulk Approve CI Runs
Next Steps
Events
Real-time event streaming
Status
Server status and health