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 MailerLite to WhatsApp
MailerLite Integration Guide · Marketing / Email

Connect MailerLite to WhatsApp

Add every WhatsApp opt-in to your MailerLite subscriber group, look up whether a contact is already subscribed before sending a campaign, and keep both channels in sync without any manual CSV exports.

Published 23 June 2026  ·  6 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 focus on MailerLite-specific values.

MailerLite has two versions with different base URLs and auth headers

MailerLite split into two versions in March 2022. Which version you are on determines both your base URL and your auth header. New MailerLite (account created after 22 March 2022): base URL https://connect.mailerlite.com/api, header Authorization: Bearer YOUR_KEY. Classic MailerLite (before 22 March 2022): base URL https://api.mailerlite.com/api/v2, header X-MailerLite-ApiKey: YOUR_KEY. This guide covers the new version. Classic users: see the reference section below.

Step 1: Generate your API key

1
In MailerLite, click your account name (top right) → IntegrationsMailerLite API.
2
Click Generate new token. Give it a name. Copy it immediately. It is shown only once.
3
Your API key is used as a Bearer token: Authorization: Bearer YOUR_API_KEY.
Official docs

MailerLite API: developers.mailerlite.com

Step 2: Get your Group ID

MailerLite calls lists groups. Group IDs are strings. Fetch them once and store the ID where WhatsApp opt-ins should land.

External API Request Step · WA.Expert
Select Method
GET
Request URL
https://connect.mailerlite.com/api/groups
Select Auth Type
No Auth (Authorization header below)
Header Parameters
AuthorizationBearer YOUR_MAILERLITE_API_KEY
Acceptapplication/json
Select Body Type
None (GET, no body)
Choose Response Type
JSON
GET /groups response
{{
  "data": [
    {{
      "id":   "123456789",
      "name": "WhatsApp Opt-Ins",
      "active_count":       1204,
      "unsubscribed_count": 23
    }}
  ]
}}

Copy: data[0].id = "123456789"

Step 3: Look up a subscriber by email

Check whether the WhatsApp contact is already subscribed before adding them.

External API Request Step · WA.Expert
Select Method
GET
Request URL
https://connect.mailerlite.com/api/subscribers/{{{{customer_email}}}}
Select Auth Type
No Auth (Authorization header below)
Header Parameters
AuthorizationBearer YOUR_MAILERLITE_API_KEY
Acceptapplication/json
Select Body Type
None (GET, no body)
Choose Response Type
JSON
GET /subscribers/{email} response
Found (HTTP 200):
{{
  "data": {{
    "id":     "987654321",
    "email":  "priya@example.com",
    "status": "active",
    "fields": {{
      "name": "Priya Sharma",
      "phone": "+919820000001"
    }},
    "groups": [
      {{"id": "123456789", "name": "WhatsApp Opt-Ins"}}
    ]
  }}
}}

Not found: HTTP 404

Map: data.id -> subscriber_id
     data.status -> subscriber_status (active/unsubscribed/unconfirmed)
     data.groups (check if already in the target group)

Step 4: Add subscriber to group (new or existing)

The POST /subscribers endpoint is an upsert. Include the group ID in the groups array and the subscriber is created (or updated) and added to the group in a single call.

External API Request Step · WA.Expert
Select Method
POST
Request URL
https://connect.mailerlite.com/api/subscribers
Select Auth Type
No Auth (Authorization header below)
Header Parameters
AuthorizationBearer YOUR_MAILERLITE_API_KEY
Content-Typeapplication/json
Acceptapplication/json
Select Body Type
JSON
Body
{{"email":"{{{{customer_email}}}}","fields":{{"name":"{{{{customer_name}}}}","phone":"{{{{customer_phone}}}}"}},"groups":["123456789"],"status":"active"}}
Choose Response Type
JSON
POST /subscribers body and response
Body:
{{
  "email":  "{{customer_email}}",
  "fields": {{
    "name":  "{{customer_name}}",
    "phone": "{{customer_phone}}"
  }},
  "groups": ["123456789"],
  "status": "active"
}}

Response (HTTP 200 or 201):
{{
  "data": {{
    "id":     "987654321",
    "email":  "priya@example.com",
    "status": "active",
    "groups": [{{"id": "123456789", "name": "WhatsApp Opt-Ins"}}]
  }}
}}

This is an upsert: creates if new, updates if the email already exists.
HTTP 200 = existing subscriber updated.
HTTP 201 = new subscriber created.
One call creates and groups in a single step

