Integration

Foundation CMS and Mailchimp

A newsletter sign-up on a Foundation CMS site can add the subscriber to a Mailchimp audience directly, with a REST call from the form. Set the status to pending and Mailchimp sends its own confirmation email, so every subscriber has opted in twice.

Overview

This integration connects Foundation CMS with Mailchimp. Foundation CMS is Swarm Labs' multi-tenant content management system on Cloudflare Workers. It holds a site's content and hands it to the site as whole, typed records, and every site runs as its own Worker with its own database and media bucket. Form delivery in Foundation CMS includes a REST call: a method, an HTTPS address, one authentication header, and a JSON body whose keys you name and fill from the form's questions or from fixed values. Mailchimp's members endpoint takes an email address and a status in exactly that shape, with the API key in a Basic authorisation header.

Business Context and Core Use Case

Sign-up forms are often the one place a site still relies on an embedded third-party form, with its own styling and its own scripts. On Foundation CMS the form is the site's own, styled with the site and validated by it, and the address is passed to Mailchimp when the submission is accepted.

The Applications Involved

Foundation CMS (Foundation CMS) renders and validates the sign-up form and delivers it.

Mailchimp (Mailchimp) adds the subscriber to the audience and handles confirmation and sending.

How the Integration Works

Add a REST call to the form's delivery: POST to the audience's members endpoint, with an Authorization header carrying the API key. Map email_address to the form's email question and set status to the fixed value pending, so Mailchimp sends its confirmation. Merge fields such as first name sit in a nested object the direct call does not build; to fill them, send the form's signed webhook to n8n or Zapier instead.

Immediate Operational Value

The sign-up form looks like the rest of the site, loads no third-party script, and feeds the audience directly. Confirmation keeps the list clean and the consent provable.

Security, Access, and Governance

The key is sent only to the HTTPS address configured, and every attempt is logged. The form's retention setting decides how long submissions are kept on the site, separately from Mailchimp's own records.

Summary

A Foundation CMS form can feed a Mailchimp audience with a single REST call, using Mailchimp's own confirmation for a clean, opted-in list.

Frequently asked questions

Do we need Mailchimp's embedded form?

No. The form is the site's own, and the address is passed to Mailchimp when the submission is accepted.

Can we send first and last names too?

Mailchimp keeps those in merge fields, which the direct call cannot build; route the form's signed webhook through n8n or Zapier for that.

Is it double opt-in?

Set status to pending and Mailchimp sends a confirmation email before the person is subscribed.

Want Foundation CMS and Mailchimp
wired up for you?