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) |
apiKey |
String | Your API key (must be a $ env variable reference, required) |
Example
{
"forms": {
"contact": {
"name": "Contact Form",
"actions": [
{
"app": "mailchimp",
"type": "addOrUpdateContact",
"audience": "8djs8fg8d",
"apiKey": "$MAILCHIMP_APIKEY"
}
]
}
}
}
Validation rules
The add or update contact action adds the following validation rules implicitly:
Field | Validation Rule |
---|---|
_replyto or email |
Required |
_replyto |
Type is email |
email |
Type is email |