Anthropic Sessions API

Stateful agent execution instances

Operations 25

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/sessions/{session_id}/archive?beta=true Archive an agent session · Archive Session #
Ask an LLM
“How do I archive an agent session I no longer need so it drops out of my default list?”
“Can I archive a Claude session through the beta sessions endpoint instead of deleting it?”
Tell an agent
Archive session {session_id} using the beta flag.
Move beta session {session_id} into the archive but keep its history.
GET /v1/sessions/{session_id}/events/stream?beta=true Stream a session's events live · Stream Events #
Ask an LLM
“How can I watch a running agent session's events as they happen?”
“Can the session event stream include partial deltas while the agent is still typing?”
Tell an agent
Open a live event stream for session {session_id}.
Stream events from session {session_id} including {event_deltas} deltas.
GET /v1/sessions/{session_id}/events?beta=true List past events in a session · List Events #
Ask an LLM
“Where can I page through the full event history of an agent session?”
“Can I filter a session's recorded events by type or by when they were created?”
Tell an agent
List the recorded events of session {session_id}.
Show only {types} events from session {session_id} created after {since}.
POST /v1/sessions/{session_id}/events?beta=true Send events into an agent session · Send Events #
Ask an LLM
“How do I post a user message into an agent session with the beta sessions API?”
“Can I push several events to a session in a single request?”
Tell an agent
Send events {events} to beta session {session_id}.
Post a batch of user events {events} into session {session_id} via the beta flag.
GET /v1/sessions/{session_id}/resources/{resource_id}?beta=true Get a resource attached to a session · Get Session Resource #
Ask an LLM
“How do I look up one resource that's mounted on an agent session?”
“What details can I see for a specific session resource?”
Tell an agent
Get resource {resource_id} on session {session_id}.
Show me the details of session {session_id} resource {resource_id}.
DELETE /v1/sessions/{session_id}/resources/{resource_id}?beta=true Remove a resource from a session · Delete Session Resource #
Ask an LLM
“What is the way to detach a resource from an agent session?”
“Can I delete one mounted resource without deleting the whole session?”
Tell an agent destructive · confirm first
Delete resource {resource_id} from session {session_id}.
Detach session {session_id} resource {resource_id} permanently.
POST /v1/sessions/{session_id}/resources/{resource_id}?beta=true Refresh a session resource's access token · Update Session Resource #
Ask an LLM
“Need to rotate the authorization token on a resource already attached to a session?”
“Can I give a session resource a new access token without removing it?”
Tell an agent
Update resource {resource_id} on session {session_id} with token {authorization_token}.
Swap in a fresh authorization token {authorization_token} for session {session_id} resource {resource_id}.
GET /v1/sessions/{session_id}/resources?beta=true List resources attached to a session · List Session Resources #
Ask an LLM
“Which resources are currently mounted on my agent session?”
“Can I page through a session's resources a few at a time?”
Tell an agent
List all resources on session {session_id}.
Show the first {limit} resources attached to session {session_id}.
POST /v1/sessions/{session_id}/resources?beta=true Attach a new resource to a session · Add Session Resource #
Ask an LLM
“How do I mount an additional resource onto a session that's already running?”
“Can I add a resource to an agent session after I've created it?”
Tell an agent
Add a new resource to session {session_id}.
Attach another resource onto existing session {session_id}.
POST /v1/sessions/{session_id}/threads/{thread_id}/archive?beta=true Archive a thread within a session · Archive Session Thread #
Ask an LLM
“How do I archive a single thread inside an agent session?”
“Can I put away one conversation thread while keeping the rest of the session active?”
Tell an agent
Archive thread {thread_id} in session {session_id}.
Mark session {session_id} thread {thread_id} as archived.
GET /v1/sessions/{session_id}/threads/{thread_id}/events?beta=true List events recorded in a session thread · List Session Thread Events #
Ask an LLM
“Where do I read back the event history for one thread of a session?”
“Can I page through a single thread's events rather than the whole session's?”
Tell an agent
List the events in thread {thread_id} of session {session_id}.
Page through {limit} past events at a time from session {session_id} thread {thread_id}.
GET /v1/sessions/{session_id}/threads/{thread_id}/stream?beta=true Stream live events from a session thread · Stream Session Thread Events #
Ask an LLM
“How can I follow just one thread of an agent session in real time?”
“Can a thread's live stream include incremental deltas?”
Tell an agent
Stream thread {thread_id} of session {session_id} live.
Follow session {session_id} thread {thread_id} as it runs with {event_deltas} deltas turned on.
GET /v1/sessions/{session_id}/threads/{thread_id}?beta=true Get one thread of a session · Get Session Thread #
Ask an LLM
“Can I fetch the details of a specific thread in a session?”
“What does a single session thread record look like?”
Tell an agent
Get thread {thread_id} from session {session_id}.
Look up the thread record {thread_id} under session {session_id}.
GET /v1/sessions/{session_id}/threads?beta=true List the threads in a session · List Session Threads #
Ask an LLM
“Which threads exist inside my agent session?”
“Can I page through a session's threads in chunks?”
Tell an agent
List every thread in session {session_id}.
Show {limit} threads per page for session {session_id}.
GET /v1/sessions/{session_id}?beta=true Get an agent session via the beta flag · Get Session #
Ask an LLM
“How do I check the status and settings of one agent session using the beta endpoint?”
“What does the beta sessions API return for a single session?”
Tell an agent
Get beta session {session_id}.
Fetch session {session_id} with the beta query flag set.
POST /v1/sessions/{session_id}?beta=true Update a session's title, vaults or budget · Update Session #
Ask an LLM
“How do I rename an agent session or change its metadata?”
“Can I change which vaults or budget a session uses after it starts?”
Tell an agent
Rename session {session_id} to {title}.
Set the budget of session {session_id} to {budget}.
DELETE /v1/sessions/{session_id}?beta=true Delete an agent session via the beta flag · Delete Session #
Ask an LLM
“How do I permanently delete an agent session with the beta sessions API?”
“Can I remove a session entirely rather than archiving it, using the beta endpoint?”
Tell an agent destructive · confirm first
Delete beta session {session_id} permanently.
Remove session {session_id} for good through the beta flag.
POST /v1/sessions?beta=true Start a new agent session with resources · Create Session #
Ask an LLM
“How do I start a new agent session in an environment with the beta API?”
“Can I seed a new session with initial events and a spending budget?”
Tell an agent
Start a beta session for agent {agent} in environment {environment_id}.
Create session {title} running agent {agent} in environment {environment_id} with budget {budget}.
GET /v1/sessions?beta=true List and filter agent sessions · List Sessions #
Ask an LLM
“Which agent sessions are running for a given agent or deployment?”
“Can I include archived sessions or filter sessions by status and creation date?”
Tell an agent
List sessions for agent {agent_id} with status {statuses}.
Show sessions started by deployment {deployment_id}, archived ones included {include_archived}.
POST /v1/sessions Create a session on the plain sessions endpoint · Anthropic Create Session #
Ask an LLM
“How do I create a stateful agent execution instance without the beta query flag?”
“Can I pass vault IDs when creating a session on the plain /v1/sessions endpoint?”
Tell an agent
On the plain endpoint, create a stateful execution for agent {agent} in environment {environment_id}.
Without the beta flag, spin up agent {agent} in {environment_id} using vaults {vault_ids}.
GET /v1/sessions List sessions on the plain sessions endpoint · Anthropic List Sessions #
Ask an LLM
“How do I list sessions by agent and status on the /v1/sessions endpoint without the beta query flag?”
“Can the non-beta-flag session listing filter by a single status?”
Tell an agent
Using the plain sessions endpoint, list sessions for agent {agent_id}.
On the endpoint without the beta query flag, list sessions whose status is {status}.
GET /v1/sessions/{session_id} Get a session on the plain sessions endpoint · Anthropic Get Session #
Ask an LLM
“How do I read one session from /v1/sessions without adding the beta query flag?”
“What's the non-beta-flag way to look up a session by its ID?”
Tell an agent
Look up session {session_id} on the plain endpoint.
Retrieve session {session_id} without the beta query parameter.
POST /v1/sessions/{session_id} Update a session's tools or MCP servers · Anthropic Update Session #
Ask an LLM
“How do I change the tools or MCP servers a session uses?”
“Can I reconfigure a session's config on the plain endpoint without the beta flag?”
Tell an agent
Update the tools and MCP servers configured on session {session_id}.
Reconfigure session {session_id} through the plain endpoint.
DELETE /v1/sessions/{session_id} Delete a session on the plain sessions endpoint · Anthropic Delete Session #
Ask an LLM
“How do I delete a session on /v1/sessions without the beta query flag?”
“Is deleting a session on the plain endpoint permanent?”
Tell an agent destructive · confirm first
Delete session {session_id} using the plain endpoint.
Without the beta parameter, permanently erase session {session_id}.
POST /v1/sessions/{session_id}/archive Archive a session on the plain endpoint · Anthropic Archive Session #
Ask an LLM
“How do I archive a session on the endpoint that doesn't take the beta query flag?”
“Can I archive a session through the plain /archive path?”
Tell an agent
Archive session {session_id} on the plain endpoint.
Without the beta parameter, set session {session_id} to archived.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/anthropic-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

anthropic-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Anthropic Sessions API
  version: '1.0'
  description: 'Operations tagged Sessions across 2 of this provider''s published API definitions: anthropic-api-openapi.json, anthropic-managed-agents-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.anthropic.com
tags:


# --- truncated at 32 KB (326 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/anthropic/refs/heads/main/openapi/anthropic-sessions-api-openapi.yml