Skip to main content
POST
Get the next questions

Authorizations

Authorization
string
header
required

Send the domain-scoped API key as Authorization: Bearer . Never send client-supplied identity headers.

Headers

Idempotency-Key
string
required

Unique key per logical mutation; reuse the same key and body when retrying after a timeout.

Required string length: 8 - 128

Path Parameters

session_id
string
required

Server-issued session ID in the path.

Required string length: 1 - 128

Body

application/json
state_version
integer
required

Session state version last read by the client; used for optimistic concurrency.

Required range: x >= 0
previous_turn
object

Observation of the preceding exchange; omit on the first call of a new session. Decision and question IDs are optional aids, never IDs to invent. For an answered open question, non-blank user_text is required unless outcome is explicitly asked_no_answer or refused; otherwise the API returns 422 invalid_previous_turn before model analysis. Closed and semi-open questions accept choice_ids alone; semi-open questions may also include free_text. Context and client updates do not replace a required reply.

context_update
object

Context added since the preceding call, as either a compact summary or an ordered message delta.

client_updates
object

Confirmed data or progress explicitly supplied by the integrating application.

selection
object

Constraints for this call, applied before ranking rather than after candidate selection.

Response

Successful response.

A ranked decision, not a raw selection score. action=ask has a decision ID, a null stop reason, and at least one candidate. action=stop has a stop reason, a null decision ID, and no candidates.

request_id
string
required
session_id
string
required
decision_id
string | null
required

Present for action=ask; send it with the next observed turn when available.

action
enum<string>
required

stop when the session reached max_turns or no identifiable question remains; an achieved objective emits a warning instead.

Available options:
ask,
stop
stop_reason
enum<string> | null
required

Stop reason: max_turns_reached when the session reached its turn limit, or no_question_available when no question remains after hard exclusions.

Available options:
no_question_available,
max_turns_reached
candidates
object[]
required

Ranked from most to least relevant; multiple candidates avoid covering the same information twice.

Maximum array length: 10
progress
object
required
turn_count
integer
required
Required range: x >= 0
turns_remaining
integer
required

Zero when the turn limit is reached; action is then stop.

Required range: x >= 0
warnings
enum<string>[]
required

Business signals that do not stop the conversation: objective_achieved, eligibility_exhausted_fallback, or constraints_relaxed.

Available options:
objective_achieved,
eligibility_exhausted_fallback,
constraints_relaxed
degraded
boolean
required

True when understanding this turn used a reduced mode; the decision remains usable.

degraded_reasons
enum<string>[]
required
Available options:
missing_user_text,
summary_only_context,
semantic_service_unavailable,
unresolved_previous_turn
versions
object
required

Public engine and API versions plus the session state version. The session's pinned configuration version is not exposed or client-selectable.