Apply topics

Add Topics to a Conversation, or remove them.

POST https://cotlet.dev/api/v1/gladly/conversations/{conversation_id}/topics/apply

write

Sets the Topics at the bottom of the Conversation, as the Topics menu does. A Topic already on the Conversation is ignored. Returns the Topics now on it. It reaches no one and one call undoes it, so it needs no confirmation.

Parameters

Parameters: apply_topics
NameTypeDescription
conversation_id string required string Conversation ID from list_my_customers, list_conversations or get_customer.
add array array Topic IDs from list_topics to add.
remove array array Topic IDs to remove.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/gladly/conversations/HXRqKC5GSV-jAlq0-sxYTA/topics/apply \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"add":["Z_Oto7j-Sy2DlQdnZBDdDw"]}'
Python
result = client.call("gladly", "apply_topics", {"conversation_id":"HXRqKC5GSV-jAlq0-sxYTA","add":["Z_Oto7j-Sy2DlQdnZBDdDw"]})
Node.js
const result = await cotlet.call('gladly', 'apply_topics', {"conversation_id":"HXRqKC5GSV-jAlq0-sxYTA","add":["Z_Oto7j-Sy2DlQdnZBDdDw"]});
CLI
cotlet call gladly apply_topics --data '{"conversation_id":"HXRqKC5GSV-jAlq0-sxYTA","add":["Z_Oto7j-Sy2DlQdnZBDdDw"]}'

Example response

JSON

{
  "conversation_id": "HXRqKC5GSV-jAlq0-sxYTA",
  "topics": [
    "Order Status"
  ]
}

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.