List rules

Your rules with trigger, conditions, actions and run order.

GET https://cotlet.dev/api/v1/gorgias/rules

read

Returns rules in the order they are listed on the Rules page, which is the order they run within one trigger. Needs a Lead or Admin user, because other roles cannot see rules.

Parameters

Parameters: list_rules
NameTypeDescription
enabled boolean boolean Only enabled (true) or only disabled (false) rules. Default: all.

Request

cURL
curl https://cotlet.dev/api/v1/gorgias/rules \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("gorgias", "list_rules")
Node.js
const result = await cotlet.call('gorgias', 'list_rules');
CLI
cotlet call gorgias list_rules

Example response

JSON

{
  "rules": [
    {
      "rule_id": 512,
      "name": "Tag returns",
      "trigger": "Ticket created",
      "enabled": true,
      "conditions": "Message contains \"return\"",
      "actions": [
        "Add tags",
        "Assign team"
      ]
    }
  ]
}

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.