Add Session Resource
api/beta/sessions/resources/add
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/add Changed · +18 / -19 lines
# Add Session Resource ## Path parameters ## Headers ## Body parameters ## Returns ## Example ### Response (200) ## Add Session Resource ### Path Parameters ### Header Parameters ### Body Parameters ### Returns ### Example #### Response
---- -title: Add Session Resource -url: https://platform.claude.com/docs/en/api/beta/sessions/resources/add ---- +# Add Session Resource -## 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>`. -### Returns + minLength: 1, maxLength: 4096 -- `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` +## Returns +- `BetaManagedAgentsFileResource object` + - `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 -### Example + format: date-time -```http +## Example + +```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 {