Clienvy API documentation

Upload a file

POST
https://api.clienvy.io/employee/v1
/files

Uploads a file and returns it. The returned id can be used wherever the API accepts a file_id / file_ids (invoice and deal attachments, ticket mails, proposals, …). Any file but a program (exe, msi, bat and the like), max 100 MB. Send the request as multipart/form-data.

Upload a file › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Upload a file › Request Body

file
​string · binary · required

The file to upload.

optimize
​boolean

Optimise (compress) uploaded images (only jpg, jpeg, png). Defaults to true.

max_image_dimension
​integer

Maximum width/height in pixels to resize images to (max 2500).

Upload a file › Responses

FileResource

id
​string · uuid
name
​string
file_type
​string
file_size
​integer
url
​string
x300_image_url
​string | null
x800_image_url
​string | null
x1500_image_url
​string | null
image_width
​integer | null
image_height
​integer | null
updated_at
​string · date-time
created_at
​string · date-time

Create an upload token

POST
https://api.clienvy.io/employee/v1
/files/upload-tokens

A key to upload files for an hour from where the token of this session is not at hand, such as the sandbox of an AI client. Send it as Authorization: Bearer <token>, with X-Organization-Id, to Upload a file, Upload an HTML bundle and Send files to an HTML bundle, as multipart/form-data. It uploads as this employee with the access of this session, works for no other endpoint, and stops when this session ends.

Create an upload token › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Create an upload token › Responses

FileUploadTokenResource

token
​string

The key, shown only now: send it as Authorization: Bearer <token>.

expires_at
​string
organization_id
​string

Send it as the X-Organization-Id header.

api_url
​string

Where the upload endpoints start, such as <api_url>/files.