Send Chat Message
(Last Updated On: February 25, 2014)
Overview

Update the Chat conversation with a new message or end the Chat session.

PUT /api/v1/chat

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

Sample Request

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
caseId Unique identifier of chat session. (Obtained from Start New Chat API response: POST /api/v1/chat)
messageType Use 1 for normal message, 2 to close chat session.
messageBody Text of chat message. (utf-8 URL encoded is recommended)

Success Response

200 OK

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

Error Responses

Please see the Error Responses document.