Skip to content

Submit Client Tool Results (Callback)

POST
/api/v3/organizations/{organisation}/ai/chat/callback
curl --request POST \
--url https://dashboard.quantcdn.io/api/v3/organizations/example/ai/chat/callback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "callbackId": "Ab9hZXi/YXJuOmF3czpsYW1iZGE...", "toolResults": [ { "toolUseId": "toolu_bdrk_012KTC8NCG...", "result": { "temperature": "24C", "conditions": "Sunny" } } ] }'

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.

organisation
required
string

The organisation ID

Media typeapplication/json
object
callbackId
required

The callbackId from the waiting_callback status response

string
Example
Ab9hZXi/YXJuOmF3czpsYW1iZGE...
toolResults
required

Results of client-executed tools

Array<object>
object
toolUseId
required

The toolUseId from pendingTools

string
Example
toolu_bdrk_012KTC8NCG...
result
required

The result of executing the tool

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

Callback submitted successfully, execution will resume

Media typeapplication/json
object
success
boolean
message
string
callbackId

Echo of the callbackId for confirmation

string
Example
{
"success": true,
"message": "Callback submitted successfully"
}

Invalid request (missing callbackId or toolResults)

Access denied

Callback not found or already processed

Failed to submit callback