Skip to main content
Cancels a single task without losing the workflow - the session stays open for follow-up tasks. Use it to stop a runaway task; use phone_session_end only when the entire workflow is finished.

Parameters

string
required
The active session that owns the task.
string
required
The task to cancel.
string
Optional note recorded with the cancellation.

Behavior

  • Monitor the original task_id until it reports completed with terminal: "stopped_by_user".
  • If the task finished before the cancel arrived, the response contains already_completed: true and nothing is sent to the phone - act on the task’s actual terminal instead.

Example