Everything an AI agent can do with the MailerLite API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints44
AuthenticationAPI token
Last updated23 June 2026
Orientation

How the MailerLite API works.

The MailerLite API is how an app or AI agent works with a MailerLite account: adding or updating subscribers, sorting them into groups, building segments, and creating and scheduling email campaigns. Access is granted through an account-level API token, which carries no per-endpoint scopes, so one token can reach every subscriber, campaign, and webhook in the account. A state change, like a subscriber being created or a campaign being sent, can be pushed to a registered webhook.

44Endpoints
8Capability groups
19Read
25Write
1Permissions
Authentication
MailerLite authenticates with a single account-level API token, generated in the dashboard under Integrations and shown only once when it is created. It is sent as a Bearer token in the Authorization header. The hosted MCP server instead uses an OAuth login in the AI client, which still grants account-level access.
Permissions
The token has no granular per-endpoint scopes. A single token can call every method and reach every subscriber, group, campaign, and webhook in the account. There is no built-in way to limit a token to, for example, read-only or a single group, so any narrowing has to happen in front of the API. The token is bound to the user who created it and stops working if that user is removed.
Versioning
The API for accounts created from March 2022 onward is a single, continuously updated service with no version segment in the path. A request can pin a dated snapshot with the X-Version header. The older v1 and v2 APIs serve only legacy MailerLite Classic accounts and will eventually be retired.
Data model
MailerLite is resource-oriented REST over JSON: subscribers carry custom fields and belong to groups, segments are saved filters over subscribers, and campaigns send email to those audiences. Lists page with a cursor. A state change, like a subscriber being created or a campaign being sent, can be pushed to a registered webhook.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to MailerLite determines what it can reach. There is a route for making calls, a route for receiving events, and a hosted server that exposes MailerLite tools to agents, and each is governed by the credential behind it.

Ways to connect

REST API

The REST API takes and returns JSON, with Content-Type and Accept set to application/json, at https://connect.mailerlite.com/api. A call authenticates with an account-level API token sent as a Bearer token. Lists page with a cursor and a limit, and an X-Version header can pin a dated snapshot of the API.

Best forConnecting an app or AI agent to MailerLite.
Governed byThe account-level API token.
Docs ↗

MCP server

A hosted Model Context Protocol server at https://mcp.mailerlite.com/mcp exposes MailerLite tools to AI agents and LLM clients, in beta since July 2025. It is cloud-based with no API key handling on the client side, authenticating through an OAuth login when a client connects. Tools cover subscribers, campaigns, groups, segments, automations, forms, and webhooks.

Best forConnecting an AI agent to MailerLite through MCP.
Governed byThe OAuth login granted when the client connects.
Docs ↗

Webhooks

MailerLite POSTs an event payload to an HTTPS URL registered through the webhooks API or the dashboard, for events like subscriber.created or campaign.sent. Delivery is only attempted for active accounts, and a non-2XX response is retried three more times with 10, 100, and 1000 second delays.

Best forReceiving MailerLite events at an app or AI agent.
Governed byThe webhook registration on the account.
Docs ↗
Authentication

API token

MailerLite authenticates with a single account-level API token, generated in the dashboard under Integrations and shown only once at creation. It is sent as a Bearer token in the Authorization header. The token carries no granular per-endpoint scopes, so it can call every method and reach every subscriber in the account. The token is bound to the user who created it and stops working if that user is removed.

TokenBearer API token
Best forServer-side calls with full account access.
Docs ↗

MCP OAuth login

The hosted MCP server connects through an OAuth login in the AI client, rather than a pasted API token. The login authorizes the client to act on the connected MailerLite account. As with the token, this is account-level access, not a per-tool scope set.

TokenOAuth login via the MCP client
Best forConnecting an AI agent through the MCP server.
Docs ↗
Endpoint reference

Every MailerLite API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Subscribers

Methods for working with subscribers, the contacts on a mailing list.8

Read-only. The token is account-level, so it returns every subscriber in the account.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Creates a new subscriber or updates an existing one matched by email. A batch of only these calls counts against the tighter import limit.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventsubscriber.created
Rate limitStandard limits apply

A core write to one subscriber.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventsubscriber.updated
Rate limitStandard limits apply

Deletes the subscriber record but retains the underlying data, unlike forget.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventsubscriber.deleted
Rate limitStandard limits apply

