Platform
Chatbot Builder Bulk Messaging Team Inbox Mini CRM API & Webhooks AI Integration WhatsApp Flows
Industries
E-commerce & D2C Real Estate Education Healthcare Finance & BFSI Logistics Hospitality Retail
Integrations 📚 Learn 📝 Blog 🗂 Codex Pricing Start Free Trial →
HomeConnect › Connect Mailchimp to WhatsApp
Mailchimp Integration Guide · Marketing / Email

Connect Mailchimp to WhatsApp

Add every WhatsApp opt-in directly to your Mailchimp audience, look up subscriber status before sending a campaign, and keep your email and WhatsApp contact lists in sync automatically, without anyone touching a CSV.

Published 23 June 2026  ·  7 min read  ·  Marketing / Email

Before following this guide, read the External API Request step foundation guide. It covers every field in the step interface so this guide can stay focused on Mailchimp-specific values.

The data centre prefix is the most common Mailchimp mistake

Every Mailchimp account has a unique data centre prefix such as us1, us6, or us21. The base URL for ALL API calls is https://YOUR_DC.api.mailchimp.com/3.0/. The prefix is the last part of your API key after the final hyphen. Key ending in -us6 means your base URL is https://us6.api.mailchimp.com/3.0/. Wrong prefix returns a WrongDatacenter error even with a valid key.

The username is literally 'anystring'

Mailchimp Basic Auth ignores the username entirely. You can put any non-empty string there. Mailchimp's own docs use the word 'anystring'. Only the API key (the password part after the colon) is validated. Base64-encode anystring:YOUR_API_KEY.

Step 1: Get your API key and data centre

1
In Mailchimp, click your profile avatar → Account and billingExtrasAPI keys.
2
Click Create A Key. Give it a label ("WA.Expert"). Copy the key immediately.
3
Find your data centre: look at the end of the API key. If it ends in -us6, your DC is us6 and your base URL is https://us6.api.mailchimp.com/3.0/.
4
Compute your Basic Auth header: Base64-encode anystring:YOUR_API_KEY and prepend Basic .
Finding your data centre and computing the auth header
API key example:  a1b2c3d4e5f6789abc01234567890abc-us6
                  ↑ everything before the last hyphen
Data centre:      us6
Base URL:         https://us6.api.mailchimp.com/3.0/

Auth string to Base64-encode:  anystring:a1b2c3d4e5f6789abc01234567890abc-us6
Base64 result:                 YW55c3RyaW5nOmExYjJjM2Q0...

Authorization header:  Basic YW55c3RyaW5nOmExYjJjM2Q0...
Official docs

Mailchimp Marketing API v3: mailchimp.com/developer

Step 2: Get your Audience List ID

Every Mailchimp audience has a unique List ID. You need it for all member-level endpoints. Fetch it once and store it.

External API Request Step · WA.Expert
Select Method
GET
Request URL
https://YOUR_DC.api.mailchimp.com/3.0/lists
Select Auth Type
No Auth (Basic Auth manually in header)
Header Parameters
AuthorizationBasic BASE64_OF_ANYSTRING_COLON_APIKEY
Content-Typeapplication/json
Select Body Type
None (GET, no body)
Choose Response Type
JSON
GET /lists response
{{
  "lists": [
    {{
      "id": "abc123def4",
      "name": "Main Audience",
      "stats": {{"member_count": 4821}}
    }}
  ]
}}

Copy: lists[0].id = "abc123def4"
This is your list_id for all subsequent calls.

Step 3: Add a WhatsApp opt-in to Mailchimp

When a customer opts in to WhatsApp messaging, add them to your Mailchimp audience in the same automation. The PUT endpoint is an upsert: it creates the subscriber if they are new, or updates their record if they already exist.

External API Request Step · WA.Expert
Select Method
PUT
Request URL
https://YOUR_DC.api.mailchimp.com/3.0/lists/YOUR_LIST_ID/members/MD5_OF_LOWERCASE_EMAIL
Select Auth Type
No Auth (Basic Auth manually in header)
Header Parameters
AuthorizationBasic BASE64_OF_ANYSTRING_COLON_APIKEY
Content-Typeapplication/json
Select Body Type
JSON
Choose Response Type
JSON
PUT /lists/{list_id}/members/{hash} body — add or update subscriber
{{
  "email_address": "{{{{customer_email}}}}",
  "status_if_new": "subscribed",
  "status":        "subscribed",
  "merge_fields": {{
    "FNAME": "{{{{customer_name}}}}",
    "PHONE": "{{{{customer_phone}}}}"
  }},
  "tags": ["whatsapp-optin"]
}}

Response:
{{
  "id": "8bdbf060209f35b52087992a3cbdf4d",
  "email_address": "priya@example.com",
  "status": "subscribed",
  "merge_fields": {{"FNAME": "Priya"}}
}}

status_if_new: used only when creating (not updating).
status: used for both create and update.
"tags" adds tags but does NOT remove existing ones.
Computing the MD5 hash of the email

The URL requires MD5(lowercase(email)). For priya@example.com: MD5('priya@example.com') = 8bdbf060209f35b52087992a3cbdf4d. In WA.Expert's External API Request step, you can hardcode a known subscriber's hash for testing, or use a helper step. For dynamic lookups, the search-members endpoint below is simpler; it accepts a plain email query.

To check whether a WhatsApp contact is already subscribed to your Mailchimp list before deciding what to send them, use the search endpoint. No hash needed.

