Claude Platform Docs

刪除工作階段

$ ant beta:sessions delete
DELETE/v1/sessions/{session_id}

刪除工作階段

Parameters
--session-id: string⁠Path parameter
--beta: optional array of AnthropicBeta⁠Header parameter

This endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.

--workspace-id: optional string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
beta_managed_agents_deleted_session: object{ type: "session_deleted", id }

Confirmation that a session has been permanently deleted.

type: "session_deleted"
id: string
刪除工作階段
ant beta:sessions delete \
  --api-key my-anthropic-api-key \
  --session-id sesn_011CZkZAtmR3yMPDzynEDxu7
Returns Examples
Response 200
{
  "id": "sesn_011CZkZAtmR3yMPDzynEDxu7",
  "type": "session_deleted"
}