Apply macro
Apply a macro to one ticket and save the result.
POST https://cotlet.dev/api/v1/zendesk/tickets/{ticket_id}/macros/{macro_id}/apply
Applies the macro's actions to the ticket: it can set fields, add tags and insert a comment, then saves the ticket. The response lists what changed. A macro that adds a public comment emails the requester. If the macro changes a field that is not on the ticket form, or your user lacks permission for the change, that action does not happen. If the ticket changed in the meantime, the call fails and asks you to read the ticket again. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| ticket_id integer required | integer | Ticket ID from search_tickets or list_view_tickets. |
| macro_id integer required | integer | Macro ID from list_macros. |
Request
curl -X POST https://cotlet.dev/api/v1/zendesk/tickets/48177/macros/360011204873/apply \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("zendesk", "apply_macro", {"ticket_id":48177,"macro_id":360011204873}) const result = await cotlet.call('zendesk', 'apply_macro', {"ticket_id":48177,"macro_id":360011204873}); cotlet call zendesk apply_macro --data '{"ticket_id":48177,"macro_id":360011204873}' Example response
{
"ticket_id": 48177,
"macro": {
"macro_id": 360011204873,
"title": "Downgrade and inform"
},
"changes": {
"priority": "low"
},
"comment": {
"public": true,
"body": "Thanks for the idea. We have lowered the priority of your request to low, so it may take longer to get to."
},
"updated_at": "2026-10-16T09:03:00Z"
}