Skip to content

Submit Client Tool Results (Callback)

POST
/api/v3/organizations/{organisation}/ai/chat/callback

Submit tool execution results to resume a suspended durable execution. * * When to use: When polling the execution status returns waiting_callback, use this endpoint * to submit the results of client-executed tools. The execution will then resume. * * Flow: * 1. Start async chat with client-executed tools (autoExecute: [] or tools not in autoExecute list) * 2. Poll status until waiting_callback * 3. Execute tools locally using pendingTools from status response * 4. Submit results here with the callbackId * 5. Poll status until complete * * Important: Each callbackId can only be used once. After submission, poll the execution * status to see the updated state.

Authorizations

Parameters

Path Parameters

organisation
required
string

The organisation ID

Request Body required

object
callbackId
required

The callbackId from the waiting_callback status response

string
Ab9hZXi/YXJuOmF3czpsYW1iZGE...
toolResults
required

Results of client-executed tools

Array<object>
object
toolUseId
required

The toolUseId from pendingTools

string
toolu_bdrk_012KTC8NCG...
result
required

The result of executing the tool

object
{
"temperature": "24C",
"conditions": "Sunny"
}

Responses

200

Callback submitted successfully, execution will resume

object
success
boolean
true
message
string
Callback submitted successfully
callbackId

Echo of the callbackId for confirmation

string

400

Invalid request (missing callbackId or toolResults)

403

Access denied

404

Callback not found or already processed

500

Failed to submit callback