Skip to main content
POST
Create a file

Authorizations

Authorization
string
header
required

A Reactor API key (rk_...), sent as Authorization: Bearer rk_.... Keep it on a server.

Body

application/json
name
string
required

The file name. Only its base name is kept.

Example:

"fox.png"

size
integer<int64>
required

The file size in bytes, at most the account's limit (50 MiB by default). Signed into the upload as Content-Length.

Required range: x >= 1
mime_type
string
required

The MIME type. Signed into the upload as Content-Type.

Example:

"image/png"

Response

The file was created. Upload its bytes next.

file_id
string<uuid>
required

Name it in extra_configs.file_ids, and in commands as {"upload_id": "<file_id>"}.

presigned_url
string<uri>
required

A PUT URL for the bytes, valid for 15 minutes.

expires_at
string<date-time>
required

When the file expires, 24 hours after creation.