Update rule

Turn a rule on or off, or rename it.

PATCH https://cotlet.dev/api/v1/gorgias/rules/{rule_id}

write Confirm

Switches a rule on or off. Needs a Lead or Admin user. A rule can reply to customers and set tags on every new ticket, so a change reaches customers. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: update_rule
NameTypeDescription
rule_id integer required integer Rule ID from list_rules.
enabled boolean boolean true turns on, false turns off.
name string string New name.

Request

cURL
curl -X PATCH https://cotlet.dev/api/v1/gorgias/rules/1 \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("gorgias", "update_rule", {"rule_id":1})
Node.js
const result = await cotlet.call('gorgias', 'update_rule', {"rule_id":1});
CLI
cotlet call gorgias update_rule --data '{"rule_id":1}'

Example response

JSON

{
  "rule_id": 512,
  "name": "Tag returns",
  "enabled": false
}

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.