Answers a clarifying question the agent raised mid-turn
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
When a turn emits a user_question or agent_form event, the agent has stopped and is waiting on you. This endpoint delivers the answer.
It is a side-channel signal, not a new stream: it returns immediately, and the turn resumes on the /v2/stream/agent_ask stream you already have open.
{threadResponseId} is the id from that turn's init frame.
Basic Usage
The stream pauses on a question:
event: user_question
data: {"question_id":"q-abc-123","question":"Do you want this by order date or by delivery date?","options":["Order date","Delivery date"]}Answer it, passing question_id back verbatim:
{
"projectId": 1,
"questionId": "q-abc-123",
"answers": ["Order date"],
"freeText": "Use the order timestamp, not delivery."
}{
"success": true
}The original stream then continues from where it paused:
event: thinking
data: {"block_id":6,"content":"Order date it is — filtering on order_purchase_timestamp."}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | number | Yes | The project that owns the turn. |
questionId | string | Yes | The question_id from the user_question event, verbatim. |
answers | string[] | Yes | The selected options. |
freeText | string | No | Anything extra the user typed. |
question_idis accepted too. The event spells the id in snake case and this endpoint takes it either way, so copying the field straight across from the frame works. PreferquestionId; if you send both,questionIdwins.
Error handling
| Status | When |
|---|---|
400 | questionId is missing, or the agent is not waiting on it — unknown, already answered, or belonging to another turn. Use the id from the most recent user_question event. |
401 | Missing or invalid API key. |
404 | The turn does not exist. |
If you would rather stop than answer, cancel the turn instead.
