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

PUT

/api/attachment/{system}

Upload a new attachment for the specified system. This endpoint does not assign the attachment to a context

Scope:

client

or

operator

Request Parameters

Path

2

system

required

The system to link the attahcment to (chat, ticket, callback)

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

attachment_id

The id of the attachment

A

url

The attachment url in html format

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

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

 }