Upload an evidence attachment for one of the caller's support tickets.
POST
/v1/support/{id}/attachments
const url = 'https://api.share2.us/v1/support/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/attachments';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.share2.us/v1/support/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/attachments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@fileAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
file
required
Txt, log, md, pdf, png, jpg/jpeg, or zip; 5 MB maximum.
string format: binary
Responses
Section titled “Responses”Attachment stored.
Media typeapplication/json
object
attachment
required
object
id
required
string format: uuid
ticket_id
string format: uuid
message_id
string format: uuid
uploader_type
required
string
file_name
required
string
content_type
required
string
size_bytes
required
integer
created_at
required
string format: date-time
Example
{ "attachment": { "uploader_type": "user", "content_type": "text/plain" }}default
Section titled “default”Standard error envelope.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "quota_exceeded" }}