⌘I

Add subscribers to a Mailchimp list

Updated July 14, 2023

The add or update contact action adds or updates a contact in a Mailchimp audience. Under the hood, this action calls the add or update a list member API endpoint. If the call fails, we’ll retry it for you.

Adding the add or update contact action in the formspree.json file has the same effect as adding the Mailchimp plugin in the Formspree dashboard. See the Mailchimp plugin help article for more information. 

Formspree.json configuration

Key Type Description
app  String Must be mailchimp
type   String Must be addOrUpdateContact
audience  String Your Mailchimp audience ID (a static value, required; we recommend using an env variable reference). See Find your Mailchimp Audience ID.
apiKey  String Your API key (must be a $ env variable reference, required)

Example

{
  "forms": {
    "contact": {
      "name": "Contact Form",
      "actions": [
        {
          "app": "mailchimp",
          "type": "addOrUpdateContact",
          "audience": "$MAILCHIMP_AUDIENCE",
          "apiKey": "$MAILCHIMP_APIKEY"
        }
      ]
    }
  }
}

Validation rules

The add or update contact action adds the following validation rules implicitly:

Field Validation Rule
email Required
email Type is email

Still have questions? or .