Product

Embed forms

Signup forms capture emails on your storefront or landing pages and send them into MailPirate.

Create a form

  1. Open Signup forms (Forms).
  2. Click New form - opens the form builder.
  3. Edit with a live preview:
    • Basics - internal name, headline, supporting text, button, success message, list, live/off, double opt-in
    • Layout - stack, inline, split, or compact
    • Fields - toggle email (always on), first name, last name, phone; reorder; labels and placeholders
    • Look - colors, font, alignment, padding, gap, corner radius, max width, optional legal line
  4. Save, then publish (see below). Live forms show as Live on the list.

Typical defaults: headline “Join the list”, button “Subscribe”, success “Thanks - check your email to confirm.”

If you use MailPirate for WooCommerce:

  1. Open the form in MailPirate and copy the WordPress shortcode, e.g. [mailpirate_form id="01H..."].
  2. Paste it into any page, post, widget, or page builder that accepts shortcodes.
  3. Or in the block editor, add the MailPirate Form block and pick a live form.

The plugin loads MailPirate’s form script once per page, even if you place several forms. Design changes apply after you save in MailPirate - you do not need to republish the WordPress page.

Plugin setup (API token + store slug) is the same as for abandoned cart.

Publish with HTML (any site)

For Shopify, custom themes, or landing pages without the plugin:

  1. Place a mount where the form should appear:
<div data-mp-form="01H..."></div>
  1. Load the script once per page (theme footer is fine), even with multiple mounts:
<script src="https://app.mailpirate.com/js/mp-form.js" async></script>

You can repeat the mount div for different form IDs. Do not paste a full script tag for every form.

The embed fetches your saved design and posts to the public subscribe endpoint for that form’s public ID. Visitors never need a Marketing API token. Re-save in the builder to update every placement without changing the mount markup.

What happens on submit

  1. Visitor enters email (and optional name/phone fields if present).
  2. MailPirate upserts a profile for that store.
  3. The person is added to the form’s list (or the default newsletter list).
  4. If DOI is required, status stays pending until they confirm; otherwise they can become subscribed immediately per your settings.
  5. The success message from the form is shown / returned.

All visitor form traffic (script, config, subscribe) goes to MailPirate. The merchant page only hosts the mount point (or the plugin shortcode/block).

Building your own UI

If you do not want the embed script, call the JSON endpoint yourself:

POST /api/v1/marketing/forms/{form_public_id}/subscribe

Body:

{
  "email": "[email protected]",
  "first_name": "Ada",
  "last_name": "Lovelace"
}

No Marketing API token. Rate limit: 30 requests per minute. Disabled or unknown forms return 404.

Full reference: Embed form endpoint.

Preferences after signup

Recipients can manage topics later from the preference link in emails, or unsubscribe from all. Keep {{ preferences_url }} and {{ unsubscribe_url }} in every marketing template.