Update Rule
gorgias_update_ruleUpdate a Gorgias rule by ID: toggle activation, adjust priority, or edit description without resending the entire rule.
Instructions
PUT /api/rules/{id} — Update a rule by ID. All body fields are optional; only the fields you supply will be modified. Common partial updates: toggle deactivated_datetime, bump priority, edit description without resending name+code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unique ID of the rule to update | |
| code | No | The logic of the rule as JavaScript code | |
| name | No | The name of the rule | |
| code_ast | No | The logic of the rule as an ESTree AST representation (auto-generated from code if not specified) | |
| priority | No | Order of execution; rules with higher priority values are executed first | |
| description | No | A human-readable description of the rule | |
| event_types | No | Comma-separated list of events that trigger this rule. Allowed values: ticket-created, ticket-updated, ticket-message-created, ticket-assigned, ticket-self-unsnoozed, satisfaction-survey-responded | |
| deactivated_datetime | No | ISO 8601 datetime when the rule was deactivated. Set to null to reactivate the rule |