Infomaniak Mail icon

Infomaniak Mail

Interact with Infomaniak Mail API

Actions118

Mailboxes > Sieve Filters → Add A Filter

AI-generated

Summary

Add a sieve filter to a mailbox

Inputs

  • authentication — Authentication method; choose 'OAuth2' or 'API Key'
  • path_mail_hosting_id (required) — Unique identifier of the mail hosting to request
  • path_mailbox_name (required) — Username part of the email address for the mailbox
  • body_actions (required) — Action to perform when the filter is triggered
  • body_conditions (required) — Condition that must be met to trigger the filter
  • body_has_all_of (required) — Whether all conditions must be met (true) or any one suffices (false)
  • body_is_enabled (required) — Indicates if the filter is enabled
  • body_name (required) — Name of the filter
  • bodyParameters (required) — Additional body fields for the filter, such as template ID
  • returnFullResponse — If true, the full API response is returned; otherwise only success/failure is indicated

Output shape

a single JSON object representing the newly created sieve filter

When 'returnFullResponse' is true, the complete response is returned; otherwise only a success indicator is provided. The shape may include filter details like ID, name, and status.

Examples

Example 1: Create a filter that forwards all emails with subject 'Invoice' to a specific folder

Authentication: OAuth2; Mail Hosting Id: 123; Mailbox Name: user@example.com; Actions: {"forward":"Folder"}; Conditions: {"subject":"Invoice"}; Has All Of: true; Is Enabled: true; Name: "Forward invoices"; Additional Body Fields: {"templateId":0}; Return Full Response: true

Links

Discussion