MailerLite is a popular email marketing platform for membership sites and small businesses. Once connected, you can sync new members to MailerLite groups, update subscriber fields when membership plans change, and keep your email list in sync with your WordPress user base automatically.
Before you start
FlowSync connects to MailerLite using an API key generated in your MailerLite account. The connection runs directly between your WordPress site and MailerLite’s API — no data passes through FlowSync’s servers.
This takes about 5 minutes the first time. You will not need to do it again unless you rotate your API key.
What you need:
- A MailerLite account (sign up free if you don’t have one)
- Admin access to your WordPress site
- FlowSync Pro active on your site
Why API key, not OAuth? MailerLite’s API uses long-lived API tokens for server-to-server authentication. This is simpler than OAuth, doesn’t expire on a schedule, and doesn’t require a developer console setup. The trade-off is that you must keep the key secure — anyone with the key can read and write your MailerLite data.
Step 1 — Generate a MailerLite API token
Sign in to dashboard.mailerlite.com with the account you want to sync FlowSync data into.
- Click your account name in the top right corner
- Select Integrations from the dropdown
- Find MailerLite API in the list and click Use
- Click Generate new token
- Give it a name — “FlowSync” works fine — then click Create token

MailerLite shows the new token once. Copy it now — you will not be able to see it again after closing the dialog. If you lose it, you can generate a new token and delete the old.
Developer note: MailerLite API tokens are scoped to the full account — there is no per-resource permission model. Treat the token like a password. If you suspect it’s compromised, regenerate it in MailerLite and update FlowSync immediately; the old token stops working as soon as you delete it. FlowSync uses MailerLite’s v2 API (the current generation) — older “Classic” API tokens are not supported.
Step 2 — Paste your API token into FlowSync
- In your WordPress admin, go to FlowSync → Integrations
- Find MailerLite in the CRM / Email tab and click Configure
- Paste your API token into the API Token field
- Click Save settings

FlowSync immediately tests the token against MailerLite’s API. If the token is valid, the panel shows a green Connected status with your MailerLite account name.
Developer note: FlowSync encrypts the API token at rest using
Credential_Vault(OpenSSL/sodium depending on server support). The token is never stored in plaintext after the first save. Connection status is cached for 5 minutes viaIntegration_Cache— click Test connection to force a live check.
Step 3 — Verify the connection
With your token saved, click Test connection in the configure modal. FlowSync makes a live round-trip to MailerLite and confirms:
- The API token is valid
- Your MailerLite account is active
- FlowSync can list your groups and subscriber fields

