Source connector
Mailgun connector
Mailgun integration for databases, warehouses and BI tools
Transactional email API with delivery analytics. Datrise captures Mailgun entities such as messages, domains, delivery events, bounces, complaints and mailing lists, then lands normalized and typed models for warehouse reporting, attribution, and AI workflows.
The Mailgun Events API (Logs API) authenticates with HTTP Basic, API key, incremental runs key on timestamp, and Mailgun caps calls at 500 requests every 10 seconds per API key (published under Mailgun's Rate Limits and Quotas reference).
Of the 6 objects, 4 sync as upserts keyed on the primary key and 2 as append-only streams, so each incremental run moves only what changed since the last watermark. Every object lands in its own table (for example `mailgun_messages`) with a schema derived from the Mailgun API rather than a flattened CSV, in any of the 43 supported destinations.
Datrise is in early access: pick a destination below to open the Mailgun pipeline page, and join the waitlist to get the Mailgun connector with guided onboarding.
What Mailgun data Datrise extracts
Each object lands in its own typed table. Sync mode is derived from the object: history-style objects append, everything else upserts.
| Object | Landing table | Sync mode |
|---|---|---|
| messages | mailgun_messages | Append-only, incremental by timestamp |
| domains | mailgun_domains | Upsert by primary key, incremental on updated-at |
| delivery events | mailgun_delivery_events | Append-only, incremental by timestamp |
| bounces | mailgun_bounces | Upsert by primary key, incremental on updated-at |
| complaints | mailgun_complaints | Upsert by primary key, incremental on updated-at |
| mailing lists | mailgun_mailing_lists | Upsert by primary key, incremental on updated-at |
Mailgun API: setup facts for the connector
Verified against the vendor documentation on 2026-09-02. Unknown values are left blank rather than guessed.
| API | Mailgun Events API (Logs API) |
|---|---|
| Authentication | HTTP Basic, API key — Requests use HTTP Basic auth with the literal username `api` and an account private API key as the password (e.g. `--user 'api:YOUR_API_KEY'`). |
| Pagination | link_header — A request defines a time range plus filters; the response returns a page of events along with absolute `next` and `previous` page URLs to follow until an empty page is reached. |
| Rate limit | 500 requests every 10 seconds per API key (published under Mailgun's Rate Limits and Quotas reference). |
| Incremental cursor | timestamp — Each event has a Unix-epoch `timestamp` and a same-day-unique `id`; incremental pulls advance the query's begin/end time window and use `id` to de-duplicate events seen in overlapping ranges. |
| Webhooks | Yes — Mailgun webhooks (delivered, opened, clicked, unsubscribed, complained, failed, etc. — same event types exposed via the Events API) |
| Bulk export | No |
| Deletes detectable | No |
What bites when replicating Mailgun
- Mailgun retains event data for only 30 days, and access to historical events varies by plan, so a connector that misses a sync window longer than 30 days permanently loses that history — there is no deeper backfill endpoint.
- The `id` field on each event is unique only within a single day, not globally, so de-duplication logic across day boundaries must key on `(timestamp date, id)` rather than `id` alone.
- Events from different physical hosts can arrive out of order, so the most recent page returned by the API may still be missing events in flight; Mailgun's documented fix is to only trust a page once its last event's `timestamp` is older than roughly 30 minutes (or 15+ seconds between re-polls), otherwise discard and re-fetch.
- Events are an append-only activity stream with no delete events, so there is no way to detect a record being removed from Mailgun's side; downstream consumers only ever add rows.
Popular destinations for Mailgun
Choose a destination below to open the ready pipeline page.
- AAirtable
Relational spreadsheet destination for ops and go-to-market teams.
View pipeline - AAmazon Athena
Serverless SQL over S3 data lake tables.
View pipeline - AAmazon DynamoDB
Serverless key-value and document store on AWS.
View pipeline - AAmazon QuickSight
AWS serverless BI with SPICE and embedded analytics.
View pipeline - AAmazon Redshift
AWS petabyte-scale warehouse with Spectrum.
View pipeline - AAmazon S3 Data Lake
Object storage landing zone for parquet and snapshots.
View pipeline - AApache Superset
Open-source BI for SQL exploration, charts, and dashboard publishing.
View pipeline - AAzure Data Lake Storage
ADLS Gen2 object storage for analytics workloads.
View pipeline - AAzure Synapse
Microsoft analytics workspace with SQL pools.
View pipeline
Mailgun connector FAQ
- What Mailgun data does the connector extract?
- 6 objects: messages, domains, delivery events, bounces, complaints and mailing lists. Each lands in its own table with types preserved; history-style objects (2: messages and delivery events) load as append-only streams.
- Is the Mailgun integration incremental?
- Yes. After the initial full load, every run reads only records changed since the last watermark (updated-at or event timestamp) and applies an upsert or an append depending on the object.
- Where can I load Mailgun data?
- Into 43 destinations: relational databases, cloud warehouses, data lakes, spreadsheets and BI tools. Each Mailgun → destination pair has its own page with the object-to-table mapping.
Related sources
Other sources in the same category, each with its own connector page.
Early access
Launch your Mailgun pipeline with guided onboarding
Join the waitlist to get priority access for Mailgun integrations with guided setup, schema-aware mapping, and production-grade incremental sync.