Approve or decline a run
Approve or decline the action a run is waiting on.
Accepts the end-user's chat token or a tenant API key. 202: the run
resumes and its answer arrives on the same stream. 404
run_not_found when the run is not yours; 409 run_not_waiting
when it is not waiting for a decision (already decided, finished,
or never paused); 422 when remember is sent with denied, over an
API key, or for a run outside a conversation.
Path Parameters
run_id*Run Id
Format
uuidHeader Parameters
x-api-key?string|null
origin?string|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /v2/runs/{run_id}/approval (tool-approval §4.3, M6-A).
Response Body
application/json
application/json
curl -X POST "https://example.com/v2/runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/approval" \ -H "Content-Type: application/json" \ -d '{ "outcome": "approved" }'{ "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "attempt": 0, "conversation_id": "cc71b11a-25cd-4c2d-9950-df2cc38e3407", "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6", "end_user_id": "c5ac076e-1e7a-4f0d-9ad4-cae618230def", "error": "string", "finished_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "input": "string", "kind": "string", "max_attempts": 0, "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "result": {}, "serial_key": "string", "started_at": "2019-08-24T14:15:22Z", "state": "string", "waiting_until": "2019-08-24T14:15:22Z"}