Skip to main content
POST
Upload a CDN file

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
file
file
required

The file to upload (2KB–100MB)

filename
string
required

Name for the file, without extension (the extension is added from the MIME type). 1–64 characters: letters, numbers, underscores, and hyphens.

folder
string

Optional folder prefix (same character rules as filename; "error-pages" is reserved). File is stored as folder/filename.

mime_type
string

MIME type override. If omitted, detected from the uploaded file's Content-Type header.

expire_at
string<date-time>

Optional expiration time in RFC3339 format. Must be in the future.

Response

File created successfully

id
string<uuid>
user_id
string<uuid>
filename
string
Example:

"images/logo.png"

size
integer<int64>

File size in KB

mime_type
string
Example:

"image/png"

created_at
string<date-time>
expire_at
string<date-time>
status
enum<string>

pending while a large file upload has not been finalized (no url yet), ready otherwise

Available options:
pending,
ready
url
string

Full CDN URL to access the file

Example:

"https://cdn.example.com/{user_id}/{filename}"