Unlike ActiveCampaign (which needs a separate contactLists call) or Klaviyo (which needs a separate list relationship call), MailerLite's POST /subscribers handles both creation and group assignment at once. Include the group ID in the groups array and it is done.

Subscriber status values:

StatusMeaning
activeSubscribed and receiving emails
unsubscribedOpted out; cannot be re-subscribed via API
unconfirmedPending double opt-in confirmation
bouncedHard bounce; email is invalid
junkSpam complaint

Only active subscribers receive campaigns. Set status: active for WhatsApp opt-in contacts.

Worked example: WhatsApp opt-in sync flow

Automation flow — sync WhatsApp opt-in to MailerLite
Trigger: Customer messages 'JOIN' on WhatsApp.

Captured: {{customer_email}} = priya@example.com
          {{customer_name}}  = Priya Sharma
          {{customer_phone}} = +919820000001

Step 1 — Check existing (GET /subscribers/email):
GET https://connect.mailerlite.com/api/subscribers/priya@example.com
Authorization: Bearer YOUR_KEY

Response: HTTP 404 (not found)

Conditions:
  HTTP 200 -> check data.groups for group membership
              if already in group -> 'You are already subscribed!'
              if not in group     -> add to group (POST /subscribers)
  HTTP 404 -> run Step 2

Step 2 — Create and group (POST /subscribers):
POST https://connect.mailerlite.com/api/subscribers
Body: {{email: 'priya@example.com',
        fields: {{name: 'Priya Sharma', phone: '+919820000001'}},
        groups: ['123456789'],
        status: 'active'}}

Response: HTTP 201, data.id = '987654321'

Bot replies:
'You are now subscribed, Priya! You will receive our newsletter
at priya@example.com.'

Reference: MailerLite Classic (accounts before March 2022)

Classic MailerLite uses a different base URL and header. The endpoint structure is similar but the auth and URL both differ.

SettingNew MailerLiteClassic MailerLite
Base URLhttps://connect.mailerlite.com/apihttps://api.mailerlite.com/api/v2
Auth headerAuthorization: Bearer YOUR_KEYX-MailerLite-ApiKey: YOUR_KEY
Get groupsGET /groupsGET /groups
Add subscriberPOST /subscribersPOST /subscribers
Subscriber lookupGET /subscribers/{email}GET /subscribers/{email}

API keys are generated the same way in both versions: account settings → Integrations → API.

Troubleshooting

SymptomLikely causeFix
401 UnauthorizedWrong auth header or wrong versionNew MailerLite: Authorization: Bearer YOUR_KEY. Classic: X-MailerLite-ApiKey: YOUR_KEY. Also check your base URL matches your version.
404 on subscriber GETSubscriber not in MailerLiteExpected for new contacts. Proceed to POST /subscribers to add them.
Subscriber not in group after POSTGroup ID omitted or wrongInclude the group ID in the groups array: ['123456789']. Confirm the ID from GET /groups.
Cannot re-subscribe unsubscribed contactMailerLite blocks re-subscriptionAn unsubscribed contact cannot be re-added via API. They must re-subscribe themselves via a form or opt-in link.
429 Too Many RequestsRate limit of 120 per minute exceededCheck X-RateLimit-Remaining. For a WhatsApp bot doing single lookups, this limit is very generous.

Common questions

How do I know which MailerLite version I have?
+
Accounts created before March 22, 2022 are Classic. After that date, you have new MailerLite. Classic: base URL api.mailerlite.com, header X-MailerLite-ApiKey. New: base URL connect.mailerlite.com, header Authorization: Bearer.
What is the auth difference between new and Classic?
+
New: Authorization: Bearer YOUR_KEY. Classic: X-MailerLite-ApiKey: YOUR_KEY. The API key itself is generated the same way in both.
Can I add a subscriber to a group in one step?
+
Yes. POST /subscribers with the groups array includes the group ID at creation. One call creates the subscriber and assigns them to the group.
How do I find my group ID?
+
GET /groups returns a data array with each group's id (string) and name. Copy the id of the group for WhatsApp opt-ins.
What subscriber statuses does MailerLite use?
+
active, unsubscribed, unconfirmed, bounced, junk. Only active subscribers receive campaigns.
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. MailerLite rate limit: 120 requests per minute.

Connect Mailchimp to WhatsApp

Mailchimp: data centre prefix, anystring Basic Auth, subscriber upsert.

Read guide →

Connect Brevo to WhatsApp

Brevo: api-key header, updateEnabled upsert, integer list IDs.

Read guide →

External API Request Step

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

Read foundation guide →

Connect MailerLite to WhatsApp today

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

Start Free Trial → Book a Demo
1