Resources
api/beta/sessions/resources
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/sessions/resources Changed · +177 / -150 lines
### Path parameters ### Headers ### Body parameters #### Response (200) ### Path parameters ### Query parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ### Path parameters ### Headers ### Body parameters #### Response (200) ### Path parameters ### Headers #### Response (200) ## Domain types ### Path Parameters ### Header Parameters ### Body Parameters #### Response ### Path Parameters ### Query Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters ### Body Parameters #### Response ### Path Parameters ### Header Parameters #### Response ## Domain Types
---- -title: Resources -url: https://platform.claude.com/docs/en/api/beta/sessions/resources ---- - # Resources ## Add Session Resource -**post** `/v1/sessions/{session_id}/resources` +**POST** `/v1/sessions/{session_id}/resources` Add Session Resource -### Path Parameters +### Path parameters - `session_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Body Parameters +### Body parameters - `file_id: string` ID of a previously uploaded file. + minLength: 1, maxLength: 128 + - `type: "file"` - - `"file"` - - `mount_path: optional string or null` Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. + minLength: 1, maxLength: 4096 + ### Returns -- `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` +- `BetaManagedAgentsFileResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + ### Example -```http +```bash curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +#### Response (200) ```json {
## List Session Resources -**get** `/v1/sessions/{session_id}/resources` +**GET** `/v1/sessions/{session_id}/resources` List Session Resources -### Path Parameters +### Path parameters - `session_id: string` -### Query Parameters +### Query parameters - `limit: optional number` Maximum number of resources to return per page (max 1000). If omitted, returns all resources. + format: int32 + - `page: optional string` Opaque cursor from a previous response's next_page field. -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
Resources for the session, ordered by `created_at`. - - `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` + - `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` + - `BetaManagedAgentsCommitCheckout object` - - `BetaManagedAgentsCommitCheckout object { sha, type }` - - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` + - `BetaManagedAgentsFileResource object` - - `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` - - `id: string` - `created_at: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format - - `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` + format: date-time + - `BetaManagedAgentsMemoryStoreResource object` + A memory store attached to an agent session. - `memory_store_id: string`
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + maxLength: 4096 + - `mount_path: optional string or null` Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
### Example -```http +```bash curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: managed-agents-2026-04-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Get Session Resource -**get** `/v1/sessions/{session_id}/resources/{resource_id}` +**GET** `/v1/sessions/{session_id}/resources/{resource_id}` Get Session Resource -### Path Parameters +### Path parameters - `session_id: string` - `resource_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
### Returns -- `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` +- `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` + - `BetaManagedAgentsCommitCheckout object` - - `BetaManagedAgentsCommitCheckout object { sha, type }` - - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` +- `BetaManagedAgentsFileResource object` -- `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` - - `id: string` - `created_at: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format -- `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` + format: date-time +- `BetaManagedAgentsMemoryStoreResource object` + A memory store attached to an agent session. - `memory_store_id: string`
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + maxLength: 4096 + - `mount_path: optional string or null` Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
### Example -```http +```bash curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources/$RESOURCE_ID \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: managed-agents-2026-04-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Update Session Resource -**post** `/v1/sessions/{session_id}/resources/{resource_id}` +**POST** `/v1/sessions/{session_id}/resources/{resource_id}` Update Session Resource -### Path Parameters +### Path parameters - `session_id: string` - `resource_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Body Parameters +### Body parameters - `authorization_token: string` New authorization token for the resource. Currently only `github_repository` resources support token rotation. + minLength: 1, maxLength: 4096 + ### Returns -- `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` +- `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` + - `BetaManagedAgentsCommitCheckout object` - - `BetaManagedAgentsCommitCheckout object { sha, type }` - - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` +- `BetaManagedAgentsFileResource object` -- `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` - - `id: string` - `created_at: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format -- `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` + format: date-time +- `BetaManagedAgentsMemoryStoreResource object` + A memory store attached to an agent session. - `memory_store_id: string`
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + maxLength: 4096 + - `mount_path: optional string or null` Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
### Example -```http +```bash curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources/$RESOURCE_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +#### Response (200) ```json {
## Delete Session Resource -**delete** `/v1/sessions/{session_id}/resources/{resource_id}` +**DELETE** `/v1/sessions/{session_id}/resources/{resource_id}` Delete Session Resource -### Path Parameters +### Path parameters - `session_id: string` - `resource_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
### Returns -- `BetaManagedAgentsDeleteSessionResource object { id, type }` +- `BetaManagedAgentsDeleteSessionResource object` Confirmation of resource deletion.
- `type: "session_resource_deleted"` - - `"session_resource_deleted"` - ### Example -```http +```bash curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources/$RESOURCE_ID \ -X DELETE \ -H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Beta Managed Agents Delete Session Resource -- `BetaManagedAgentsDeleteSessionResource object { id, type }` +- `BetaManagedAgentsDeleteSessionResource object` Confirmation of resource deletion.
- `type: "session_resource_deleted"` - - `"session_resource_deleted"` - ### Beta Managed Agents File Resource -- `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` +- `BetaManagedAgentsFileResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + ### Beta Managed Agents GitHub Repository Resource -- `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` +- `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` + - `BetaManagedAgentsCommitCheckout object` - - `BetaManagedAgentsCommitCheckout object { sha, type }` - - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` - ### Beta Managed Agents Memory Store Resource -- `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` +- `BetaManagedAgentsMemoryStoreResource object` A memory store attached to an agent session.
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + maxLength: 4096 + - `mount_path: optional string or null` Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
A memory store attached to an agent session. - - `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` + - `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` + - `BetaManagedAgentsCommitCheckout object` - - `BetaManagedAgentsCommitCheckout object { sha, type }` - - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` + - `BetaManagedAgentsFileResource object` - - `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` - - `id: string` - `created_at: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format - - `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` + format: date-time + - `BetaManagedAgentsMemoryStoreResource object` + A memory store attached to an agent session. - `memory_store_id: string`
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + maxLength: 4096 + - `mount_path: optional string or null` Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
The requested session resource. - - `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` + - `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` + - `BetaManagedAgentsCommitCheckout object` - - `BetaManagedAgentsCommitCheckout object { sha, type }` - - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` + - `BetaManagedAgentsFileResource object` - - `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` - - `id: string` - `created_at: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format - - `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` + format: date-time + - `BetaManagedAgentsMemoryStoreResource object` + A memory store attached to an agent session. - `memory_store_id: string`
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + maxLength: 4096 + - `mount_path: optional string or null` Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
The updated session resource. - - `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` + - `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` + - `BetaManagedAgentsCommitCheckout object` - - `BetaManagedAgentsCommitCheckout object { sha, type }` - - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` + - `BetaManagedAgentsFileResource object` - - `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` - - `id: string` - `created_at: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string`
- `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format - - `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` + format: date-time + - `BetaManagedAgentsMemoryStoreResource object` + A memory store attached to an agent session. - `memory_store_id: string`
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
- `instructions: optional string or null` Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + + maxLength: 4096 - `mount_path: optional string or null`