Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

POST /v1/sessions/{session_id}/cancel Cancels an in-progress session. If the session is currently processing, agent execution is interrupted and the status transitions to canceling. If the session is already idle, the operation still succeeds.

Path parameters

ParameterTypeDescription
session_idstringSession ID with the sess_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT
Content-TypeYesapplication/json

Example request

curl -X POST https://openapi.qoder.sh/api/v1/cloud/sessions/sess_019e3bb1e8c171fd9abbb1477ffb84cc/cancel \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json"

Example response

HTTP 200 OK Returns a compact status confirmation object.
{
  "id": "sess_019e3bb1e8c171fd9abbb1477ffb84cc",
  "type": "session",
  "status": "canceling"
}

Response fields

FieldTypeDescription
idstringSession ID
typestringAlways "session"
statusstringStatus after cancellation, value is "canceling"
canceling is a transitional state, indicating the cancel command has been issued. The terminal state will be idle or cancelled. Subscribe to the SSE stream and listen for the session.status_idle event to confirm.

Errors

HTTPTypeTrigger
401authentication_errorPAT invalid or expired
404not_found_errorSession does not exist
See Errors for the full error envelope.