Skip to main content
When you cancel a session, Knoq stamps a cancellation timestamp on the session record. The background workflow checks for this signal on every poll cycle and exits gracefully as soon as it detects it — typically within one poll interval (1–5 seconds). The session and its transcript are preserved; only the in-flight turn is interrupted. Cancellation is idempotent. If the session is already cancelled (or was never running), the endpoint returns { "ok": true } without error. This makes it safe to call multiple times or from multiple clients without special-casing the response.
Cancelling a session does not delete it. To remove the session and its events permanently, use the Delete Session endpoint.

Request

string
required
The ID of the session to cancel. You can obtain this from the Create Session response or the List Sessions endpoint.

Response

boolean
Always true when the cancellation request is accepted.
boolean
Present and true when the session had already been cancelled before this request. The cancellation timestamp was not updated.

Example

Idempotent response (already cancelled)

Errors