Infomaniak Mail icon

Infomaniak Mail

Interact with Infomaniak Mail API

Actions118

Mailing List → Generate A Form For A Mailing List

AI-generated

Summary

Generates an HTML form for a specified mailing list using Infomaniak API authentication.

Inputs

  • authentication — Authentication method (OAuth2 or API Key) for Infomaniak API
  • path_mail_hosting_id (required) — Identifier of the mail hosting account
  • path_mailing_list_name (required) — Name of the mailing list to generate the form for
  • body_subscribe_submit (required) — Button label for the subscription form
  • body_unsubscribe_submit (required) — Button label for the unsubscribe form
  • body_url_after_subscription (required) — URL to redirect to after successful subscription
  • body_url_after_unsubscription (required) — URL to redirect to after successful unsubscription
  • returnFullResponse — If true, the full API response is returned instead of just the form HTML

Output shape

HTML snippet representing the subscription and unsubscribe form for the mailing list

When returnFullResponse is true the operation returns the complete API response; otherwise it returns only the rendered HTML form.

Examples

Example 1: Create a subscription form for a marketing list

authentication=oauth2; path_mail_hosting_id=12345; path_mailing_list_name=Newsletter; body_subscribe_submit=Subscribe; body_unsubscribe_submit=Unsubscribe; body_url_after_subscription=https://example.com/thanks; body_url_after_unsubscription=https://example.com/goodbye; returnFullResponse=false

Example 2: Generate the form and retrieve the full API response

authentication=apiKey; path_mail_hosting_id=abcde; path_mailing_list_name=Promo; body_subscribe_submit=Join; body_unsubscribe_submit=Leave; body_url_after_subscription=https://site.com/confirm; body_url_after_unsubscription=https://site.com/bye; returnFullResponse=true

Example 3: Minimal form generation using default button labels

authentication=oauth2; path_mail_hosting_id=98765; path_mailing_list_name=Updates; body_subscribe_submit=Subscribe; body_unsubscribe_submit=Unsubscribe; body_url_after_subscription=; body_url_after_unsubscription=; returnFullResponse=false

Links

Discussion