1-877-548-3001 Sign in About Contact
Developer

PUT

/api/attachment/{system}/{id}

Upload a new attachment for the specified system

Scope:

client

or

operator

Request Parameters

Path

2

chat_session_id

required

The chat session id to link the attachment to

Query

A

name

required

The name of the file

A

length

required

The length of the file

A

data

required

The file data in format (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAC1QAAAPHCAIAAAAaMn6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ)

Response

Schema

{}

payload

The attachment data

{}

A

chatMessage

The chat message in html format

A

createdTime

The date/time the attachment was created in format YYYY-MM-DDTHH:MM:SSZ

A

fromName

The name of the person sending the attachment

2

messageId

The message id of the attachment

2

messageSubType

The message subtype

2

messageType

The message type

2

operatorId

The operator id handling the chat

A

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

 }