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

Parameters: archive_chat
NameTypeDescription
chat_id string required string Chat ID from list_chats or list_archived_chats.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/livechat/chats/chat_8c41d2/archive \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("livechat", "archive_chat", {"chat_id":"chat_8c41d2"})
Node.js
const result = await cotlet.call('livechat', 'archive_chat', {"chat_id":"chat_8c41d2"});
CLI
cotlet call livechat archive_chat --data '{"chat_id":"chat_8c41d2"}'

Example response

JSON

{
  "chat_id": "PJ0MRSHTDG",
  "status": "archived",
  "tags": [
    "refund"
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.