MailerLite API

By Sai Srujan Reddy
6 min read

Table of Contents

Email marketing tools to grow your audience faster and drive revenue smarter. Get free access to premium features with a 30-day trial! Sign up now!

API Overview

MailerLite is a user-friendly email marketing service designed for small businesses and individuals. It offers a range of features including email automation, segmentation, landing pages, and reporting. MailerLite's intuitive interface and affordable pricing make it an accessible option for those looking to improve their email marketing efforts. With its focus on simplicity and ease of use, MailerLite empowers users to create effective email campaigns without the need for technical expertise.

MailerLite's API provides developers with programmatic access to its features. The API documentation is comprehensive and well-organized, making it easy to integrate MailerLite into existing systems. The REST APIs allow developers to perform a wide range of operations, such as managing subscribers, sending emails, and retrieving campaign data. Webhooks enable real-time notifications of events, such as new subscribers or email opens. Rate limits ensure that the API is used responsibly and prevent overloading. By leveraging the MailerLite API, developers can automate tasks, extend functionality, and integrate MailerLite with other tools and applications.


API Request Limits

APIs

subscribers

Method: get

Description: Retrieve all subscribers for a group based on filters..

Endpoint: subscribers

Parameters: email, name, query, fields, page, limit

subscribers

Method: post

Description: Create a new subscriber for a group..

Endpoint: subscribers

Parameters: email, name, fields

subscribers

Method: put

Description: Update a subscriber for a group..

Endpoint: subscribers/{subscriber_id}

Parameters: email, name, fields, resubscribe

subscribers

Method: get

Description: Retrieve a single subscriber for a group by email..

Endpoint: subscribers/{subscriber_id}

Parameters: fields

subscribers

Method: patch

Description: Update a subscriber for a group partially..

Endpoint: subscribers/{subscriber_id}

Parameters: email, name, resubscribe

subscribers

Method: delete

Description: Delete a subscriber for a group..

Endpoint: subscribers/{subscriber_id}

Parameters:

subscribers

Method: post

Description: Subscribe a new subscriber to a group..

Endpoint: subscribers/subscribe

Parameters: email, name

subscribers

Method: post

Description: Unsubscribe a subscriber from a group..

Endpoint: subscribers/unsubscribe

Parameters: email

campaigns

Method: get

Description: Retrieve all campaigns based on filters..

Endpoint: campaigns

Parameters: name, subject, query, type, fields, group_id, order, page, limit

campaigns

Method: post

Description: Create a new draft campaign..

Endpoint: campaigns

Parameters: name, subject, from_name, reply_to, from_email, text, html, autoresponders, mobile, attachments, fields

campaigns

Method: get

Description: Retrieve a single campaign by ID..

Endpoint: campaigns/{campaign_id}

Parameters: fields

campaigns

Method: put

Description: Update a campaign partially..

Endpoint: campaigns/{campaign_id}

Parameters: name, subject, from_name, reply_to, from_email, text, html, autoresponders, mobile, attachments, fields

campaigns

Method: delete

Description: Delete a campaign..

Endpoint: campaigns/{campaign_id}

Parameters:

campaigns

Method: post

Description: Schedule a campaign now..

Endpoint: campaigns/{campaign_id}/actions/send

Parameters:

campaigns

Method: post

Description: Pause a scheduled campaign..

Endpoint: campaigns/{campaign_id}/actions/pause

Parameters:

campaigns

Method: post

Description: Resume a paused campaign..

Endpoint: campaigns/{campaign_id}/actions/resume

Parameters:

campaigns

Method: post

Description: Send a test email..

Endpoint: campaigns/{campaign_id}/actions/test

Parameters: email, name

reports

Method: get

Description: Retrieve all reports for a campaign..

Endpoint: reports/{campaign_id}

Parameters: group_id, offset, limit

segments

Method: get

Description: Retrieve all segments..

Endpoint: segments

Parameters: name, query, fields, page, limit

segments

Method: post

Description: Create a new segment..

Endpoint: segments

Parameters: name, query, fields

segments

Method: get

Description: Retrieve a single segment by ID..

Endpoint: segments/{segment_id}

Parameters: fields

segments

Method: put

Description: Update a segment partially..

Endpoint: segments/{segment_id}

Parameters: name, query, fields

segments

Method: delete

Description: Delete a segment..

Endpoint: segments/{segment_id}

Parameters:

segments

Method: post

Description: Add subscribers to a segment..

Endpoint: segments/{segment_id}/subscribers/add

Parameters: email, name

segments

Method: post

Description: Remove subscribers from a segment..

Endpoint: segments/{segment_id}/subscribers/remove

Parameters: email, name

templates

Method: get

Description: Retrieve all templates..

Endpoint: templates

Parameters: name, query, fields, order, page, limit

templates

Method: post

Description: Create a new template..

Endpoint: templates

Parameters: name, subject, from_name, reply_to, from_email, text, html, autoresponders, mobile, attachments, fields

templates

Method: get

Description: Retrieve a single template by ID..

Endpoint: templates/{template_id}

Parameters: fields

templates

Method: put

Description: Update a template partially..

