POST /v1/chat/resume
Purpose
This endpoint resumes an execution after a tool approval request.
Request
http
POST /v1/chat/resume
Authorization: Bearer km_your_token_here
Content-Type: application/jsonMinimal example
json
{
"model": "group:123e4567-e89b-12d3-a456-426614174000",
"approval_id": "86dd028d-6f5c-4f13-83db-d4fe9bc5b865",
"approved_tool_execution_ids": [
"1fb2fd25-8f78-412a-a0b8-7976e3700fc4"
],
"messages": [
{
"role": "user",
"content": "Continue with the action."
}
]
}Additional fields
In addition to the fields supported by POST /v1/chat/completions, this endpoint accepts:
| Field | Type | Required | Notes |
|---|---|---|---|
approval_id | string | yes | UUID returned during approval |
approved_tool_execution_ids | array<string> | no | UUIDs of approved tools |
denied_tools | array<object> | no | denied tools with an optional reason |
Deny a tool
Example with a denial:
json
{
"model": "group:123e4567-e89b-12d3-a456-426614174000",
"approval_id": "86dd028d-6f5c-4f13-83db-d4fe9bc5b865",
"denied_tools": [
{
"tool_execution_id": "1fb2fd25-8f78-412a-a0b8-7976e3700fc4",
"reason": "The action was not approved."
}
],
"messages": [
{
"role": "user",
"content": "Do not execute that action."
}
]
}Response
The response follows the same general rules as POST /v1/chat/completions:
- standard JSON when
streamis absent orfalse - SSE when
streamistrue - another
tool_callsstep can appear if a new approval round is required
Important points
- keep
approval_idavailable until the full flow is finished - send only the
tool_execution_idvalues that belong to the approval request being resumed - keep approval and denial handling explicit on the client side