NAV Navbar
curl

Send chat message

Overview

Update the Chat conversation with a new message or end the Chat session. Please see the cURL tab to the right for an example.

PUT /api/v1/chat

Request Parameters

Data Type Description
caseId Sting Unique identifier of chat session. (Obtained from Start New Chat API response: POST /api/v1/chat)
messageType Integer Use 1 for normal message, 2 to close chat session.
messageBody String Text of chat message. (utf-8 URL encoded is recommended)

Sample Request

Please see the cURL tab to the right for an example.

curl -i -H 'X-Api-Key:4a9fecdd4c344f279a59d9446157636e' \
-X PUT \
-d 'caseId=44843c55-527c-4f03-a779-e0ce655219f7&messageType=1&messageBody=A new chat message' \
'https://www.snapengage.com/api/v1/chat'

Response Parameters

Data Type Description
caseId String Unique identifier of chat session. (Obtained from Start New Chat API response: POST /api/v1/chat)
messageType Integer Use 1 for normal message, 2 to close chat session.
messageBody String Text of chat message. (utf-8 URL encoded is recommended)

Success Response

200 OK

Please see the json tab to the right for an example.

{
    "caseId":"44843c55-527c-4f03-a779-e0ce655219f7",
    "messageType":1,
    "messageBody":"A new chat message"
}