External API Request Step · WA.Expert
Select Method
GET
Request URL
https://YOUR_DC.api.mailchimp.com/3.0/search-members?query={{{{customer_email}}}}&list_id=YOUR_LIST_ID
Select Auth Type
No Auth (Basic Auth manually in header)
Header Parameters
AuthorizationBasic BASE64_OF_ANYSTRING_COLON_APIKEY
Content-Typeapplication/json
Select Body Type
None (GET, no body)
Choose Response Type
JSON
GET /search-members response
{{
  "exact_matches": {{
    "members": [
      {{
        "id": "8bdbf060209f35b52087992a3cbdf4d",
        "email_address": "priya@example.com",
        "status": "subscribed",
        "merge_fields": {{"FNAME": "Priya", "PHONE": "+919820000001"}},
        "tags": [{{"name": "whatsapp-optin"}}],
        "stats": {{"avg_open_rate": 0.42, "avg_click_rate": 0.12}}
      }}
    ],
    "total_items": 1
  }},
  "full_search": {{"members": [], "total_items": 0}}
}}

Map: exact_matches.members[0].email_address
     exact_matches.members[0].status
     exact_matches.total_items (0 = not subscribed)

Map these response paths to WhatsApp variables:

Variable nameResponse pathExample value
sub_statusexact_matches.members[0].statussubscribed
sub_nameexact_matches.members[0].merge_fields.FNAMEPriya
sub_foundexact_matches.total_items1
sub_open_rateexact_matches.members[0].stats.avg_open_rate0.42

sub_found = 0 means not subscribed. Branch your flow: if sub_found > 0, they are already on your list; if 0, add them with the PUT step.

Subscriber status reference

StatusMeaningUse in PUT body
subscribedActive, receives campaignsstatus: subscribed
unsubscribedOpted out; cannot be re-subscribed via APIstatus: unsubscribed
cleanedHard bounce; email is invalidNot settable via API
pendingAwaiting double opt-in confirmationstatus_if_new: pending
transactionalNon-marketing contactstatus: transactional

Set status_if_new: pending if you want Mailchimp to send a confirmation email before the contact becomes subscribed.

Worked example: sync WhatsApp opt-in to Mailchimp

Automation flow — add WhatsApp opt-in to Mailchimp
Trigger: Customer messages 'SUBSCRIBE' on WhatsApp.

Bot asks: 'Please share your email address to join our mailing list.'
Customer: priya@example.com
Stored as {{customer_email}}, {{customer_name}} = Priya Sharma.

Step 1 — Search (check if already subscribed):
GET https://us6.api.mailchimp.com/3.0/search-members
  ?query=priya@example.com&list_id=abc123def4
Authorization: Basic ...

Response: exact_matches.total_items = 0 (not yet subscribed)

Conditions: if total_items > 0 -> 'You are already subscribed. Thank you!'
            if total_items = 0 -> run Step 2

Step 2 — Add subscriber (PUT upsert):
PUT https://us6.api.mailchimp.com/3.0/lists/abc123def4/members/8bdbf060...
Body: {{email_address: 'priya@example.com', status_if_new: 'subscribed',
       status: 'subscribed', merge_fields: {{FNAME: 'Priya'}},
       tags: ['whatsapp-optin']}}

Response: {{status: 'subscribed', id: '8bdbf060...'}}

Bot replies: 'You are now subscribed to our mailing list, Priya!
             You will receive email updates at priya@example.com.'

Troubleshooting

SymptomLikely causeFix
WrongDatacenter errorBase URL uses the wrong DC prefixCheck the end of your API key. Key ending -us6 means base URL must be https://us6.api.mailchimp.com/3.0/. Fix the DC prefix in the URL.
401 UnauthorizedAPI key invalid or incorrectly formatted in Base64Recompute Base64(anystring:YOUR_API_KEY). Ensure the full key including the -us6 suffix is included as the password.
404 on member endpointWrong list_id or subscriber not in that listConfirm the list_id from GET /lists. The subscriber must exist in that specific list.
400 on PUT: cannot re-subscribeMember status is unsubscribedMailchimp does not allow re-subscribing an unsubscribed member via API. The member must re-subscribe themselves via a form.
exact_matches.total_items = 0Email not in this listThe contact is not subscribed to the list_id you queried. They may be in a different audience, or may not be subscribed at all.
tags not appearingTag names are case-sensitiveEnsure tag names match exactly what exists in your Mailchimp account. Tags are created automatically on first use but the name must be consistent.

Common questions

What is the data centre and why does it matter?
+
It is the prefix in your API base URL: us1, us6, us21, etc. It matches the suffix of your API key after the last hyphen. Wrong DC returns WrongDatacenter error.
What is the Mailchimp API key username?
+
Any non-empty string. Literally 'anystring' is what Mailchimp's docs use. Only the API key (the password part) is validated.
What is the subscriber hash?
+
MD5 of the lowercased email address. Used in direct member endpoints. Use search-members instead for lookups; it accepts a plain email query.
Can I add a WhatsApp opt-in to Mailchimp automatically?
+
Yes. PUT /lists/{list_id}/members/{hash} is an upsert: creates if new, updates if exists. Include status_if_new: subscribed and the merge fields you want to capture.
What subscriber statuses does Mailchimp use?
+
subscribed, unsubscribed, cleaned, pending, transactional. Only subscribed members receive campaigns. Unsubscribed members cannot be re-subscribed via API.
Does this incur extra WA.Expert charges?
+
One automation action per External API Request call. Included on the Complete plan. Starter: from Rs. 49 per 1,000 actions.

Connect Brevo to WhatsApp

Brevo Marketing API: API key auth, contact sync and transactional email triggers.

Read guide →

Connect Klaviyo to WhatsApp

Klaviyo API: Bearer token, profile lookup and list subscription.

Read guide →

External API Request Step

Master every field in WA.Expert's HTTP action step.

Read foundation guide →

Connect Mailchimp to WhatsApp today

Free trial, no credit card. If you get stuck, we answer live on WhatsApp.

Start Free Trial → Book a Demo
1