Add label

Adds a label to a conversation.

POST https://cotlet.dev/api/v1/trengo/conversations/{conversation_id}/labels

write

Uses the label icon of the conversation. A name that does not exist, is archived or is not set up for the conversation's channel fails at once, and the error lists the labels you can use. It reaches nobody and is undone with remove_label, so it runs without confirmation. An automation of yours that listens for a new label, such as a Zap on Ticket label added, still runs.

Parameters

Parameters: add_label
NameTypeDescription
conversation_id integer required integer Conversation ID from list_conversations or search_conversations.
label string required string Label name from list_labels.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/trengo/conversations/5120344/labels \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Billing"}'
Python
result = client.call("trengo", "add_label", {"conversation_id":5120344,"label":"Billing"})
Node.js
const result = await cotlet.call('trengo', 'add_label', {"conversation_id":5120344,"label":"Billing"});
CLI
cotlet call trengo add_label --data '{"conversation_id":5120344,"label":"Billing"}'

Example response

JSON

{
  "conversation_id": 5120344,
  "labels": [
    "Billing"
  ]
}

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.