> ## Documentation Index
> Fetch the complete documentation index at: /help/llms.txt
> Use this file to discover all available pages before exploring further.

# Brevo

> Create or update Brevo contacts from a campaign and add them to a list for your newsletter or automation.

> [!NOTE]
>
> **Pro plan.** Brevo works through a connection and HTTP steps, which are part of Pro and Agency (and the free trial). Anything you already have keeps working on every plan. See [Plans and billing](/help/account/billing.md).

When a contact accepts your invitation and has an email, a **Webhook / HTTP** step creates them in Brevo (or updates them if they exist) and adds them to the list your newsletter or Brevo automation uses.

> [!NOTE]
>
> **How it connects:** Brevo's API v3 with your key in the `api-key` header. See Brevo's [Create a contact](https://developers.brevo.com/reference/createcontact) docs. The request and answers below follow Brevo's docs.

## Before you start

* **Brevo plan:** the API is available on Brevo's free plan; sending limits depend on your plan.
* **An API key:** in Brevo, open **SMTP & API > API keys** and create one.
* **The list's id:** in **Contacts > Lists**.
* **Attributes:** the attributes you send (for example `FNAME`, `LNAME`) must already exist in **Contacts > Settings**.
* **Consent:** add people to a newsletter only on a basis your law allows; a double opt-in list is the safe choice.

## 1. Connect Brevo

In Kerux, open **Integrations > Connections**, click **Connect** on **Custom API** (under **Developers**):

* **How it signs in:** **API key in a header**, **Header name** `api-key`, paste the key.
* **Base URL:** `https://api.brevo.com`

Click **Save**, then **Test connection**.

## 2. Create or update the contact

After **Invitation accepted** and a **Condition** that the contact has an email, add a **Webhook / HTTP** step named `brevo`:

```json theme={null}
{
  "method": "POST",
  "url": "/v3/contacts",
  "bodyType": "json",
  "body": {
    "email": "{{email}}",
    "attributes": { "FNAME": "{{contact.first_name}}", "LNAME": "{{contact.last_name | optional}}" },
    "listIds": [12],
    "updateEnabled": true
  }
}
```

Replace `12` with your list's id. A new contact comes back as `201` with its id:

```json theme={null}
{ "id": 21 }
```

An existing contact is updated and Brevo answers `204` with no body. Both count as success in Kerux.

## Test with one contact

In the **Builder**, click **Test** to open **Test on one contact** with your own email. Check the contact and the list in Brevo.

## Common errors

> [accordion] 400 with an attribute error
>
> An attribute you send doesn't exist in Brevo. Create it in **Contacts > Settings**, or remove it from the body.

> [accordion] 400 duplicate\_parameter
>
> The contact exists and `updateEnabled` isn't `true`. Add it to the body.

> [accordion] 401 Unauthorized
>
> The key is wrong. Create a new one in **SMTP & API > API keys** and edit the connection.

Related: [Webhook steps](/help/integrations/webhook-steps.md), [Mailchimp](/help/integration-guides/mailchimp.md), [ActiveCampaign](/help/integration-guides/activecampaign.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.