apicheats.dev anthropic/llms.txt Raw .md
POST

POST /v1/sessions/{session_id}/threads/{thread_id}/archive?beta=true — Claude API

Beta

Anthropic API key (required); https://api.anthropic.com

Claude API

Archive Session Thread

Base URL
https://api.anthropic.com
Auth
x-api-key: <ANTHROPIC_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 179 tokens · Vary: Accept

Critical gotchas

Authentication uses the x-api-key header and requests also require an anthropic-version header.

The official OpenAPI URL is discovered from the SDK repository manifest and must remain under Anthropic's trusted Stainless storage prefix.

cURL

curl -X POST 'https://api.anthropic.com/v1/sessions/session-id/threads/thread-id/archive?beta=true' \  -H "x-api-key: $ANTHROPIC_API_KEY" \  -H 'anthropic-version: 2023-06-01'

Parameters

Name In Type Required Description
session_id path string Yes Path parameter session_id
thread_id path string Yes Path parameter thread_id

Response 200 OK

{
  "type": "session_thread",
  "id": "sthr_011CZkZVWa6oIjw0rgXZpnBt",
  "session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7",
  "status": "idle",
  "agent": {
    "type": "agent",
    "id": "agent_011CZkYqphY8vELVzwCUpqiQ",
    "version": 1,
    "name": "Researcher",
    "description": "A focused research subagent.",
    "model": {
      "id": "claude-opus-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": []
  },
  "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
  }
}
Get a free Claude API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.