Files

You can use the API to get or upload binary files.

Upload a user file

POST https://api.tiledesk.com/v3/files/users

Allows to upload an file with autentication

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

Content-Type

string

use "multipart/form-data" value

Request Body

Name
Type
Description

file

binary

the binary file

  {
    "message":"File uploded successfully",
    "filename":"uploads/users/5ebd890292befe0019054973/files/27a8e524-d854-4aff-a6c7-84cb02681f34/README.md"
  }

Example:

curl -v -X POST -H 'Content-Type: multipart/form-data' -u andrea.leo@f21.it:123456  -F file=@/Users/andrealeo/dev/chat21/tiledesk-server-dev-org/README.md https://api.tiledesk.com/v3/files/users

Get the binary file as stream by filename path

GET https://api.tiledesk.com/v3/files

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

<binary>

Example

curl -v -X GET -H  -u andrea.leo@f21.it:123456 https://api.tiledesk.com/v3/files?path=uploads/users/5ebd890292befe0019054973/files/27a8e524-d854-4aff-a6c7-84cb02681f34/README.md

Download the binary file by filename path

GET https://api.tiledesk.com/v3/files/download

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

<binary>

Example

curl -v -X GET -H  -u andrea.leo@f21.it:123456 https://api.tiledesk.com/v3/files/download?path=uploads/users/5ebd890292befe0019054973/files/27a8e524-d854-4aff-a6c7-84cb02681f34/README.md

Last updated