Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Enter your API key as the bearer token. Set header: Authorization to Bearer <api_key>

Body

application/json
name
string
required

User-facing filename, e.g. 'report.pdf'.

Required string length: 1 - 512
size_bytes
integer
required

Exact size of the file in bytes. Enforced by the signed upload URL.

Required range: x >= 0
content_type
string
required

MIME type of the file content.

Required string length: 1 - 256

Response

Successful response

file_id
string
required

Server-assigned ID of the pending file.

upload_url
string
required

Signed URL the sandbox must PUT the file bytes to.

upload_headers
object
required

Headers that must be sent verbatim with the PUT; they are covered by the URL signature.

expires_at
string<date-time>
required

When the upload URL stops being valid.