Archive Session Thread

Changed on
post/v1/sessions/{session_id}/threads/{thread_id}/archive?beta=true

Request

Path parameters

session_idstring required
thread_idstring required

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

anthropic-workspace-idstring

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.

Response

Successful response (OK)

type'session_thread' required
idstring required

Unique identifier for this thread.

session_idstring required

The session this thread belongs to.

workflow_run_idstring nullable required

Identifier of the workflow run that created the thread, or null for any other thread.

status'running' | 'idle' | 'rescheduling' | 'terminated' required
parent_thread_idstring nullable required

Parent thread that spawned this thread. Null for the primary thread.

created_atstring date-time required

A timestamp in RFC 3339 format

updated_atstring date-time required

A timestamp in RFC 3339 format

archived_atstring date-time required

A timestamp in RFC 3339 format

Example response

{
  "type": "session_thread",
  "id": "sthr_011CZkZVWa6oJjw1rgXZpnBt",
  "session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7",
  "workflow_run_id": null,
  "status": "idle",
  "agent": {
    "type": "agent",
    "id": "agent_011CZkYqphY8vELVzwCUpqiQ",
    "version": 1,
    "name": "Researcher",
    "description": "A focused research subagent.",
    "model": {
      "id": "claude-opus-5-5",
      "speed": "standard"
    },
    "system": "You are a research subagent that gathers and summarises sources for the coordinating agent.",
    "tools": [
      {
        "type": "agent_toolset_20260401",
        "default_config": {
          "enabled": true,
          "permission_policy": {
            "type": "always_ask"
          }
        },
        "configs": []
      }
    ],
    "mcp_servers": [],
    "skills": [],
    "execution_identity": {
      "type": "service_account"
    }
  },
  "parent_thread_id": null,
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z",
  "archived_at": null,
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "cache_read_input_tokens": 0,
    "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 0
    }
  },
  "stats": {
    "duration_seconds": 0,
    "startup_seconds": 0,
    "active_seconds": 0
  }
}

Changes

    • info

      added subschema #1 to the ////////// response property anyOf list for the response status

    • info

      added subschema #1 to the ////////// response property anyOf list for the response status

    • info

      added the enum value admin-user-sign-out-2026-10-08 to the property items/anyOf[subschema #2]/ of the header request parameter anthropic-beta