Rules

Update a rule

Updates the specified rule. All fields are optional — only provided fields are updated. The same validation rules apply as on create.

put/v3/rules/{rule_id}

Request body

namestring
descriptionstring
priorityinteger
enabledboolean
trigger'inbound' | 'outbound'

The trigger the rule listens for. Inbound rules accept only from.* conditions. Outbound rules accept from.*, recipient.*, and outbound.type.

Example request

{
  "name": "Block spam domains (updated)",
  "actions": [
    {
      "value": "Receipts"
    }
  ]
}

Response

OK

request_idstring

ID of the request.

Example response

{
  "request_id": "5fa64c92-e840-4357-86b9-2aa364d35b88",
  "data": {
    "id": "c1d2e3f4-5678-4abc-9def-0123456789ab",
    "name": "Block spam domains",
    "description": "Rejects messages from known spam domains at the SMTP level.",
    "priority": 1,
    "enabled": true,
    "trigger": "inbound",
    "match": {
      "operator": "any",
      "conditions": [
        {
          "field": "from.domain",
          "operator": "is"
        }
      ]
    },
    "actions": [
      {
        "type": "block",
        "value": "Receipts"
      }
    ],
    "application_id": "ad410018-d306-43f9-8361-fa5d7b2172e0",
    "organization_id": "org-abc123",
    "created_at": 1742932766,
    "updated_at": 1742932766
  }
}

Changes