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

Parameters: update_macro
NameTypeDescription
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
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}'
Python
result = client.call("gorgias", "update_macro", {"macro_id":3021,"archived":True})
Node.js
const result = await cotlet.call('gorgias', 'update_macro', {"macro_id":3021,"archived":true});
CLI
cotlet call gorgias update_macro --data '{"macro_id":3021,"archived":true}'

Example response

JSON

{
  "macro_id": 3021,
  "name": "Black Friday 2024 shipping",
  "archived": true
}

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.