Skip to main content

Endpoint

Agent endpoint to poll the current approval state of a request that was blocked by risk assessment (428 response from POST /proxy).

Authentication

Requires Agent-Key header with valid agent API key.

Path Parameters

string
required
Unique identifier for the approval queue entry. Returned in the action_id field of a 428 Risk-Blocked response.Example: act_7f8e9d0c1b2a3456

Response States

The response shape varies based on the current status of the approval queue entry.

PENDING

Request is awaiting human approval.
string
"PENDING"
string
The action identifier
string
ISO 8601 timestamp when the request was created

APPROVED

Request has been approved and is ready to execute.
string
"APPROVED"
string
The action identifier
string
URL to execute the approved request: /proxy/execute/:actionId

DENIED

Request was denied by a human reviewer.
string
"DENIED"
string
The action identifier
string
ISO 8601 timestamp when the request was denied (nullable)

EXPIRED

Approval has expired (TTL exceeded before execution).
string
"EXPIRED"
string
The action identifier

EXECUTED

Request has been executed and the result is available.
string
"EXECUTED"
string
The action identifier
object
The cached response from the executed request
number
HTTP status code from the target service
object
Response headers from the target service
string
Response body from the target service

Error Responses

Invalid or missing Agent-Key header
  • Action not found
  • Action belongs to a different agent (ownership check)
Unknown action status or server error

Examples

Polling Strategy

When a request is blocked (428 response), implement a polling loop:
  1. Extract action_id from the 428 response
  2. Poll GET /status/:actionId with exponential backoff
  3. Check the status field:
    • PENDING: Continue polling
    • APPROVED: Call POST /proxy/execute/:actionId to execute
    • DENIED: Handle denial (e.g., log, alert, abort)
    • EXPIRED: Resubmit via POST /proxy if still needed
    • EXECUTED: Use the cached result from the response

Ownership Security

The endpoint implements strict ownership checks:
  • Only the agent that created the request can view its status
  • Returns 404 for both “not found” and “wrong agent” cases
  • Prevents information disclosure about other agents’ requests

State Transitions

  • PENDING → APPROVED: Human approves the request
  • PENDING → DENIED: Human denies the request
  • PENDING → EXPIRED: Approval TTL expires before decision
  • APPROVED → EXECUTED: Agent calls POST /proxy/execute/:actionId
  • APPROVED → EXPIRED: Execution TTL expires before agent executes