Skip to main content
POST
/
api
/
chat
/
waitingResponse
cURL
curl -X POST "https://app.cotool.ai/api/chat/waitingResponse" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chatId":"string","toolCallId":"string","optionIndex":0}'
{
  "success": true,
  "selectedLabel": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Body

application/json

Request body for answering a waiting user response prompt from the UI

chatId
string<uuid>
required

Unique identifier of the chat with the waiting prompt

toolCallId
string
required

The tool call ID of the waiting prompt

optionIndex
integer
required

Index of the button/option selected (0-based)

Required range: x >= 0

Response

200 - application/json

Successful response

Response indicating whether the waiting prompt was resolved

success
boolean
required

Whether the response was successfully processed

selectedLabel
string

The label of the selected option

message
string

Error or status message