Developers · Integrations
Mailchimp via API Call Notifications
Last updated 11 November 2026
This document helps you create a Mailchimp integration for Insites using API Call Notifications.
Prerequisites
To follow this tutorial, you must be able to create API Call Notifications. In addition, you must know how to manage integrations and have a Mailchimp account where you can find your API key.
Steps
Integrating Mailchimp using API Call Notifications is a two-step process:
- Step 1: Create an API call notification
- Step 2: Add API call notifications to forms
Step 1: Create an API call notification
Create an API Call Notification:
- Store your Mailchimp API key as a constant, for example
. You can set it with . The API call reads it as . Never put the key itself in the file. - Replace
with the last part of your Mailchimp API key (the part after the , for example, where is the DC_KEY) - Replace
with your Mailchimp Audience ID. Follow the steps outlined in Mailchimp: Find your Audience ID. - Add the payload based on the attributes in your form. The example reads
, and . Use the field names from your form.
---
name: mailchimp_new_host
to: 'https://<<YOUR_DC_KEY>>.api.mailchimp.com/3.0/lists/<<YOUR_AUDIENCE_ID>>/members/'
format: http
request_type: POST
request_headers: >
{
"Content-Type": "application/json",
"Authorization": "apikey {{ context.constants.MAILCHIMP_API_KEY }}"
}
---
{
"email_address": "{{ form.email }}",
"status": "subscribed",
"merge_fields": {
"FNAME": "{{ form.first_name }}",
"LNAME": "{{ form.last_name }}"
}
}Step 2: Add API call notifications to forms
Add the following to the front matter on your form:
api_call_notifications:
- mailchimp_new_host