Swarmz
IntegrationsMessaging and automation

Mailgun

Send Mailgun email and inspect sending domains and delivery events from Swarmz

Connect Mailgun when a project needs transactional email through a verified Mailgun domain or needs to show bounded delivery events. Swarmz keeps the private API key behind the connector gateway.

Mailgun is a shared workspace connection. Sends use one Mailgun account for every generated-app user permitted by the app's own authorization rules.

Availability

A Swarmz administrator must show Mailgun under Platform config > Integrations. Mailgun does not require a Swarmz OAuth application.

Connect Mailgun

  1. In Mailgun, verify the sending domain and copy a private API key. Prefer a dedicated domain sending key when its permissions cover the project. Mailgun documents API security.
  2. In the Swarmz project, open Settings > Integrations and select Mailgun.
  3. Enter the key in API key.
  4. In Mailgun region, enter us for api.mailgun.net or eu for api.eu.mailgun.net.
  5. Select Save connection.

Swarmz validates the key by listing one domain on the selected fixed origin. Custom API URLs are rejected.

Available operations

OperationWhat it doesLimit per minute
send_emailSends text or HTML email from one verified domain to up to 50 recipients20
list_domainsLists up to 100 sending domains30
get_domainReads one sending domain30
list_eventsReads up to 300 delivery events for one domain30

Sending email requires allow-once approval. Domain and event operations are reads. Mailgun recipient, account, and domain limits still apply below the Swarmz request bounds.

Ask the AI to use Mailgun

  • “List the connected Mailgun domains, then send a test receipt from the verified app domain.”
  • “Build a delivery view showing accepted, delivered, bounced, complained, and unsubscribed events.”
  • “Add a Mailgun webhook endpoint for inbound messages and event updates, with signature verification before processing.”

The AI requests Mailgun when the project first needs real email or event data. It uses returned domain names rather than inventing one and keeps the private key in the gateway.

Configure generated-app webhooks

The connector can read recent Mailgun events, but it does not receive webhooks for the generated app. For immediate event or inbound-message handling:

  1. Ask the AI to create a server-only Mailgun webhook endpoint.
  2. Request the Mailgun webhook signing key through the project's secure secret form.
  3. Verify Mailgun's timestamp, token, and signature before accepting the payload.
  4. Configure the published endpoint in Mailgun and send a controlled test message.

Mailgun documents webhook signing and retry behavior.

Verify and recover

List domains and select a verified test domain. Send to a controlled inbox, confirm the message in Mailgun logs, then read its event through list_events. If a webhook is configured, confirm the same message updates the app record once.

If setup fails, check that the key and domain belong to the selected region. If sends fail, inspect domain verification, sender address, suppression lists, account limits, and recipient syntax. Rotate the key by updating Swarmz and running list_domains before revoking the previous key.

On this page