Answer an interaction prompt
POST /v1/interactions/:id/answer — Resolve a pending question the agent asked mid-turn. Questions arrive on the WS `chat` channel as `pending_question_adde
POST /v1/interactions/:id/answer
Resolve a pending question the agent asked mid-turn. Questions arrive on the WS chat channel as pending_question_added (and are re-served on reload via GET /v1/sessions/:id pending_questions); :id is that payload's question id. Answering unblocks whichever tool / sub-agent was awaiting it.
| Method | POST |
| Path | /v1/interactions/:id/answer |
| Auth | Authorization: Bearer <token> required when GATEWAY_AUTH_TOKEN is set |
| Category | state |
Request body
{ "answers": [ { "questionIndex": 0, "selected_labels": ["Confirm"] } ] }Response body
{ "ok": true, "id": "q_abc" }Notes
One answers[] entry per question in the pending payload, keyed by questionIndex (0-based). Each entry must carry at least one of selected_labels / free_text — entries with neither are dropped, and an all-empty body 400s with answers_empty (a missing/non-array answers 400s with answers_required).
Per request kind: select — put the chosen option label string(s) in selected_labels (multiple when multiSelect); free-text-only questions (empty options) use free_text instead. confirm — put the accept or reject button's label text in selected_labels (e.g. ["Confirm"] / ["Cancel"], matching the payload's accept.label / reject.label). input — free_text. secret — never answered through this endpoint: the client writes the value to the payload's writeEndpoint credentials route and answers only the outcome.
Returns 404 question_not_pending when the question was already answered or never existed.