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

# Sendinblue

In this section, we present how to connect Sendinblue to MindsDB.

[Brevo (formerly Sendinblue)](https://www.brevo.com/) is an all-in-one platform to automate your marketing campaigns over Email, SMS, WhatsApp or chat.

Data from Sendinblue can be used to understand the impact of email marketing.

## Prerequisites

Before proceeding, ensure the following prerequisites are met:

1. Install MindsDB locally via [Docker](/setup/self-hosted/docker) or [Docker Desktop](/setup/self-hosted/docker-desktop).
2. To connect Sendinblue to MindsDB, install the required dependencies following [this instruction](/setup/self-hosted/docker#install-dependencies).
3. Install or ensure access to Sendinblue.

## Connection

This handler is implemented using the [sib-api-v3-sdk](https://github.com/sendinblue/APIv3-python-library) library, a Python library that wraps Sendinblue APIs.

The required arguments to establish a connection are as follows:

* `api_key`: a required Sendinblue API key to use for authentication

<Tip>
  Check out [this guide](https://developers.brevo.com/docs) on how to create the Sendinblue API key.

  It is recommended to use the API key to avoid the `API rate limit exceeded` error.
</Tip>

Here is how to connect the SendinBlue to MindsDB:

```sql theme={null}
CREATE DATABASE sib_datasource
WITH ENGINE = 'sendinblue',
PARAMETERS = {
  "api_key": "xkeysib-..."
};
```

## Usage

Use the established connection to query your database:

```sql theme={null}
SELECT * FROM sib_datasource.email_campaigns
```

Run more advanced queries:

```sql theme={null}
SELECT  id, name
FROM sib_datasource.email_campaigns
WHERE status = 'sent'
ORDER BY name
LIMIT 5
```

<Info>
  For more information about available actions and development plans, visit [this page](https://github.com/mindsdb/mindsdb/blob/main/mindsdb/integrations/handlers/sendinblue_handler/README.md).
</Info>
