Infomaniak Mail icon

Infomaniak Mail

Interact with Infomaniak Mail API

Actions118

Mailboxes > Sieve Filters → Import .siv File

AI-generated

Summary

Import a .siv file to create or update a sieve filter for a specific mailbox

Inputs

  • authentication — Authentication method: OAuth2 (default) or API Key
  • path_mail_hosting_id (required) — ID of the mail hosting containing the mailbox
  • path_mailbox_name (required) — Username part of the email address for the mailbox
  • body_file (required) — Base64‑encoded content of the .siv filter script
  • body_name (required) — Name to assign to the imported sieve filter
  • returnFullResponse — If true, the full server response is returned; otherwise only success/failure is reported

Output shape

The server's response indicating the result of the import – on success it contains the newly created filter object; on failure an error object; typically no body when only status is needed (controlled by returnFullResponse)

Response shape depends on returnFullResponse; may include pagination or additional metadata but generally returns the imported filter details or an error description

Examples

Example 1: Add a custom sieve filter for user alice@example.com

authentication: oauth2; path_mail_hosting_id: 3; path_mailbox_name: alice; body_file: ; body_name: custom-filter; returnFullResponse: false

Example 2: Import a saved .siv script using an API key

authentication: apiKey; path_mail_hosting_id: 7; path_mailbox_name: bob; body_file: bXlfc3VwZXJzLXJzY3Vycw==; body_name: spam-filter; returnFullResponse: true

Links

Discussion