curl --request POST \
--url https://app.usertick.com/api/public/v1/support/tickets/{ticketId}/uploads/from-media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaId": "0b1c2d3e-4f50-4a61-8b72-93a4b5c6d7e8"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mediaId: '0b1c2d3e-4f50-4a61-8b72-93a4b5c6d7e8'})
};
fetch('https://app.usertick.com/api/public/v1/support/tickets/{ticketId}/uploads/from-media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.usertick.com/api/public/v1/support/tickets/{ticketId}/uploads/from-media"
payload = { "mediaId": "0b1c2d3e-4f50-4a61-8b72-93a4b5c6d7e8" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Attach a media library file to a reply
Copies one file of the media library for the member’s next reply on a ticket they opened, which names it in uploadIds of POST /support/tickets//messages. A ticket another member opened reads as one that doesn’t exist (404 PUB-017-001). The body names one file GET /media lists for the member: one of the organization’s library or one of the member’s own uploads. Usertick copies it into the ticket’s private files as an upload, under the rules of an uploaded file: at most 20 MB, the type read from its content, so a video is 415 SUP-005-415. Any other id (another organization’s file, another member’s own upload, a file taken offline or none) is 404 MED-002-001. The copy belongs to the ticket, so a file deleted from the library later stays on it. A member holds at most 20 files that no message took (409 SUP-005-409), and support tickets come with the paid plans (403 SUP-004-001 on Free). Reading the library needs the member’s permission to view surveys. A ticket belongs to a person: an app or an AI assistant acts as the member it signed in as, and an API key, which acts as its organization, is 403 PUB-017-002. 201 with the upload.
Scopes: support:write, surveys:read.
curl --request POST \
--url https://app.usertick.com/api/public/v1/support/tickets/{ticketId}/uploads/from-media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mediaId": "0b1c2d3e-4f50-4a61-8b72-93a4b5c6d7e8"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mediaId: '0b1c2d3e-4f50-4a61-8b72-93a4b5c6d7e8'})
};
fetch('https://app.usertick.com/api/public/v1/support/tickets/{ticketId}/uploads/from-media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.usertick.com/api/public/v1/support/tickets/{ticketId}/uploads/from-media"
payload = { "mediaId": "0b1c2d3e-4f50-4a61-8b72-93a4b5c6d7e8" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Headers
Any 1 to 255 printable ASCII characters, without a space at either end. The answer to the first request with a key is kept for 24 hours per credential: the same request again gets it back (Idempotent-Replayed: true), another request with the key is 409 PUB-002-002, and while the first still runs 409 PUB-002-003. A server error is not kept, and a request that never answered frees its key after 2 minutes: a retry with the key then runs again.
255Body
Response
Copied.
A file waiting for its message. Nobody else sees it until the message is sent, and one that no message takes within 24 hours is deleted.