In order to close a conversation you simply use the same SEND API endpoint you use to send a message. However, the payload type is different i.e. not ms.PublishEvent type but cm.UpdateConversationField type. The conversation ID is passed in the Payload in this method as well.

Getting Started

  1. Retrieve your domain. Use the LivePerson Domain API to retrieve this information by providing the following service name:

    • asyncMessagingEnt
  2. Here are the API terms of use.

Close a conversation

Request URI

Method URL
POST https://{domain}/api/account/{accountid}/messaging/consumer/conversation/send?v=3

Request Headers

Header Description
Authorization The AppJWT token (see details here)
X-LP-ON-BEHALF The ConsumerJWS token (see details here)

Example Request Body - JSON Payload

{  
   "kind":"req",
   "id":1,
   "body":{  
      "conversationId":"{conversationId}",
      "conversationField":{  
         "field":"ConversationStateField",
         "conversationState":"CLOSE"
      }
   },
   "type":"cm.UpdateConversationField"
}