Upload a new attachment for the specified system. This endpoint does not assign the attachment to a context
Scope:
client
or
operator
system
required
The system to link the attahcment to (chat, ticket, callback)
name
required
The name of the file
length
required
The length of the file
data
required
The file data in format (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAC1QAAAPHCAIAAAAaMn6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ)
payload
The attachment data
attachment_id
The id of the attachment
url
The attachment url in html format
status
The system response status. Will be ok or error
curl
example request
1
curl -X PUT -d '{"name":"test.png","length":1000,"data":"data:image png;base64,iVBORw0KGgoAAAANSUhEUgAAC1QAAAPHCAIAAAAaMn6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ"}'
2
-H "Content-Type: application/json"
3
-H "Authorization: Bearer {{Oauth Token}}
4
curl -X https://developer.livehelpnow.net/api/attachment/{{chat}}
example response
1
{
2
"payload": {
3
"attachment_id"
: "0fefc35b-986d-46e1-8b4c-908d28530454",
4
"url"
: "<a href='//10.211.55.5/lhn/console/docview.aspx?c=1&src=rackspace&s=Chats&ct=data:image/png&f=0fefc35b-986d-46e1-8b4c-908d28530454.png&of=john_doe.png' target='_blank'><img src='//10.211.55.5/lhn/console/docview.aspx?c=1&src=rackspace&s=Chats&ct=data:image/png&f=0fefc35b-986d-46e1-8b4c-908d28530454.png&of=john_doe.png' alt='john_doe.png' /></a>"
5
},
6
"status": "ok"
7
}