Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
66 lines (46 loc) · 2.1 KB

File metadata and controls

66 lines (46 loc) · 2.1 KB

Close Chat

Close a chat session.

URL Requires Auth HTTP Method
/api/apps/public/{{app-id}}/incoming yes POST

Headers

ArgumentExampleRequiredDescription
X-User-Idmyuser-nameRequiredThe authenticated user ID.
X-Auth-Tokenmyauth-tokenRequiredAuth token.

Path Parameter

ArgumentExampleRequiredDescription
app-id646b8e7d-f1e1-419e-9478-10d0f5bc74d9RequiredApp id

Payload

ArgumentExampleRequiredDescription
actionclose-chatRequiredThe action
sessionId
2Sfq8wXw4fYPMf6r4
RequiredThe id of the Rasa session

Example Call

curl "http://localhost:3000/api/apps/public/646b8e7d-f1e1-419e-9478-10d0f5bc74d9/incoming" \
-X POST \
-H "Content-Type: application/json" 
-d "  {
      "action": "close-chat",
      "sessionId": "2Sfq8wXw4fYPMf6r4"
  }" 

Example Result

Success

 {
      "msg": " Close chat request handled successfully",

  }

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.

{% tabs %} {% tab title="Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %} {% endtabs %}

Change Log

Version Description
5.0.0 Added