Add tag
Add a tag to a ticket.
POST https://cotlet.dev/api/v1/zammad/tickets/{ticket_id}/tags
write
Adds one tag and returns the ticket's tags. A tag that does not exist is created only if your account may create tags, otherwise the call fails and says so. A tag reaches no customer and one remove_tag call undoes it, so it does not wait for your OK. Tags do not necessarily start a Zammad trigger.
Parameters
| Name | Type | Description |
|---|---|---|
| ticket_id integer required | integer | Ticket ID from search_tickets, list_overview_tickets or the ticket address (#ticket/zoom/{ticket_id}). |
| tag string required | string | Tag name, e.g. 'refund'. |
Request
curl -X POST https://cotlet.dev/api/v1/zammad/tickets/1/tags \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag":"refund"}' result = client.call("zammad", "add_tag", {"ticket_id":1,"tag":"refund"}) const result = await cotlet.call('zammad', 'add_tag', {"ticket_id":1,"tag":"refund"}); cotlet call zammad add_tag --data '{"ticket_id":1,"tag":"refund"}' Example response
{
"ticket_id": 4812,
"tags": [
"refund",
"billing"
]
}