Aggiungi risorsa di sessione
POST/v1/sessions/{session_id}/resources
Aggiungi risorsa di sessione
Parameters
Returns
Aggiungi risorsa di sessione
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
beta_managed_agents_file_resource = anthropic.beta.sessions.resources.add(
"sesn_011CZkZAtmR3yMPDzynEDxu7",
file_id: "file_011CNha8iCJcU1wXNR6q4V8w",
type: :file
)
puts(beta_managed_agents_file_resource)Response 200
{
"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
Response 200
{
"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"
}