Upload a file for a ticket message
curl --request POST \
--url https://my.server.express/api/v1/client/ticket-attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '<string>'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://my.server.express/api/v1/client/ticket-attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/ticket-attachments"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"contentType": "<string>",
"size": 123,
"inline": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Tickets
Upload a file for a ticket message
Send the file’s raw bytes as the body and its name in ?name=. The upload stays pending until a ticket or message names its
id in attachmentIds; unsent uploads are swept after 24 hours. Up to 10 MB (413). Accepted extensions: png, jpg, jpeg, gif,
webp, pdf, zip, gz, tgz, txt, log, csv, json, conf, yml, yaml — and the bytes must match the extension (415). At most 20
pending uploads per person and 20 uploads a minute per credential (429).
POST
/
v1
/
client
/
ticket-attachments
Upload a file for a ticket message
curl --request POST \
--url https://my.server.express/api/v1/client/ticket-attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '<string>'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://my.server.express/api/v1/client/ticket-attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/ticket-attachments"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"contentType": "<string>",
"size": 123,
"inline": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
bearerAuthapiToken
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Query Parameters
The file name, including its extension.
Minimum string length:
1Body
application/octet-stream
The body is of type file.
Maximum string length:
10485760