Skip to main content
POST
/
chats
/
{chat_id}
/
approvals
Resume a paused chat after tool approval
curl --request POST \
  --url https://{subdomain}.withrealm.com/api/external/alpha/chats/{chat_id}/approvals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assistant_message_id": "<string>",
  "responses": [
    {
      "tool_call_id": "<string>",
      "approved": true,
      "reason": "<string>"
    }
  ]
}
'
{
  "assistant_id": "<string>",
  "agent_id": "<string>",
  "created": 123,
  "created_date": "<string>",
  "content": "<string>",
  "research_mode": true,
  "output_format": "markdown",
  "status": "completed",
  "id": "<string>"
}

When to use this endpoint

Use this endpoint after POST /chats returns status: "approval_required" or POST /chats-streaming emits a tool_approval_request event. Submit approval decisions for the pending tool calls to continue the same chat.

Rate Limits

600 requests per minute.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chat_id
string
required

The ID of the chat that is currently paused waiting for tool approval.

Body

application/json
assistant_message_id
string
required

The paused assistant message that is awaiting approval

responses
object[]
required

Approval decisions keyed by tool call id

Response

Success

assistant_id
string
required

Deprecated. Use agent_id instead.

agent_id
string
required

The ID of the agent that processed the request

created
number
required

Unix timestamp in milliseconds of when the completion was created

created_date
string
required

ISO 8601 formatted timestamp of when the completion was created

content
string
required

The content of the chat

research_mode
boolean
required

If research mode was used for this chat. The agent configuration can override the user requested value.

output_format
enum<string>
required

The format of the content returned

Available options:
markdown,
text
status
enum<string>
required

The chat completed successfully

Available options:
completed
id
string

Unique identifier for the chat