POST /v1/sessions/{session_id}/tool-approvals
const url = 'https://app.everruns.com/api/v1/sessions/example/tool-approvals';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"decisions":[{"decision":"allow","tool_call_id":"tool_approval_toolu_01933b5a00007000800000000000001"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.everruns.com/api/v1/sessions/example/tool-approvals \ --header 'Content-Type: application/json' \ --data '{ "decisions": [ { "decision": "allow", "tool_call_id": "tool_approval_toolu_01933b5a00007000800000000000001" } ] }'Records a person’s decisions about tool calls an agent’s tool_approval
gate held back, and resumes the paused turn.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Session ID (prefixed, e.g., session_…)
Request Bodyrequired
Section titled “Request Bodyrequired”Request to answer pending tool-approval requests.
object
Decisions for the pending requests. A pending request in the same batch that is left out is resolved as not approved: the turn resumes once, so every request in it is settled now, and silence never approves.
One decision in a submission.
object
The person’s decision.
The approve_tool_call call being answered.
Example
tool_approval_toolu_01933b5a00007000800000000000001Responses
Section titled “Responses”Decisions recorded and workflow resumed
Result of answering tool-approval requests.
object
How every pending request in the batch was settled.
How one pending request was settled.
object
allow, allow_always, reject, reject_always, not_approved
(left out of the submission) or expired.
The gated tool.
The approve_tool_call call that was answered.
Session status after the decision.
Example
{ "resolved": [ { "outcome": "allow" } ], "status": "active"}Invalid session ID or decisions
Caller may not manage this session
Session or pending approval request not found
Session is not waiting, the request expired, or it was already answered
Internal server error