Update Session Resource
api/beta/sessions/resources/update
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/update Changed · +33 / -32 lines
# Update Session Resource ## Path parameters ## Headers ## Body parameters ## Returns ## Example ### Response (200) ## Update Session Resource ### Path Parameters ### Header Parameters ### Body Parameters ### Returns ### Example #### Response
---- -title: Update Session Resource -url: https://platform.claude.com/docs/en/api/beta/sessions/resources/update ---- +# Update Session Resource -## 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. -### Returns + minLength: 1, maxLength: 4096 -- `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` +## Returns +- `BetaManagedAgentsGitHubRepositoryResource object` + - `id: string` - `created_at: 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.
Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. -### Example +## 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 {