Skip to main content
POST
Upload a file

Authorizations

Authorization
string
header
required

Bearer token authentication

Headers

x-client-id
string<cuid>
required

The ID of the client

Example:

"cmf41ajzv003706un4i99q19z"

Body

multipart/form-data

The file to upload

workspaceId
string<cuid>
required

The ID of the workspace

Example:

"cmf41ajzv003706un4i99q19z"

file
file
required

The file to upload

labelIds
string<cuid>[]

The IDs of the labels to add to the file

Example:
name
string

The name of the file

Example:

"document.pdf"

folderId
string<cuid>

The ID of the folder to upload the file to

Example:

"cmf41ajzv003706un4i99q19z"

taskId
string<cuid>

The ID of the task to upload this file to.

Example:

"cmf41ajzv003706un4i99q19z"

Response

File created successfully

id
string<cuid>
required

The ID of the file

Example:

"cmf41ajzv003706un4i99q19z"

documentDate
string<date-time> | null
required

The date of the document (not the upload date)

Example:

"2021-01-01T00:00:00Z"

createdAt
string<date-time>
required

The date and time of the creation for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).

Example:

"2021-01-01T00:00:00Z"

updatedAt
string<date-time>
required

The date and time of the last update for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).

Example:

"2021-01-01T00:00:00Z"

name
string
required

The name of the file

Example:

"document.pdf"

mimetype
string
required

The mime type of the file

Example:

"application/pdf"

size
number
required

The size of the file in bytes

Example:

1024

workspaceId
string<cuid>
required

The ID of the workspace

Example:

"cmf41ajzv003706un4i99q19z"

createdById
string<cuid> | null
required

The ID of the creator

Example:

"cmf41ajzv003706un4i99q19z"

taskId
string<cuid> | null
required

The ID of the task this file was uploaded to.

Example:

"cmf41ajzv003706un4i99q19z"

folderId
string<cuid> | null
required

The ID of the folder this file was uploaded to.

Example:

"cmf41ajzv003706un4i99q19z"

labelIds
string<cuid>[] | null
required

The IDs of the assigned labels

Example: