Email Rules

Change a rule

Renames the rule, saves a new version (english, tree and explanation together; earlier versions are kept unchanged) or changes its state: draft (disabled), observe or active. Only the rule's author may rename it, add a version or move it to observe or active; anyone else who can see it may only disable it (state draft). Needs mail:read, a credential acting as a member with their full access (API keys, agent keys and narrowed tokens are refused), and the email rules feature on the organization.

patch/email-rules/{id}

Request

  • Base URL
    https://api.primitive.dev/v1
  • URL
    https://api.primitive.dev/v1/email-rules/{id}
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

The rule id.

Request body

namestring

A short name for the rule.

state'draft' | 'observe' | 'active'

draft disables the rule; observe records decisions; active also grants what it matches. Keys read and receive what a rule granted only while it is active: leaving active pauses that, and returning to active restores reads and the delivery of queued mail not yet skipped.

englishstring

The plain-English description the rule was compiled from.

explanationstring

What the rule matches, in plain English.

assumptionsstring[]

Readings chosen where the description was open to more than one.

warningsstring[]

Parts of the description the rule does not express.

compiled_bystring

Who produced the tree, as the caller states it (not verified): the compile response's compiled_by, or member when you wrote or edited it yourself. Defaults to member.

Response

Change a rule

successtrue required

Changes

No operation changes recorded.