Skip to main content

Webhooks in New Mailerlite

Everything you need to know about Webhooks.

Written by Josue
Updated over 3 years ago

Everything about Webhooks in New Mailerlite

Webhooks allow you to subscribe to real-time notifications about various events that occur in MailerLite.

For example, when a new subscriber is added to your account, an HTTP POST callback is sent to your provided URL with a payload containing the new subscriber.

It allows you to get the most recent updates without constantly polling the API. You can see your existing webhooks, create new ones, update and delete them.


Where can you locate our webhook information?

You can access our webhooks documentation here: https://developers.mailerlite.com/docs/webhooks.html.


Batching events

We send events in batches every minute. For example, if there are a few events fired and they belong to the same webhook, we group all of them and send a single HTTP request instead of multiple requests to the same URL.

Note: If there is any other response than 2xx from your webhook's endpoint, we attempt to retry our callbacks for a while. However, your webhook is set to inactive after 3 days of responding with an error.


What events can you create?

Event

Description

subscriber.created

Fires when a new subscriber is added to an account.

subscriber.updated

Fires when any of the subscriber's custom fields are updated.

subscriber.unsubscribed

Fires when a subscriber becomes unsubscribed.

subscriber.added_to_group

Fires when a subscriber is added to a group.

subscriber.removed_from_group

Fires when a subscriber is removed from a group.

subscriber.added_through_form

Fires when a subscriber is added through a form.

subscriber.bounced

Fires when an email address bounces.

subscriber.automation_triggered

Fires when subscriber starts automation.

subscriber.automation_completed

Fires when subscriber finishes automation.

spam.subscriber.spam_reported

Fires when subscriber marks a campaign as a spam.

campaign.sent

Fires when campaign is sent.

Note: Using "subscriber.updated" will work with our new preference center feature!


How to set up your Webhook?

  1. Content-Type: application/json

  2. Accept: application/json

Request Body

Parameter

Type

Required

Limitations

name

string

no

events

array

yes

Must be one of the events described in the following table

URL

string

yes


Example:


Note: If you have questions or suggestions about this feature, don't hesitate to contact us via live chat.

Did this answer your question?