# Sendinblue

The Sendinblue source allows you to send email events to Freshpaint, and send those events to your destinations.

## Setup

Freshpaint uses [Sendinblue webhooks](https://www.sendinblue.com/blog/what-is-a-webhook/) to track email deliveries, opens, and more. There are two types of webhooks you can set up for the Sendinblue source - marketing webhooks and transactional webhooks. Each webhook provides a different set of events:

Marketing:

* Spam
* Opened
* Clicked
* Hard bounced
* Soft bounced
* Delivered
* Unsubscribed

Transactional:

* Sent
* Click
* Deferred
* Delivered
* Soft Bounce
* Hard Bounce
* Complaint
* First opening
* Opened
* Invalid email
* Blocked
* Error
* Unsubscribe

### Marketing Webhooks

Sendinblue marketing webhooks can be used to send events from your Sendinblue marketing campaigns into Freshpaint.

Start by navigating to <https://my.sendinblue.com/advanced/webhook> and click "Add a new webhook".

For "URL to post to", paste the following:

```
https://api.perfalytics.com/sendinblue/<env-id>
```

where "\<env-id>" is your environment ID. You can find the webhook for your environment under "Sendinblue" on the [Sources page](https://app.freshpaint.io/sources).

Then, select which events you'd like to send to Freshpaint, and click "Add". Freshpaint currently only supports the events under "When a message is...".

You should start seeing Sendinblue events in [Live View](https://app.freshpaint.io/events/liveview).

### Transactional Webhooks

Sendinblue transactional webhooks can be used to send events to Freshpaint when transactional messages are being sent, delivered, or opened by your recipients.

Start by navigating to <https://app-smtp.sendinblue.com/webhook> and click "Add a new webhook".

For "URL to call", paste the following:

```
https://api.perfalytics.com/sendinblue/<env-id>
```

Then, select which events you'd like to send to Freshpaint, and click "Save".

You should start seeing Sendinblue events in [Live View](https://app.freshpaint.io/events/liveview).

## Event Schema

Freshpaint supports tracking the following events for the Sendinblue source.

### Marketing

#### Spam

| Attribute name | Description                       |
| -------------- | --------------------------------- |
| event          | "Email: spam"                     |
| email          | The recipient's email             |
| camp\_id       | The internal id of the campaign   |
| campaign\_name | The internal name of the campaign |
| reason         | The spam reason                   |

#### Opened

| Attribute name | Description                       |
| -------------- | --------------------------------- |
| event          | "Email: opened"                   |
| email          | The recipient's email             |
| camp\_id       | The internal id of campaign       |
| campaign name  | The internal name of the campaign |

#### Clicked

| Attribute name | Description                       |
| -------------- | --------------------------------- |
| event          | "Email: clicked"                  |
| email          | The recipient's email             |
| camp\_id       | The internal id of campaign       |
| campaign name  | The internal name of the campaign |
| URL            | The URL that was clicked          |

#### Hard bounced

| Attribute name | Description                       |
| -------------- | --------------------------------- |
| event          | "Email: hard\_bounce"             |
| email          | The recipient's email             |
| camp\_id       | The internal id of the campaign   |
| campaign name  | The internal name of the campaign |
| sending\_ip    | The IP used to send the message   |
| reason         | Hard bounce reason                |

#### Soft bounced

| Attribute type | Description                       |
| -------------- | --------------------------------- |
| event          | "Email: soft\_bounce"             |
| email          | The recipient's email             |
| camp\_id       | The internal id of the campaign   |
| campaign name  | The internal name of the campaign |
| reason         | Soft bounce reason                |
| sending\_ip    | The IP used to send the message   |

#### Delivered

| Attribute name | Description                       |
| -------------- | --------------------------------- |
| event          | "Email: delivered"                |
| email          | The recipient's email             |
| sending\_ip    | The IP used to send the message   |
| camp\_id       | The internal id of the campaign   |
| campaign name  | The internal name of the campaign |

#### Unsubscribed

| Attribute name | Description                                                     |
| -------------- | --------------------------------------------------------------- |
| event          | "Email: unsubscribe"                                            |
| email          | The recipient's email                                           |
| camp\_id       | The internal id of the campaign                                 |
| campaign name  | The internal name of the campaign                               |
| list\_id       | The internal list id's the recipient has been unsubscribed from |

### Transactional

#### Sent

| Attribute Name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: request"                                  |
| email           | Recipient of the message                          |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |

#### Click

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: click"                                    |
| email           | Recipient of the message                          |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |
| link            | URL accessed by the recipient                     |

#### Deferred

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: deferred"                                 |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |
| reason          | The reason the message has been deferred          |

#### Delivered

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: delivered"                                |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |

#### Soft Bounce

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: soft\_bounce"                             |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |
| reason          | The reason the message has been a soft bounce     |

#### Hard Bounce

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: hard\_bounce"                             |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |
| reason          | The reason the message has been soft bounced      |

#### Complaint

| Attribute name  | Description              |
| --------------- | ------------------------ |
| event           | "Email: complaint"       |
| email           | Recipient of the message |
| message-id      | Internal message id      |
| X-Mailin-custom | Custom added header      |

#### First Opening

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: unique\_opened"                           |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |

#### Opened

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: opened"                                   |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| sending\_ip     | The IP used to send the message                   |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |

#### Invalid Email

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: invalid\_email"                           |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |

#### Blocked

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: blocked"                                  |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |

#### Error

| Attribute name  | Description                                       |
| --------------- | ------------------------------------------------- |
| event           | "Email: error"                                    |
| email           | Recipient of the message                          |
| message-id      | Internal message id                               |
| subject         | Message subject                                   |
| X-Mailin-custom | Custom added header                               |
| template\_id    | Internal id of the template                       |
| tags            | Tags you might have used to identify your message |

#### Unsubscribe

| Attribute name  | Description                                      |
| --------------- | ------------------------------------------------ |
| event           | "Email: unsubscribe"                             |
| email           | Recipient of the message                         |
| message-id      | Internal message id                              |
| subject         | Message subject                                  |
| X-Mailin-custom | Custom added header                              |
| template\_id    | Internal id of the template                      |
| tag             | Tag you might have used to identify your message |
| sending\_ip     | IP used to send the message                      |

## Sending Sendinblue Events to Destinations

Once your webhooks are connected and Freshpaint is receiving events from Sendinblue, you will see events show up in the Sendinblue section on the [Events page](https://app.freshpaint.io/events/schema). From here, you'll be able to enable Sendinblue events for any of the server-side Destinations you've set up in Freshpaint. The full list of supported server-side destinations can be found [here](https://documentation.freshpaint.io/sources/server-side#supported-server-side-destinations).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.freshpaint.io/integrations/sources/sendinblue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
