Approve a tool call
Approve the exact pending invocation and let its execution continue.
/api/v1/tool-approvals/:id/approveUse the pending tool call’s id, not the execution ID. After this decision, read the execution using the returned executionId.
const response = await fetch("https://api.smallworld.sh/api/v1/tool-approvals/b5212df0-ea8b-4eb8-a7b1-057ff45b3044/approve", {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
Use your server-side apiKey. Replace the example IDs.
Path parameters#
idUUIDrequiredThe pending tool-call ID from toolCalls or the tool-approvals list.
Request body#
rememberbooleanDefaults to false. true saves an Allow override for this user and tool across Worlds; list and remove it with /users/:userId/tool-policies. It never shows a tool hidden for the workspace or the World, or an integration that is turned off, and it has no effect in sessions of a group that sets its own policy for the tool.
Responses#
The exact invocation was approved. The provider result is not yet available; read the execution to continue.
{
"id": "b5212df0-ea8b-4eb8-a7b1-057ff45b3044",
"sessionId": "01995e57-0501-76b8-b797-5b24df5b307f",
"executionId": "01995e57-3027-7557-a233-009ea3dcd8fc",
"userId": "customer_123",
"worldId": "01995e56-e2d4-7f19-b691-7bf9af6abdc8",
"integration": "acme",
"integrationName": "Acme",
"account": null,
"connectionSource": "none",
"group": null,
"toolName": "get_order",
"toolDescription": "Read an order by its ID.",
"toolLabel": "read",
"arguments": {
"orderId": "order_456"
},
"status": "approved",
"result": null,
"error": null,
"errorCode": null,
"reason": null,
"providerApproval": null,
"hooks": [],
"createdAt": "2026-10-10T12:00:00.000Z",
"expiresAt": "2026-10-10T12:15:00.000Z",
"completedAt": null,
"decidedAt": "2026-10-10T12:00:01.000Z"
}
More about this endpoint
Omit the body or send {} to approve only this call. Arguments cannot be changed through the approval endpoint.
Use this endpoint while providerApproval is null or absent. A provider prompt requires its own offered choice through /tool-approvals/:id/provider/:approvalId.
Present the integration, tool, and recorded arguments to the user before approving. The returned approval is not the provider's final result; poll the execution for completion.
Repeating the same decision without remember returns the stored call and does not dispatch a second provider call. Repeating a decision with remember: true returns a conflict.
If the tool was hidden or its integration turned off after the call was made, approval returns approval_policy_denied and the call stays pending. Deny it or let it expire.
Approving a mount's changes saves them, unless someone else changed a file they touch in the meantime; the execution's mountChanges says which. remember is ignored for them: a mount's settings live only on the mount. Editing or deleting the mount, or the user losing it, while its changes wait interrupts the approval, and approving then returns approval_interrupted.