Files

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

post
Upload a user file

https://api.tiledesk.com/v2/files/users
Allows to upload an file with autentication
Request
Response
Request
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "multipart/form-data" value
Body Parameters
file
required
binary
the binary file
Response
200: OK
{
"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 [email protected]:123456 -F [email protected]/Users/andrealeo/dev/chat21/tiledesk-server-dev-org/README.md https://api.tiledesk.com/v2/files/users

get
Get the file binary by filename path

https://api.tiledesk.com/v2/files
Request
Response
Request
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Response
200: OK
<binary>

Example

curl -v -X GET -H -u [email protected]:123456 https://api.tiledesk.com/v2/files?path=uploads/users/5ebd890292befe0019054973/files/27a8e524-d854-4aff-a6c7-84cb02681f34/README.md