Skip to navigation

Close a conversation

Ends the conversation. The next conversation with the same customer starts with no prior context.

Nothing is deleted: the transcript remains and stays readable. Closing only stops the earlier history being replayed to the AI. A chat webhook event follows with status: closed and context_reset: true.

Authentication

AuthorizationBearer

Your API key, issued by ParsChat sales. One key per account, spanning every robot you own. Send it as Authorization: Bearer pk_live_….

Path parameters

conversation_idstringRequired
The conversation's id, as it arrives on every webhook event.

Response

The conversation is closed.
idstringOptional
ParsChat identifier for the conversation.
robot_idstringOptional
The robot that owns it.
channel_idstringOptional
The channel it arrived on.
statusenumOptional

Current state. The same vocabulary as the chat webhook event.

Allowed values:
clientobjectOptional
The end customer.
last_message_atdatetimeOptional
When the most recent message arrived.
unread_countintegerOptional

Customer messages since the last reply from an operator, the AI or an agent: what is still waiting for an answer. System notices do not count as replies.

created_atdatetimeOptional
When the conversation started.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error