Sessions

Upload session file

Upload one attachment (multipart field file, maximum 5 MiB) into the Session workspace. Idempotency-Key is required. Supported extensions: .txt, .md, .csv, .log, .json, .pdf, .png, .jpg, .jpeg, .webp. A failed transfer still returns 201 with status failed.

post/v1/agents/sessions/{session_id}/files

Request

  • Base URL: https://api.sandbase.ai
  • URL: https://api.sandbase.ai/v1/agents/sessions/{session_id}/files
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Headers

Idempotency-Keystring required

Required. 1-128 characters without leading or trailing whitespace. Reuse the same key and body when retrying.

Response

Attachment record

idstring required

Attachment ID (fil_ prefix).

session_idstring required
namestring required
mime_typestring required
size_bytesinteger required
status'pending' | 'ready' | 'failed' | 'deleted' required

Only ready attachments can be sent or downloaded.

error_codestring
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.