Close Chat

Close a chat session.

URL

Requires Auth

HTTP Method

/api/apps/public/{{app-id}}/incoming

yes

POST

Headers

ArgumentExampleRequiredDescription

X-User-Id

myuser-name

Required

The authenticated user ID.

X-Auth-Token

myauth-token

Required

Auth token.

Path Parameter

ArgumentExampleRequiredDescription

app-id

646b8e7d-f1e1-419e-9478-10d0f5bc74d9

Required

App id

Payload

ArgumentExampleRequiredDescription

action

close-chat

Required

The action

sessionId

2Sfq8wXw4fYPMf6r4

Required

The 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.

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

Change Log

VersionDescription

5.0.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.