Conversations
Resolve Tool Approval Confirmation
POST
/api/conversations/{conversation_id}/approvals/{approval_id}Overview
Resolves a pending tool execution approval by either confirming or rejecting the paused action, resuming the conversation run.
When the agent pauses on several tool calls at once (parallel tool calls), answer all of them in one request: put one decision in approved and the rest in decisions. The run resumes once, after every decision is applied. Answering them in separate requests lets the agent continue while the others are still pending.
Authentication & Headers
- Auth: Bearer Token
- Required Header:
API-Version: 1 - Optional Header:
X-Pinter-Response-Format(comma-separated tokens):jsonreturns a collected JSON response;blocksorblocks,openuistreams blocks and OpenUI fences.
Path Parameters
conversation_id(string, required): Unique identifier of the conversation session.approval_id(string, required): Unique identifier of the pending tool approval request (theapproval_idfrom theapproval_requiredevent). May contain/,+or=, so the route accepts it as a path.
Request Body
approved(boolean, required):trueto approve tool execution,falseto reject. Applies to theapproval_idin the path.agent_id(string, required): ID of the active agent executing the conversation.stream(boolean, optional, default: true): Whether to stream subsequent execution events via SSE.approval_mode(string, optional, default:full-access): Mode for the resumed turn, same meaning as on send. Withfull-access, tools the agent calls after this resume run without a new confirmation. An explicit answer to a pending approval is always honored, including a rejection.decisions(array, optional, default:[]): Decisions for the other pending approvals of the same turn, resumed together with the path approval. Each item is{ "approval_id": string, "approved": boolean }. An entry that repeats the pathapproval_idis ignored.
Example: two parallel tool calls
POST /api/conversations/{conversation_id}/approvals/appr_a
{
"approved": true,
"agent_id": "agent-1",
"stream": true,
"decisions": [{ "approval_id": "appr_b", "approved": false }]
}
If any listed approval is not found (404) or already resolved (409), the whole request is rejected and nothing is resumed.
Parameter
Path
conversation_idstringwajibUnique UUID of the conversation session / thread.
approval_idstringwajibHeader
x-pinter-response-formatstringComma-separated response mode tokens. `blocks`: structured rich response blocks (charts, html, images, followup). `blocks,openui`: same as `blocks` plus openui-lang UI fences inside text deltas. `json`: collected JSON response.
Body permintaan
application/json
approvedbooleanwajibagent_idstringwajibstreambooleanapproval_modeenumapprovalfull-accessdecisionsobject[]decisions[].approval_idstringwajibdecisions[].approvedbooleanwajib{
"approved": true,
"agent_id": "string",
"stream": true,
"approval_mode": "full-access",
"decisions": []
} Respons
200 SSE event stream resuming agent turn, or collected JSON response
400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).
401 Unauthorized - Missing, invalid, or expired JWT Bearer token.
403 Forbidden - Insufficient role permissions or resource access denied by RBAC policy.
404 Conversation, active session, or any listed pending approval not found
409 Any listed approval has already been resolved
422 Validation Error
detailobject[]detail[].locstring | integer[]wajibdetail[].msgstringwajibdetail[].typestringwajibdetail[].inputobjectdetail[].ctxobject{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Contoh
curl -X POST "$PINTER_URL/api/conversations/018f3a55-234b-76b9-b8d1-561b34e2a101/approvals/<approval_id>" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"approved":true,"agent_id":"string","stream":true,"approval_mode":"full-access","decisions":[]}'