Synology MailPlus icon

Synology MailPlus

Synology MailPlus API operations (18 endpoints + legacy support)

Create Filter

AI-generated

Summary

Create a new email filter in Synology MailPlus by specifying filter conditions and actions, set its enabled state, and optionally apply it to existing messages.

Inputs

  • Filter Conditions (JSON) (required) — JSON array defining one or more conditions to match incoming emails (e.g., sender address, subject).
  • Filter Actions (JSON) (required) — JSON array specifying the actions to be performed when the filter conditions match (e.g., setting a label).
  • Filter Enabled — Boolean to enable or disable the filter upon creation (default: true).
  • Apply to Existing — Boolean indicating whether the filter should be applied immediately to existing matching messages (default: false).

Output shape

a single JSON object representing the created filter or an error response

Returns the API response indicating success or failure of filter creation.

Examples

Example 1: Create a filter that labels emails from 'test@example.com' with label '1' and enable it

Provide filterConditions as [{"name":"from","value":"test@example.com"}], filterActions as [{"name":"set_label","value":"1"}], set filterEnabled true and applyExisting false.

Links

Discussion