Infomaniak Mail icon

Infomaniak Mail

Interact with Infomaniak Mail API

Actions118

Mailboxes > Folders → Purge Spam Folder

AI-generated

Summary

Purges the Spam folder of a specified mailbox for a given mail hosting.

Inputs

  • authentication — Authentication method to use, either OAuth2 or API Key.
  • path_mail_hosting_id (required) — The numeric identifier of the mail hosting containing the folder.
  • path_mailbox_name (required) — The username (part before @) of the email address whose Spam folder to purge.
  • returnFullResponse — When true, the full API response is returned; otherwise only a success indicator is provided.

Output shape

no body — success/failure only

On success a 200 OK is returned with an empty body; if returnFullResponse is enabled the full response payload is delivered. Errors are propagated as n8n error nodes.

Examples

Example 1: Purge Spam folder for a specific mailbox using OAuth2

authentication: oauth2, path_mail_hosting_id: 12, path_mailbox_name: "user@example.com", returnFullResponse: false

Example 2: Delete Spam folder via API Key and request full response

authentication: apiKey, path_mail_hosting_id: 7, path_mailbox_name: "john.doe", returnFullResponse: true

Example 3: Batch purge using API Key across multiple mailboxes

authentication: apiKey, path_mail_hosting_id: 3, path_mailbox_name: "admin", returnFullResponse: false

Links

Discussion