Skip to main content
POST
Upload file

Authorizations

Authorization
string
header
required

Use an API key as a bearer token: Authorization: Bearer sk_live_...

Each key has a set of scopes that gate which endpoints it can call: messages:read, messages:write, chats:read, lines:read, reactions:read, reactions:write, typing:read, typing:write, receipts:read, receipts:write, webhooks:read, webhooks:write, outbox:read, files:read, files:write. Keys can also be restricted to a subset of lines.

Headers

X-Filename
string

Original filename

Example:

"photo.jpg"

Body

The body is of type file.

Response

File uploaded

id
string

File ID (e.g. file_abc123)

url
string | null

Storage URL for the file

filename
string | null

Original filename

mime_type
string

MIME type of the file

size
number

File size in bytes

request_id
string