Skip to main content
POST
/
api
/
v2
/
conversations
/
{conversationId}
/
end
End a conversation
curl --request POST \
  --url https://app.livechatai.com/api/v2/conversations/{conversationId}/end \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "user_1234567890"
}
'
{
  "status": "success",
  "message": "Conversation resolved successfully",
  "data": {
    "conversationId": "chat_1234567890",
    "userId": "user_1234567890",
    "contactId": "contact_1234567890"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

conversationId
string
required

Unique identifier of the conversation to end

Example:

"chat_1234567890"

Body

application/json

Optional user ID who is ending the conversation

userId
string

ID of the user ending the conversation (optional). If not provided, uses the agent assigned to the chat, or the workspace owner if no agent is assigned.

Example:

"user_1234567890"

Response

Conversation resolved successfully

status
string
Example:

"success"

message
string
Example:

"Conversation resolved successfully"

data
object