> For the complete documentation index, see [llms.txt](https://documentation.crossengage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.crossengage.io/data-and-engagement-platform/messages/integrations/channels/email/mailgun/set-up-mailgun-integration.md).

# Set up Mailgun Integration

Before you begin, you will need the following:‌

* Mailgun Account
* CrossEngage Account
* User data (including an email address)

### **Fetching Your Mailgun API Key** <a href="#fetching-your-mailgun-api-key" id="fetching-your-mailgun-api-key"></a>

A Mailgun API key allows CrossEngage to connect to your Mailgun account. There are two simple ways to fetch your Mailgun API keys. You can either locate the keys in `Account Settings` > `Security` or by following the consecutive steps:‌

* [*Log in*](https://app.mailgun.com/sessions/new) to your Mailgun account.
* Scroll down on the dashboard.
* On the right side of the page you will find a box labelled `API keys` where your Public and Private API keys are located.

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

**Public Validation Key** - Suitable for use in client-side web applications, such as through the jQuery plugin.

**Private API Key** - Suitable for use in backend applications where there is not a risk of key exposure.‌

* Click on the eye icon to make the full API key of your choice visible. We encourage you to use the Private API Key.
* Copy the Private API key - it will be used later for the integration.

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

### Configuring a Mailgun Integration in CrossEngage <a href="#setting-up-a-mailgun-integration-in-crossengage" id="setting-up-a-mailgun-integration-in-crossengage"></a>

* In the CrossEngage app, navigate to `Settings` > `Integrations.`
* Click the `Add new integration` button in the top right corner of the page.

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

* Search for Mailgun, then click `Set up`. An integration set-up form will open.

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

* Enter a clear, descriptive name for your integration in the "Account name" field.
* Paste the Private API key that you copied from your Mailgun account during the previous steps into the "Connection" field.
* Click `Connect`.
* Choose your Mailgun domain and click `Apply` to save your integration.

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