Web hook Mailerlite

Hello. I have trawled this forum and the internet at large and cannot find a good guide/tutorial on this.

How can I connect my Bricks form to Mailerlite (or any other email platform)? I understand I need to select Web Hook as an action and then set an endpoint and fill in the data and headers fields but can’t find where I find this information.

I just need an example of the code, have it pointed out which bits I need to alter and where to find any codes/IDs etc I need within Mailerlite.

Thank you for any help you are able to provide!

Hi Molly,
You can do this with the Form element’s Webhook action. The Bricks webhook settings are documented here: Form | Bricks Academy

For MailerLite’s current API, use this as a starting point:

Endpoint URL: https://connect.mailerlite.com/api/subscribers
Data format: JSON
Headers: { "Authorization": "Bearer YOUR_MAILERLITE_API_TOKEN", "Content-Type": "application/json", "Accept": "application/json" }
Data: { "email": "{{EMAIL_FIELD_ID}}", "fields": { "name": "{{NAME_FIELD_ID}}" }, "groups": ["MAILERLITE_GROUP_ID"] }

Replace EMAIL_FIELD_ID and NAME_FIELD_ID with the actual Bricks field IDs from your form fields. Replace YOUR_MAILERLITE_API_TOKEN with an API token from MailerLite > Integrations > MailerLite API. Replace MAILERLITE_GROUP_ID with the group ID from MailerLite; their Groups API is documented here: Groups | MailerLite Developers

The same pattern applies to other providers: take the endpoint URL, required headers, and JSON body from that provider’s API docs, then map Bricks form values with {{field_id}} placeholders.