Finding your API Key

Log into the Mailgun Control Panel. On the Mailgun dashboard, there will be an overview of your Mailgun account which will include sections for your API Keys and Sending Domains. You will need to get both the API Key and one of your verified Sending Domains to connect with Sendwithus.

Alternatively, you can go to the API Keys page located in your Mailgun account settings. There will be two API keys available, the one you will need to use will be the Private API Key (key-abcde12345abcde). Save this key to use in the steps below.

To get your Sending Domain, visit the section on your Mailgun Control Panel or go to the Domains page.

Make sure your domains are configured properly before proceeding. Check out Mailgun’s article on how to verify your Sending Domain.

Connect with Sendwithus

  1. Go to Delivery Settings in the Sendwithus dashboard, and click on the Add ESP Account button.
  2. Name the account and select Mailgun as the Account Type.
  3. Copy and paste the domain from your Mailgun Control Panel into the Domain field and the API key into the API Key field.
  4. Click the Save ESP Account and wait for verification.

Enable Sendwithus Analytics in Mailgun

Ensure that you’re in the Webhooks section of the Mailgun dashboard. Verify that all webhooks are set to something similar to this URL: “”. If everything is the same, Sendwithus is properly integrated with your Mailgun account. If all of the webhooks aren’t the same, simply change them to point at Sendwithus by:

  1. Clicking the plus icon
  2. Adding the “…” URL in the input box and save!

If none of the webhooks are set up, contact to get your analytics URL.

Is your team already using these webhooks internally? Check out our Webhooks FAQ article on how to relay webhooks from Sendwithus.

Add Multiple Sending Domains

If you have multiple sending domains in Mailgun and want to connect these to your Sendwithus account, you can do so by adding each Sending Domain as a new separate ESP. Just enter the unique Sending Domain into the Domain field upon ESP creation.