Claude Platform Docs

Add Session Resource

$ ant beta:sessions:resources add
POST/v1/sessions/{session_id}/resources

Add Session Resource

Parameters
--session-id: string

Path param: Path parameter session_id

--file-id: string

Body param: ID of a previously uploaded file.

minLength1
maxLength128
--type: "file"

Body param

--mount-path: optional string

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

minLength1
maxLength4096
--beta: optional array of AnthropicBeta

Header param: Optional header to specify the beta version(s) you want to use.

Returns
beta_managed_agents_file_resource: object{ id, created_at, file_id, 3 more }
id: string
created_at: string

A timestamp in RFC 3339 format

formatdate-time
file_id: string
mount_path: string
type: "file"
updated_at: string

A timestamp in RFC 3339 format

formatdate-time

Add Session Resource

ant beta:sessions:resources add \
  --api-key my-anthropic-api-key \
  --session-id sesn_011CZkZAtmR3yMPDzynEDxu7 \
  --file-id file_011CNha8iCJcU1wXNR6q4V8w \
  --type file
{
  "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
  "created_at": "2026-03-15T10:00:00Z",
  "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "mount_path": "/uploads/receipt.pdf",
  "type": "file",
  "updated_at": "2026-03-15T10:00:00Z"
}
Returns Examples
{
  "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
  "created_at": "2026-03-15T10:00:00Z",
  "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "mount_path": "/uploads/receipt.pdf",
  "type": "file",
  "updated_at": "2026-03-15T10:00:00Z"
}