Upload a new attachment for the specified system
Scope:
client
or
operator
chat_session_id
required
The chat session id to link the attachment to
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
chatMessage
The chat message in html format
createdTime
The date/time the attachment was created in format YYYY-MM-DDTHH:MM:SSZ
fromName
The name of the person sending the attachment
messageId
The message id of the attachment
messageSubType
The message subtype
messageType
The message type
operatorId
The operator id handling the chat
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
https://developer.livehelpnow.net/api/attachment/chat/{{12345678}}
example response
1
{
2
"payload": {
3
"chatMessage"
: "<a href='//10.211.55.5/lhn/console/docview.aspx?c=1&src=rackspace&s=Chats&ct=data:image/png&f=c44118a6-5d3e-4426-054b-6cc82d5febbe.jpg&of=john_doe.jpg' target='_blank'><img src='//10.211.55.5/lhn/console/docview.aspx?c=1&src=rackspace&s=Chats&ct=data:image/png&f=c44118a6-5d3e-4426-054b-6cc82d5febbe.jpg&of=john_doe.jpg' alt='john_doe.jpg' /></a>",
4
"createdTime"
: "2021-06-29T13:39:02",
5
"fromName"
: "John",
6
"messageId"
: 1212205273,
7
"messageSubType"
: 50,
8
"messageType"
: 3,
9
"operatorId"
: 94831,
10
},
11
"status": "ok"
12
}