Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.

Path Parameters

session_id
string
required

ID of the session to upload the file to.

Body

application/json
file_name
string
required

Name of the file. Directory components are stripped; the base name is sanitized before storage.

Example:

"report.pdf"

file_content
string<byte>
required

Base64-encoded file contents. Maximum decoded size is 200MB.

media_type
string

MIME type of the file. Echoed back in the response.

Example:

"application/pdf"

Response

File stored. Use file_name from the response as an attachment on this session's messages.

file_name
string

Stored path of the file inside the session's input namespace.

Example:

"custom_agent_interactions/sess_xYz789AbCd/input/report.pdf"

media_type
string | null
Example:

"application/pdf"

size
integer

Decoded file size in bytes.

Example:

482133