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

POST

/api/chat/{id}/message

Insert a chat message into the specified chat

Scope:

client

or

client

or

client

or

client

or

operator

Request Parameters

Path

2

id

required

The id of the chat where the message is to be inserted

Query

A

message

required

The message that will be inserted into the chat

2

message_type

optional

The message type to be used

2

message_sub_type

optional

The message subtype to be used

A

from_name

optional

The name to be used for message sender

Response

Schema

{}

payload

The post chat message data

{}

A

chatMessage

The message that was sent for the invite

A

createdTime

he date and time the invite was sent in format YYYY-MM-DDTHH:MM:SSZ

A

fromName

The name of the operator who sent the invite

2

messageId

The id of the message

2

messageSubType

The message subtype

2

messageType

The message type

2

operatorId

The id of the operator who sent the invite

A

status

The system response status. Will be ok or error

curl

example request

1

curl -X POST -d '{"message":"Test Message"}'

2

-H "Content-Type: application/json"

3

-H "Authorization: Bearer {{Oauth Token}}"

4

https://developer.livehelpnow.net/api/chat/{{102317790}}/message

example response

      
        

1

 {

2

   "payload": {

3

     "chatMessage"

: "Testing chat message endpoint",

4

     "createdTime"

: "2021-07-01T07:47:20",

5

     "fromName"

: "John",

6

     "messageId"

: "12345678",

7

     "messageSubType"

: 9,

8

     "messageType"

: 3,

9

     "operatorId"

: 24638

10

  },

11

  "status": "ok"

12

 }