MailerLite Integration
MailerLite is an email marketing platform known for its clean interface and generous free plan. WP Smart Consent integrates with MailerLite via API v2, adding opted-in contacts to one or more groups using a single subscriber upsert call.
Enabling the Integration#
In the WP Smart Consent dashboard, go to CRMs & ESPs, find the MailerLite card, open the Connection tab, and paste in your API key. Toggle the integration on and save. WP Smart Consent connects to your account and populates the group picker with your available groups.
To generate an API key, log into MailerLite and go to Integrations → MailerLite API. Create a new token. This integration only supports MailerLite accounts created after March 22, 2022 — classic legacy accounts use a different API and are not supported.

Custom Fields#
MailerLite stores additional subscriber data in fields defined under Subscribers → Fields in your MailerLite account. Each field has a key — a lowercase string like phone, company, or city — that you use to write values to it.
In the Custom fields tab, add a row, select the WPSC source field on the left, and enter the MailerLite field key on the right. These are sent inside the fields object in the API payload. Fields must be created in MailerLite before values can be written to them.

Field Mapping#
The Field mapping tab maps WPSC fields to MailerLite subscriber field keys. MailerLite’s built-in fields use name for first name and last_name for last name. Additional standard fields depend on what is configured in your account. All field keys are lowercase strings.

How It Works#
WP Smart Consent sends a POST to https://connect.mailerlite.com/api/subscribers with the contact data and a groups array containing the IDs of all selected groups. MailerLite’s subscriber endpoint handles both create and update automatically by email — if a subscriber already exists their fields and group memberships are updated in a single call. Authentication uses a Bearer token in the Authorization header.
MailerLite calls its audience segments “groups” internally. The WPSC UI refers to them as groups in the picker to match MailerLite’s own terminology.
Groups Tab#
The Groups tab is where you select which MailerLite groups opted-in contacts are added to. The list is populated automatically from your account after the API key is saved. All selected group IDs are sent in a single API call — no separate call per group.
Options#
The Options tab has two settings.
Update existing contacts — controls whether an existing MailerLite subscriber matched by email has their fields updated on each opt-in.
Send on unchecked — when enabled, contacts are forwarded to MailerLite even when the opt-in checkbox was not ticked.

Troubleshooting#
Group list not populating — confirm the API key is correct and saved. Groups are fetched from GET /api/groups after save. A wrong key returns a 401 and the list stays empty. Also confirm your account is a post-March-2022 account — legacy classic accounts are not supported.
Subscriber not appearing in group — confirm at least one group is selected in the Groups tab. Check the WPSC Logs tab to confirm the opt-in event fired.
Custom field values not saving — confirm the field key in the Custom fields tab matches the field key shown in MailerLite → Subscribers → Fields. Keys are lowercase and case-sensitive. Fields that do not exist in MailerLite are silently ignored.