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
| Name | Type | Description |
|---|---|---|
| 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 -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"]}' result = client.call("gladly", "apply_topics", {"conversation_id":"HXRqKC5GSV-jAlq0-sxYTA","add":["Z_Oto7j-Sy2DlQdnZBDdDw"]}) const result = await cotlet.call('gladly', 'apply_topics', {"conversation_id":"HXRqKC5GSV-jAlq0-sxYTA","add":["Z_Oto7j-Sy2DlQdnZBDdDw"]}); cotlet call gladly apply_topics --data '{"conversation_id":"HXRqKC5GSV-jAlq0-sxYTA","add":["Z_Oto7j-Sy2DlQdnZBDdDw"]}' Example response
{
"conversation_id": "HXRqKC5GSV-jAlq0-sxYTA",
"topics": [
"Order Status"
]
}