Update macro
Edit, archive or unarchive a macro.
PATCH https://cotlet.dev/api/v1/gorgias/macros/{macro_id}
write Confirm
Changes the name, text or archived state of a macro. Needs a Lead or Admin user. A macro change affects every agent and every ticket it is applied to later. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| macro_id integer required | integer | Macro ID from list_macros. |
| name string | string | New name. |
| text string | string | New reply text. |
| archived boolean | boolean | true archives, false unarchives. |
Request
curl -X PATCH https://cotlet.dev/api/v1/gorgias/macros/3021 \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"archived":true}' result = client.call("gorgias", "update_macro", {"macro_id":3021,"archived":True}) const result = await cotlet.call('gorgias', 'update_macro', {"macro_id":3021,"archived":true}); cotlet call gorgias update_macro --data '{"macro_id":3021,"archived":true}' Example response
{
"macro_id": 3021,
"name": "Black Friday 2024 shipping",
"archived": true
}