Get the next question (LLM-driven)
GET /v1/sessions/{token}/next-question
GET
/v1/sessions/{token}/next-question
Returns the next question in the iterative Q&A flow. LLM-generated, conditioned
on prior answers. Returns {done: true} when all questions answered.
Parameters
Path Parameters
token
required
string
Responses
200
OK
object
question
string
What brings you to the obstetrics clinic today? question_type
string
choices
Array<string>
clinical_purpose
string
is_final_question
boolean
questions_remaining_estimate
integer
done
boolean
404
Session not found or expired
object
error
required
string
Invalid link code
integer
1003500
Could not generate question (LLM failure)
object
error
required
string
Invalid link code
integer
1003