Agent Governance Protocol
API ReferenceDecision APIApprovals

Request approval

Approval requests are always asynchronous (§7.2). Returns 202 and an AsyncOperation.

POST
/agp/approval-requests

Authorization

AuthorizationBearer <token>

In: header

Scope: agp.decision.read, agp.decision.write

Header Parameters

Idempotency-Key?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/agp/approval-requests" \  -H "Content-Type: application/json" \  -d '{    "request_id": "string",    "decision_ref": "string",    "requested_at": "2019-08-24T14:15:22Z"  }'
{  "request_id": "string",  "decision_ref": "string",  "status": "pending",  "requested_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "requested_approvers": [    "string"  ],  "approval_mode": "single",  "requested_scope": [    "string"  ],  "expires_at": "2019-08-24T14:15:22Z",  "approval_ref": "string",  "operation_id": "string",  "callback_url": "http://example.com"}
{  "error": {    "code": "AGP_INVALID_REQUEST",    "message": "string",    "retryable": true,    "details": {}  }}
{  "error": {    "code": "AGP_INVALID_REQUEST",    "message": "string",    "retryable": true,    "details": {}  }}
{  "error": {    "code": "AGP_INVALID_REQUEST",    "message": "string",    "retryable": true,    "details": {}  }}
{  "error": {    "code": "AGP_INVALID_REQUEST",    "message": "string",    "retryable": true,    "details": {}  }}