Parameters
string
required
The session to close.
Behavior
- Cancels remaining tasks. Any pending, running, or paused task in the
session completes with
terminal: "stopped_by_user". - Call it only when the entire workflow is finished. A successful task
completion does not require ending the session - reuse the same
session_idfor related follow-up tasks instead. - Do not reuse a session after ending it; subsequent task calls fail with
session_not_found_or_inactive. Start fresh withphone_session_startor letphone_run_taskcreate one.
Related
phone_task_cancel- cancel one task, keep the sessionphone_session_start- open the next workflow