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
Request body
Example request
{
"type": "file",
"file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
"mount_path": "/uploads/receipt.pdf"
}Response
Successful response (OK)
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
Changed in 2 of the 68 revisions of this API.13
- ▲
the request property
////became not nullablerequest-property-became-not-nullable
- ○
request property
////list-of-types was widened by adding typesnullto media typeapplication/jsonrequest-property-list-of-types-widened
- ○
the
////request property's minLength was decreased from1to0request-property-min-length-decreased
- ▲
- ○
endpoint added
endpoint-added
- ○