Irreversible. All of the subscriber's information is completely deleted after 30 days.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Counts against the import limit of 5 requests per minute, separate from the general limit.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit5 requests/min (import limit)

Groups

Methods for working with groups and group membership.7

Read-only.

Acts ongroup
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts ongroup
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts ongroup
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the group but leaves its subscribers in the account.

Acts ongroup
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Adds membership; the subscriber starts receiving anything sent to that group.

Acts ongroup
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventsubscriber.added_to_group
Rate limitStandard limits apply

Removes membership; the subscriber is not deleted.

Acts ongroup
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventsubscriber.removed_from_group
Rate limitStandard limits apply

Fields

Methods for working with custom fields on subscribers.4

Read-only.

Acts onfield
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A field is shared across all subscribers in the account.

Acts onfield
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write affecting the field across the account.

Acts onfield
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the field and its values from every subscriber.

Acts onfield
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Segments

Methods for working with segments, the saved filters over subscribers.4

Read-only. An account holds at most 250 segments.

Acts onsegment
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only; supports filtering by status and cursor-based pagination.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts onsegment
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the saved filter, not the underlying subscribers.

Acts onsegment
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Campaigns

Methods for working with email campaigns.8

Read-only.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Creates a draft; no email is sent until the campaign is scheduled.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write to a draft campaign.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

This sends email to the campaign's recipients at the scheduled time.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventcampaign.sent
Rate limitStandard limits apply

Returns the campaign to draft; only works before it has sent.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write removing the campaign.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncampaign
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Automations

Methods for viewing automations and the subscribers flowing through them.3

Read-only; the API does not create or edit automations.

Acts onautomation
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onautomation
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onautomation
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Forms

Methods for working with signup forms and their subscribers.5

Read-only. Type must be popup, embedded, or promotion.

Acts onform
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onform
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts onform
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the form; its past signups remain as subscribers.

Acts onform
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only; supports filtering by status and cursor-based pagination.

Acts onsubscriber
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Webhooks

Methods for registering and managing event subscriptions.5

Read-only.

Acts onwebhook
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onwebhook
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Sets where chosen events, like subscriber.created, are delivered.

Acts onwebhook
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts onwebhook
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts onwebhook
Permission (capability)API token
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

MailerLite can notify an app when something happens in an account, like a subscriber being created or a campaign being sent. It POSTs a payload describing what changed, so an integration learns about activity without polling.

EventWhat it signalsTriggered by
subscriber.createdA new subscriber was added to the account./api/subscribers
subscriber.updatedAn existing subscriber's details changed./api/subscribers/:id
subscriber.unsubscribedA subscriber unsubscribed from the account./api/subscribers/:id
subscriber.added_to_groupA subscriber was assigned to a group./api/subscribers/:id/groups/:group_id
subscriber.removed_from_groupA subscriber was removed from a group./api/subscribers/:id/groups/:group_id
subscriber.bouncedA message to a subscriber bounced./api/campaigns/:id/schedule
subscriber.deletedA subscriber was removed from the account./api/subscribers/:id
campaign.sentA campaign finished sending to its recipients./api/campaigns/:id/schedule
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

MailerLite limits how fast an app can call, by a request rate measured per minute across the account, with a separate, tighter limit on subscriber imports.

Request rate

MailerLite meters requests by a per-minute rate across the account, not by a per-method cost. The general limit is 120 requests per minute. Subscriber imports are limited more tightly, to 5 requests per minute, and this also covers a batch made up only of subscriber create calls. Going over either limit returns HTTP 429 with the message Too Many Attempts and a Retry-After header. The response also carries X-RateLimit-Limit and X-RateLimit-Remaining headers so a caller can pace itself.

Pagination

List endpoints page with a cursor. A limit parameter sets the page size, defaulting to 25, and the response body returns next_cursor and prev_cursor values to move forward and back. Some list endpoints, like segments, also accept page and limit parameters.

Request size

An account holds at most 250 segments. The subscriber list and other large collections are walked through the cursor rather than fetched at once. The import endpoint is the supported path for adding subscribers in bulk.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
401UnauthenticatedNo valid API token was provided. The body reads "Unauthenticated."Send a valid token in the Authorization header as Bearer, and rotate it if it has been removed or compromised.
404Not FoundThe requested resource does not exist, or is not in this account.Verify the id and that it belongs to the account behind the token.
422Unprocessable EntityValidation failed. The body carries a message and an errors object mapping each field to its error messages.Read the errors object, fix the named fields, and resend.
429Too Many AttemptsThe rate limit was exceeded, either the 120 per minute general limit or the tighter 5 per minute import limit.Back off until the Retry-After header's window passes, then retry, and smooth the request rate.
Versioning & freshness

