The Session object
Returned by Retrieve a session, Close a session.
Attributes
ses_…
One of session
closed takes no more messages. A deleted session returns 410. One of active, closed
discovery finds the form, intake asks its questions, ready offers actions. The user can keep talking in every phase. One of discovery, intake, ready
Your reference for the end user, from Docgen-Subject.
The identified form; null during discovery.
For a catalog form, total counts the questions that apply given the answers so far. For a custom form it is the AI interview's own estimate of its length, which may move by a question or so as it learns more; it is never below the questions already asked, and once the session is ready it equals answered.
What the user is being asked now; null when nothing is. With steps, the first question of pending_step.
The questions to show together now; null when nothing is being asked. Send them back in one message as answers.
What the user can do next. Empty until the session is ready. Ignore types you don't know.
Everything made from this session, oldest first.
Up to 20 keys of your own, echoed back and shown in logs. Don't put personal data here.
When the session is deleted automatically (7 days after it starts unless you asked for less). Null only on sessions from before lifetimes.