Skip to main content
POST
/
v1
/
files
Upload file
curl --request POST \
  --url https://api.messages.dev/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --data '"<string>"'
{
  "id": "<string>",
  "url": "<string>",
  "filename": "<string>",
  "mime_type": "<string>",
  "size": 123,
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

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

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