# Obtain Response Data via Webhook

Webhooks are used to obtain response data from Mandrill, such as whether your customer has subscribed or unsubscribed from 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/faq/events/can-i-create-segments-based-on-events/event-segmentation-using-esp-integrations).

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="/files/H3M3wjJJIAdsgNpf5io0" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/GLDptxroC87J9sSCfCsK" alt=""><figcaption></figcaption></figure>

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

## Adding a Webhook to Mandrill

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

* [*Log in*](https://mandrillapp.com/login/?referrer=%2F) to you Mandrill account.
* Click on the small arrow icon beside the "Settings" section in the left panel menu.
* Select the `Webhooks` tab.
* Click the `+Add a Webhook` button.

<figure><img src="/files/yvs64T7HmkdCkXxyk26c" alt=""><figcaption></figcaption></figure>

* In the "Trigger on Events" section, tick all fields apart from:
  * Rejection Whitelist Changes
  * Rejection Blacklist Changes
* Paste the copied URL from the previous steps into the "Post To URL" field.
* Enter a descriptive Webhook name.
* Select `Create Webhook`.

<figure><img src="/files/Im9IIvjf6b6YI5RgZFMW" alt=""><figcaption></figcaption></figure>

### Blacklist Data Webhook

* If you would like to receive blacklist data Webhook only, click the `Add a Webhook` button.
* In the "Trigger on Events" section, select the following fields:
  * Rejection Blacklist Changes
  * Rejection Whitelist Changes
* Paste the copied URL from previous steps into the "Post To URL" field.
* Enter a descriptive Webhook name in the "Description" field.
* Select `Create Webhook`.

<figure><img src="/files/d3iFoxy8gStPAHxdoghP" alt=""><figcaption></figcaption></figure>

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


---

# 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.crossengage.io/data-and-engagement-platform/messages/integrations/channels/email/mandrill-by-mailchimp/obtain-response-data-via-webhook.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.
