Set a chat topic

Label a chat with one of your chat topics, as an agent does in the About chat block.

PUT https://cotlet.dev/api/v1/jivochat/topics/{topic_id}/chats/{chat_id}/topic

write

set_chat_topic sets the topic that the Statistics section counts in its chat topics tab. A topic that does not exist fails at once and the error lists the account's topics. The label reaches nobody outside your team and calling it again with another topic changes it, so it does not wait for your OK.

Parameters

Parameters: set_chat_topic
NameTypeDescription
chat_id string required string Chat ID from list_chats.
topic_id string required string Topic ID from list_chat_topics.

Request

cURL
curl -X PUT https://cotlet.dev/api/v1/jivochat/topics/topic_8c41d2/chats/chat_8c41d2/topic \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("jivochat", "set_chat_topic", {"chat_id":"chat_8c41d2","topic_id":"topic_8c41d2"})
Node.js
const result = await cotlet.call('jivochat', 'set_chat_topic', {"chat_id":"chat_8c41d2","topic_id":"topic_8c41d2"});
CLI
cotlet call jivochat set_chat_topic --data '{"chat_id":"chat_8c41d2","topic_id":"topic_8c41d2"}'

Example response

JSON

{
  "chat_id": "6f1a2b3c",
  "topic": {
    "topic_id": "tp_01",
    "name": "Orders"
  }
}

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.