Add Session Resource

post/v1/sessions/{session_id}/resources?beta=true

Path parameters

session_idstring required

Path parameter session_id

Headers

anthropic-versionstring
anthropic-betastring
anthropic-workspace-idstring

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Request body

type'file' required
file_idstring required

ID of a previously uploaded file.

mount_pathstring nullable

Mount path in the container. Defaults to /mnt/session/uploads/<file_id>.

Example request

{
  "type": "file",
  "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "mount_path": "/uploads/receipt.pdf"
}

Response

Successful response (OK)

type'file' required
idstring required
file_idstring required
mount_pathstring required
created_atstring date-time required

A timestamp in RFC 3339 format

updated_atstring date-time required

A timestamp in RFC 3339 format

Example response

{
  "type": "file",
  "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
  "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "mount_path": "/uploads/receipt.pdf",
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z"
}

Changes