Version history.

MailerLite runs a single, continuously updated API for accounts created from March 2022 onward, with no version segment in the path. A request can pin a dated snapshot with a version header.

Version history

What changed, and when

Latest versionCurrent
CurrentCurrent version
New MailerLite API (accounts from March 2022)

Accounts created from March 2022 onward use a single, continuously updated API with no version segment in the path, at https://connect.mailerlite.com/api. A request can pin a dated snapshot with the X-Version header. The older v1 and v2 APIs serve only legacy MailerLite Classic accounts and will eventually be retired.

What changed
  • Account-level Bearer API token authentication.
  • Cursor-based pagination across list endpoints.
  • Webhooks for subscriber and campaign events.
2025-07-22Feature update
Official MCP server (beta)

MailerLite Labs released a hosted Model Context Protocol server in beta, at https://mcp.mailerlite.com/mcp, letting AI tools connect to a MailerLite account through an OAuth login with no API key handling on the client side.

What changed
  • Hosted, cloud-based MCP server for AI agents.
  • Tools spanning subscribers, campaigns, groups, segments, automations, forms, and webhooks.
  • OAuth login per client, in place of a pasted token.
2022-03-22Requires migration
New MailerLite and its API launched

MailerLite released the new version of MailerLite and its new API, at developers.mailerlite.com, alongside the redesigned product. API v1 and v2 were left to serve only Classic accounts created before this date.

What changed
  • New API at https://connect.mailerlite.com/api.
  • v1 and v2 scoped to legacy MailerLite Classic accounts.

Pin a dated snapshot with the X-Version header, or track the current API.

MailerLite API docs ↗
Questions

MailerLite API, answered.

Does a MailerLite API token have scopes or permissions?+
No. A token is account-level and carries no granular per-endpoint scopes. One token can call every method and reach every subscriber, group, campaign, and webhook in the account. The token is generated in the dashboard under Integrations and shown only once at creation. Because there is no read-only or single-area token, limiting what an integration or agent can do has to happen in a layer in front of the API.
What is the difference between deleting and forgetting a subscriber?+
Deleting a subscriber removes the record from the account but keeps the underlying data, so the contact can be re-added later. Forgetting a subscriber starts a permanent, GDPR-style erasure: all of their information is completely deleted after 30 days and cannot be recovered. Forget is the irreversible one.
What are the rate limits?+
The general limit is 120 requests per minute across the account. Subscriber imports are limited more tightly to 5 requests per minute, which also covers a batch made up only of subscriber create calls. Exceeding either returns HTTP 429 with the message Too Many Attempts and a Retry-After header, alongside X-RateLimit-Limit and X-RateLimit-Remaining headers.
How does pagination work?+
List endpoints page with a cursor. A limit parameter sets the page size, defaulting to 25, and each response returns next_cursor and prev_cursor values to move forward and back through the results. Some list endpoints, such as segments, also accept page and limit parameters.
Does MailerLite have an official MCP server for AI agents?+
Yes. MailerLite Labs released a hosted Model Context Protocol server in beta in July 2025, at https://mcp.mailerlite.com/mcp. It is cloud-based with no API key handling on the client side, and it connects through an OAuth login in the AI client. Its tools cover subscribers, campaigns, groups, segments, automations, forms, and webhooks.
Can the API create or edit automations?+
No. The automations endpoints are read-only: they list automations, retrieve a single one, and return the subscriber activity flowing through it. Building or changing an automation is done in the MailerLite dashboard, not through the API.
Related

More marketing API guides for agents

What is Bollard AI?

Control what every AI agent can do in MailerLite.

Bollard AI sits between a team's AI agents and MailerLite. Grant each agent exactly the access it needs, read or write, area by area, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared MailerLite token.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
MailerLite
Newsletter Agent
View subscribers ResourceOffReadFull use
Send a campaign ActionOffReadFull use
Groups ResourceOffReadFull use
Delete subscribers ActionOffReadFull use
Per-agent access, set in Bollard AI, not in MailerLite