Skip to main content
POST
/
v1
/
uploads
Get a pre-signed URL to upload large files (.docx/PDF/HTML/MD/RTF) without bloating agent context.
curl --request POST \
  --url https://api.example.com/v1/uploads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "content_type": "<string>",
  "size_bytes": 123,
  "purpose": "document"
}
'
{
  "upload_id": "<string>",
  "upload_url": "<string>",
  "expires_at": "<string>",
  "expires_in_seconds": 123,
  "max_size_bytes": 123,
  "curl_example": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null

Body

application/json
filename
string
required

Original filename including extension (e.g. 'contract.docx'). Used downstream for file-type detection.

Maximum string length: 255
content_type
string
required

MIME type the agent will PUT with (e.g. 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' for .docx).

Maximum string length: 200
size_bytes
integer
required

File size in bytes. Must be > 0 and <= 104857600 (100 MB).

Required range: x <= 104857600
purpose
enum<string>
default:document

What this file will be used for. 'document' = the active editable doc; 'attachment' = read-only AI-searchable reference.

Available options:
document,
attachment

Response

Successful Response

upload_id
string
required
upload_url
string
required
expires_at
string
required
expires_in_seconds
integer
required
max_size_bytes
integer
required
curl_example
string
required