Skip to main content
POST
Upload a file
The request must be multipart/form-data with a single part named file. That part has to be a real file part: its Content-Disposition must include a filename, and it must carry a per-part Content-Type that is in the allowed list below.
Most server-side HTTP clients (Python requests, PHP Guzzle, fetch, axios, OkHttp, …) do not set a filename or a per-part Content-Type automatically — unlike the curl --form file=@... shorthand, which sets both for you. If the file part is sent without a filename, the server treats it as a plain text field and responds with 422 (“file field must contain a file object.”). Make sure your client sets both explicitly on the file part.
Limits and allowed types
  • Maximum file size: 6 MB. Larger uploads are rejected with 413 Content Too Large.
  • Allowed content types: image/*, video/*, text/*, application/pdf, application/rtf, application/msword, application/vnd.openxmlformats-officedocument.* (.docx, .xlsx, .pptx), application/vnd.ms-*, application/vnd.oasis.opendocument.* (.odt, .ods, .odp), application/xml, application/yaml, application/json. A part whose Content-Type is not in this list is rejected with 415 Unsupported Media Type. Generic types such as application/octet-stream and application/zip are not accepted, so make sure your client sends an accurate per-part Content-Type.
Which error means what
  • 400 (“file field is required.”) — there is no part named file in the request at all.
  • 422 (“file field must contain a file object.”) — a part named file is present, but it was sent without a filename, so it is not recognized as a file.

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Body

multipart/form-data
file
file
required

The file to upload, sent as a multipart/form-data file part. The part must include a filename in its Content-Disposition header and a per-part Content-Type from the allowed list (for example application/pdf). Maximum size is 6 MB.

Response

Created

file_token
string
required