Skip to main content
POST
Create file
Uploading a file is a two step process. You start by creating a placeholder for the file and then using the upload details of the response to actually upload the file. Each file has a unique id which is used across the API when you need to reference it. You can optionally include custom entity metadata in the metadata field to store your own business data (e.g., descriptions, related entity IDs, processing metadata). If not provided during creation, you can add it later using Set metadata. Below you will find examples in several programming languages to do the upload:
The following example uses file-type package to determine the content-type of the file.

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication.

Body

application/json
category
enum<string>
required

The category of the file.

Available options:
document,
image,
video
contentType
string
required

The content type of the file.

Maximum string length: 100
metadata
object

Additional data for the file.

Response

File created.

file
object
required
errors
object

Additional contextual errors that occurred while processing the request.