POST
/
v1
/
files
Upload a file
curl --request POST \
  --url https://api.steuerboard.com/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-client-id: <x-client-id>' \
  --form workspaceId=cmf41ajzv003706un4i99q19z \
  --form labelIds=cmf41ajzv003706un4i99q19z \
  --form name=document.pdf \
  --form folderId=cmf41ajzv003706un4i99q19z \
  --form taskId=cmf41ajzv003706un4i99q19z \
  --form file=@example-file
{
  "id": "cmf41ajzv003706un4i99q19z",
  "documentDate": "2021-01-01T00:00:00Z",
  "createdAt": "2021-01-01T00:00:00Z",
  "updatedAt": "2021-01-01T00:00:00Z",
  "name": "document.pdf",
  "mimetype": "application/pdf",
  "size": 1024,
  "workspaceId": "cmf41ajzv003706un4i99q19z",
  "createdById": "cmf41ajzv003706un4i99q19z",
  "taskId": "cmf41ajzv003706un4i99q19z",
  "folderId": "cmf41ajzv003706un4i99q19z",
  "labelIds": [
    "cmf41ajzv003706un4i99q19z"
  ]
}

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
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:
["cmf41ajzv003706un4i99q19z"]
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 | null
required

The date of the document (not the upload date)

Example:

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

createdAt
string
required

The date and time of the creation for the file

Example:

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

updatedAt
string
required

The date and time of the last update for the file

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:
["cmf41ajzv003706un4i99q19z"]