Email

Add an inbound mail rule

Add a rule that runs on inbound messages matching a field (from/to/subject/body). Actions: drop, mark_read, forward (action_arg = address), webhook_only (skip forward-to), label (action_arg = label). Rules apply in priority order (lower first); first match wins.

post/api/emails/{address}/rules

Request

  • Base URL: https://domani.run
  • URL: https://domani.run/api/emails/{address}/rules
  • Auth: HTTP bearer

Path parameters

addressstring required

Mailbox email address (URL-encoded)

Request body

match_field'from' | 'to' | 'subject' | 'body' required
match_op'contains' | 'equals' | 'regex' required
match_valuestring required
action'drop' | 'mark_read' | 'forward' | 'webhook_only' | 'label' | 'escalate' required
action_argstring

Forward address (for forward), label value (for label), or reason shown to the human (for escalate)

priorityinteger

Lower runs first (default 0)

enabledboolean

Default true

Response

Rule created

idstring
priorityinteger

Lower runs first

match_field'from' | 'to' | 'subject' | 'body'
match_op'contains' | 'equals' | 'regex'
match_valuestring
action'drop' | 'mark_read' | 'forward' | 'webhook_only' | 'label' | 'escalate'
action_argstring nullable
enabledboolean
created_atstring date-time

Changes

No recorded changes to this operation across all 2 revisions of this API.