Endpoint: templates/{template_id}

Parameters: name, subject, from_name, reply_to, from_email, text, html, autoresponders, mobile, attachments, fields

templates

Method: delete

Description: Delete a template..

Endpoint: templates/{template_id}

Parameters:

templates

Method: post

Description: Create a new draft template..

Endpoint: templates/draft

Parameters: name, subject, from_name, reply_to, from_email, text, html, autoresponders, mobile, attachments, fields

templates

Method: post

Description: Publish a draft template..

Endpoint: templates/draft/actions/publish

Parameters:

groups

Method: get

Description: Retrieve all groups..

Endpoint: groups

Parameters: name, query, fields, order, page, limit

groups

Method: post

Description: Create a new group..

Endpoint: groups

Parameters: name, fields

groups

Method: get

Description: Retrieve a single group by ID..

Endpoint: groups/{group_id}

Parameters: fields

groups

Method: put

Description: Update a group partially..

Endpoint: groups/{group_id}

Parameters: name, fields

groups

Method: delete

Description: Delete a group..

Endpoint: groups/{group_id}

Parameters:

autoresponders

Method: get

Description: Retrieve all autoresponders for a campaign..

Endpoint: autoresponders/{campaign_id}

Parameters: fields, page, limit

autoresponders

Method: post

Description: Create a new autoresponder for a campaign..

Endpoint: autoresponders/{campaign_id}

Parameters: name, email_type, subject, from_name, reply_to, from_email, text, html, attachments, delay, fields

autoresponders

Method: get

Description: Retrieve a single autoresponder by ID..

Endpoint: autoresponders/{autoresponder_id}

Parameters: fields

autoresponders

Method: put

Description: Update an autoresponder partially..

Endpoint: autoresponders/{autoresponder_id}

Parameters: name, email_type, subject, from_name, reply_to, from_email, text, html, attachments, delay, fields

autoresponders

Method: delete

Description: Delete an autoresponder..

Endpoint: autoresponders/{autoresponder_id}

Parameters:

automations

Method: get

Description: Retrieve all automations..

Endpoint: automations

Parameters: name, query, fields, page, limit

automations

Method: post

Description: Create a new automation..

Endpoint: automations

Parameters: name, fields

automations

Method: get

Description: Retrieve a single automation by ID..

Endpoint: automations/{automation_id}

Parameters: fields

automations

Method: put

Description: Update an automation partially..

Endpoint: automations/{automation_id}

Parameters: name, fields

automations

Method: delete

Description: Delete an automation..

Endpoint: automations/{automation_id}

Parameters:

automations

Method: post

Description: Start an automation for a subscriber..

Endpoint: automations/{automation_id}/subscribers/{subscriber_id}/start

Parameters:

automations

Method: post

Description: Stop an automation for a subscriber..

Endpoint: automations/{automation_id}/subscribers/{subscriber_id}/stop

Parameters:

automations

Method: get

Description: Retrieve all automation emails..

Endpoint: automations/{automation_id}/emails

Parameters: fields, page, limit

automations

Method: post

Description: Create a new automation email..

Endpoint: automations/{automation_id}/emails

Parameters: name, email_type, subject, from_name, reply_to, from_email, text, html, attachments

automations

Method: get

Description: Retrieve a single automation email by ID..

Endpoint: automations/{automation_id}/emails/{email_id}

Parameters: fields

automations

Method: put

Description: Update an automation email partially..

Endpoint: automations/{automation_id}/emails/{email_id}

Parameters: name, email_type, subject, from_name, reply_to, from_email, text, html, attachments

automations

Method: delete

Description: Delete an automation email..

Endpoint: automations/{automation_id}/emails/{email_id}

Parameters:

webhooks

Method: get

Description: Retrieve all webhooks..

Endpoint: webhooks

Parameters: name, query, fields, page, limit

webhooks

Method: post

Description: Create a new webhook..

Endpoint: webhooks

Parameters: name, url, headers, payloads, enabled, fields

webhooks

Method: get

Description: Retrieve a single webhook by ID..

Endpoint: webhooks/{webhook_id}

Parameters: fields

webhooks

Method: put

Description: Update a webhook partially..

Endpoint: webhooks/{webhook_id}

Parameters: name, url, headers, payloads, enabled, fields

webhooks

Method: delete

Description: Delete a webhook..

Endpoint: webhooks/{webhook_id}

Parameters:

FAQ

How do I authenticate with the MailerLite APIs?

You can authenticate using an API key, which can be generated from your MailerLite account settings.

What are the rate limits for the MailerLite APIs?

The rate limits vary depending on the endpoint and your account type. Check the API documentation for specific limits.

Can I use a sandbox account to test the APIs?

Yes, you can create a sandbox account from your MailerLite dashboard. This account will provide a safe environment for testing.

How do I obtain a developer account?

You can apply for a developer account by contacting MailerLite support. Developer accounts provide enhanced access to APIs and features.

What support is available for MailerLite API users?

MailerLite offers documentation, a support forum, and email support for API users. You can also reach out to the MailerLite team via Twitter or LinkedIn.

Last Update: September 16, 2024