Stop a session
POST/v1/sessions/{session_id}/stop
Stop the session and release its active runtime. Stop it when no more work will use it. A stopped session can be restarted with Resume a session.
Generated from the Platform API specification on 2026-09-04.
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
session_id |
string | The session, as returned by Create a session. |
Headers
Section titled “Headers”| Header | Required | Description |
|---|---|---|
Authorization |
yes | Bearer plus a short-lived OAuth access token issued for the Tanomis API audience. Backends obtain tokens with an organization automation client; the CLI’s human login is not an application credential. |
X-Organization-ID |
yes | The organization_id from the workspace projection you selected in GET /v1/me/workspaces. |
X-Workspace-Tenant-ID |
yes | The nested tenant_id from the same projection. A header cannot widen what the token grants. Some single-workspace or self-hosted environments take X-Tenant-ID instead, as supplied by their administrator. |
Responses
Section titled “Responses”| Status | Meaning |
|---|---|
200 |
The session in its new state. |
404 |
No such session in the selected tenant. |
Request
Section titled “Request”curl -X POST "https://api.tanomis.com/v1/sessions/ses_7d4f9c/stop" \ -H "Authorization: Bearer $TANOMIS_TOKEN" \ -H "X-Organization-ID: $TANOMIS_ORG" \ -H "X-Workspace-Tenant-ID: $TANOMIS_WORKSPACE"import httpx
response = httpx.post( f"https://api.tanomis.com/v1/sessions/{session_id}/stop", headers={ "Authorization": f"Bearer {token}", "X-Organization-ID": organization_id, "X-Workspace-Tenant-ID": tenant_id, },)response.raise_for_status()result = response.json()const response = await fetch(`https://api.tanomis.com/v1/sessions/${sessionId}/stop`, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "X-Organization-ID": organizationId, "X-Workspace-Tenant-ID": tenantId, },});if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);const result = await response.json();Response
Section titled “Response”{ "id": "ses_7d4f9c", "agent_name": "support-copilot", "version": "0.4.0", "status": "stopped", "created_at": "2026-09-02T11:42:18Z", "awaiting_input": false}