Close and archive chat
Stop an active chat and move it to Archives.
POST https://cotlet.dev/api/v1/livechat/chats/{chat_id}/archive
write Confirm
Closes one chat the way Close and archive does in My chats, and the chat moves to Archives with its tags. Tag the chat first, because Archives and tag reports use the tags. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| chat_id string required | string | Chat ID from list_chats or list_archived_chats. |
Request
curl -X POST https://cotlet.dev/api/v1/livechat/chats/chat_8c41d2/archive \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("livechat", "archive_chat", {"chat_id":"chat_8c41d2"}) const result = await cotlet.call('livechat', 'archive_chat', {"chat_id":"chat_8c41d2"}); cotlet call livechat archive_chat --data '{"chat_id":"chat_8c41d2"}' Example response
{
"chat_id": "PJ0MRSHTDG",
"status": "archived",
"tags": [
"refund"
]
}