Skip to main content
POST
CreateFile

Authorizations

Authorization
string
header
required

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

Query Parameters

slug
string

Human-readable end of the file's URL (/{id}/{slug}).

Maximum string length: 128
Pattern: ^[A-Za-z0-9._~-]*$
name
string

Original filename, e.g. "Quarterly report.pdf".

Maximum string length: 255
visibility
enum<string>

Who can open the file by its URL. Defaults to internal.

Available options:
private,
internal,
public

Body

*/*

The body is of type file.

Response

200 - application/json

Success

id
string
required

Unique file ID.

Pattern: ^[A-Za-z0-9_-]{21}$
slug
string
required

Human-readable name at the end of the URL. Empty when not set.

Maximum string length: 128
Pattern: ^[A-Za-z0-9._~-]*$
url
string<uri>
required

Canonical URL of the file, including the slug when set.

name
string
required

Original filename, e.g. "Quarterly report.pdf". Empty when not set.

Maximum string length: 255
Pattern: ^[^/\x00-\x1F\x7F]*$
content_type
string
required

Media type of the content, from the Content-Type of the upload.

size
string<int64>
required

Size of the content in bytes.

checksum
string
required

CRC32C checksum of the content.

Pattern: ^([A-Za-z0-9+/]{6}==)?$
visibility
enum<string>
required

Who can open the file by its URL: "private" (only the owner), "internal" (any signed-in user), or "public" (anyone).

Available options:
private,
internal,
public
created_at
string<date-time>
required

A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (Z); input may use an offset from UTC.

Example:

"2023-01-15T01:30:15.01Z"

updated_at
string<date-time>
required

A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (Z); input may use an offset from UTC.

Example:

"2023-01-15T01:30:15.01Z"