If the test fails, check the error message and see the Troubleshooting section below.
Step 4 — Configure double opt-in (optional)
If you operate in a jurisdiction that requires explicit consent before adding subscribers to a list — or if you want confirmed sign-ups — enable MailerLite’s double opt-in flow.
MailerLite handles double opt-in at the account level rather than per-action. When enabled in your MailerLite settings, any new subscriber added via the API (including by FlowSync) is sent a confirmation email automatically. The subscriber’s status remains unconfirmed until they click the link.
To enable double opt-in:
- In MailerLite, go to Subscribers → Settings → Confirmation settings
- Toggle Enable double opt-in for API
- Customise the confirmation email template if needed
- Save
[Screenshot: MailerLite — Confirmation settings page with double opt-in toggle]
No FlowSync configuration is required — once enabled in MailerLite, the next subscriber FlowSync adds will receive the confirmation email automatically.
Developer note: MailerLite’s
POST /api/subscribersendpoint respects the account-level double opt-in setting and adds new subscribers withstatus: unconfirmeduntil they confirm. FlowSync does not override this — thestatusfield is omitted from the request body so MailerLite applies the account default. To force confirmed status (skipping DOI for trusted sources), you’d need to setstatus: activeexplicitly, which FlowSync does not currently expose. Subscribers stuck inunconfirmedstatus appear in MailerLite but won’t receive campaigns.
Using MailerLite in workflows
With the integration connected, several actions are available in the workflow builder:
Add to Group — adds the subscriber to a MailerLite group. Use this for new member sign-ups, completed orders, or any state change that should put a user in a specific group.
Remove from Group — removes the subscriber from a MailerLite group. Use this when a subscription expires, is cancelled, or a member changes plans and should move off the previous group.
Update Subscriber — updates the subscriber’s fields in MailerLite (name, plan, custom fields) without changing group membership.
Unsubscribe — sets the subscriber’s status to unsubscribed in MailerLite. Use sparingly — this prevents the subscriber from receiving any future campaigns from your account, not just removal from one group.
To add a MailerLite action to a workflow:
- Open a workflow in the FlowSync workflow builder
- In the Actions section, click Add Action
- Select MailerLite from the action group
- Choose the action type
- Select the target group (for group actions)
- Map the fields — each MailerLite field maps to a FlowSync field (user email, first name, membership plan, order total, etc.)
[Screenshot: FlowSync workflow builder — MailerLite Add to Group action with group selector and field mapping]
Field mapping works the same as other CRM integrations. The free plan maps email, first name, and last name. Pro unlocks all MailerLite fields including custom subscriber fields you’ve defined in your MailerLite account, plus membership and order data from ProfilePress, WooCommerce, and other sources.
Important: MailerLite uses groups rather than lists or tags — all subscribers live in a single account-wide pool, and groups are used to segment them. This differs from Mailchimp (separate audiences) and Brevo (lists). A subscriber added to multiple groups remains one subscriber in MailerLite.
Omnichannel sync
MailerLite supports bidirectional sync — changes you make to a subscriber in MailerLite can reflect back to the WordPress user’s profile, and vice versa.
To enable omnichannel sync:
- In FlowSync, go to Integrations → MailerLite → Field Mapping
- For each field, set the sync direction:
- Push — WordPress sends changes to MailerLite, but not the reverse
- Pull — MailerLite sends changes to WordPress, but not the reverse
- Bidirectional — changes flow in both directions
[Screenshot: FlowSync — MailerLite field mapping panel with sync direction selectors]
For bidirectional sync to work, you also need to configure a webhook in MailerLite pointing at FlowSync. The webhook URL is shown in the field mapping panel and looks like:
https://yoursite.com/wp-json/flowsync/v1/sync/mailerlite
Copy this URL, then in MailerLite go to Integrations → Webhooks and create a new webhook pointing at it. Select the events you want to sync — typically subscriber.updated, subscriber.unsubscribed, and subscriber.added_to_group.
Developer note: FlowSync handles incoming webhooks via
MailerLite\Webhook_Handlerand routes them throughSync_Service::handle_incoming(). Loop prevention is automatic —Sync_Lockensures a push triggered by a pull (or vice versa) won’t cascade. Webhook payloads are validated against the configured API token’s account to prevent spoofing. MailerLite signs webhook payloads with an HMAC signature in theX-MailerLite-Signatureheader; FlowSync verifies this against the webhook secret stored in the integration settings.
Troubleshooting
“Invalid API token” error after saving The token was either copied incorrectly or has been deleted in MailerLite. Generate a new token in MailerLite (Step 1) and paste it again. Make sure there are no leading or trailing spaces. Also confirm you’re using a v2 API token, not a legacy Classic token.
“Connected” status but actions fail with 401 Your API token was valid when saved but has since been deleted or regenerated in MailerLite. Open the configure modal, paste a fresh token, and save.
Subscribers added but never receive emails If double opt-in is enabled in MailerLite, new subscribers have unconfirmed status until they click the confirmation link. Check your MailerLite subscriber list and filter by status. Subscribers stuck on unconfirmed need to either confirm or be manually activated.
“Subscriber already exists” errors in the sync log This is usually not a real error — MailerLite returns this when you try to add a subscriber who’s already in your account. FlowSync handles this by updating the existing subscriber instead of failing the action. If you’re seeing it as a hard failure, check that the email address mapping is configured correctly. [VERIFY: confirm FlowSync’s exact behaviour on duplicate-subscriber response in current build]
Sync log shows “skipped — loop prevention” This is expected. FlowSync detected that a sync write was triggered by an incoming webhook (or vice versa) and skipped it to prevent an infinite loop. If you see this consistently for normal operations, check that your field mapping directions are configured correctly — bidirectional fields are more likely to trigger lock skips than push-only or pull-only fields.
Groups or fields don’t appear in the dropdown FlowSync caches group and field data for 10 minutes. If you created a new group or custom field in MailerLite and it doesn’t appear, click Test connection on the Integrations page to flush the cache and reload.
Custom subscriber fields aren’t available for mapping Custom field mapping requires FlowSync Pro. The free plan only maps email, name, and last name. Upgrade to Pro to map all MailerLite fields including custom subscriber fields, plus pull membership and order data from your sources.
Developer note: All MailerLite API errors are logged to
wp_flowsync_sync_logwith the response body in theerrorcolumn. Query the table directly or use the Sync Log viewer (Pro) to see exact error responses from MailerLite — failures include amessagefield and often aerrorsobject with per-field validation details.