# Obtain Response Data via Webhook

Webhooks are used to obtain response data from Mailjet, such as whether your customer has opened or clicked your mailing. These data will be processed by CrossEngage and displayed in each campaign’s statistics. The generated data can be used to build [user segments](https://documentation.crossengage.io/data-and-engagement-platform/user-segmentation).

Your CrossEngage "Web tracking and response data API key" is needed for this Webhook configuration.

## Preparing a Webhook URL

To fetch the "Web tracking and response data API key":

* Log in to your CrossEngage account.
* Navigate to `Settings` > `System setup`.

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2Faxn3Ui8ry2Aipp2XZS4l%2FSystemSetup.png?alt=media&#x26;token=44af739e-48d8-4235-900e-0fba92ef70e1" alt=""><figcaption></figcaption></figure>

* &#x20;In the `API keys` section, copy the “Web tracking and response data API key”.

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2F41V9LvF2G5qWLsdX4PTW%2FSystemSetup_APIkeys.png?alt=media&#x26;token=86f1b6f9-b71f-4a9e-9c46-c33cbd5045ed" alt=""><figcaption></figcaption></figure>

* Paste your copied API key into the following URL instead of the placeholder "{webapikey}."
  * ​[https://api.crossengage.io/mailjet/inbound/message/{webapikey](https://api.crossengage.io/mailjet/inbound/message/%7Bwebapikey)}
* When finished, copy the adjusted URL.&#x20;

## Adding a Webhook to Mailjet

Webhook URLs must be added to Mailjet to allow response data to be sent to the CrossEngage System. This is done via the following steps:

* [Log in](https://app.mailjet.com/signin) to your Mailjet Account.
* Select `Account Settings` from the dropdown menu next to your username.

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2FEx6m40tm3qIwz7DybpQn%2FMailjet_AccountSettings.png?alt=media&#x26;token=f7a3fd9d-385a-4a6c-8d40-777bb467fd79" alt=""><figcaption></figcaption></figure>

* In the “REST API” box select `Event notifications (webhooks)`. We will now specify where the event data will be sent.&#x20;

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2FUO3lLIvAqAK9VVqZBnMF%2FMailjet_Webhooks.png?alt=media&#x26;token=b5cc1c30-ba11-4908-9a53-b2556a4691a6" alt=""><figcaption></figcaption></figure>

* Click on the checkboxes of events for which you wish to receive response data.
* Paste the copied URL from the previous steps into the “Endpoint URL” cells of all chosen events to be sent to CrossEngage.
* &#x20;Click `Save` when finished.

<figure><img src="https://985110910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hio8LJewN8lQY2Vlqy0%2Fuploads%2Fh1oKCD6NX2n4MCRX5ZUc%2FMailjet_Events.png?alt=media&#x26;token=e8d4452b-d99c-4867-9d41-983fef278dbb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To include all events, click the`Select all`checkbox in the "Event" column, paste your adjusted URL into the first Endpoint URL cell and click `Apply to all`.
{% endhint %}

You will now be able to view response data in your CrossEngage dashboard and use the information to build segments.
