Skip to content

Email

Mailgun mock API

Stateful Mailgun replica: domains with verify, message send with accepted/delivered webhooks, mailing lists and members, bounces/unsubscribes/complaints, templates and webhook registration.

At a glance

Operations
206
Stateful operations
52
Stateful resources
6
Webhook events
3
Vendor API version
v3/v4 (spec 3.0.0)
Verification
Spec-verified

How it works

Use Mailgun without calling Sinch Mailgun

Authorization: Basic YXBpOmtleS0wMTIzNDU2Nzg5YWJjZGVm

State

Resources that remember

Writes persist per caller, so a create followed by a read returns what you created.

ResourceOperations
Domains6
Messages1
Suppressions15
Lists11
Templates12
Webhooks7

Webhooks

Events your handlers can receive

Deliveries are unsigned: Mailgun puts timestamp/token/signature inside the JSON body, signed with HMAC-SHA256(signing key, timestamp + token); not reproducible by a header signer.

Coverage

206 operations

52 of them are stateful. The largest groups:

GroupOperations
Other operations154
Suppressions15
Templates12
Lists11
Webhooks7
Domains6

Verification

Spec-verified

Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.

10 operations cannot be checked against the specification.

Source and limits

License, source and limits

Each collection holds up to 1 MiB of objects per API key; writes beyond that are dropped (x-maxoperf-vs-state: capacity). Message send stores nothing and never delivers: it emits accepted (immediately) and delivered (after 1.5 s) event webhooks to the URLs registered through the webhooks API (o:testmode=yes emits none) and a POST to the unsubscribes table emits unsubscribed. Deliveries are unsigned because Mailgun puts timestamp/token/signature inside the JSON body, so the signature object is omitted. Webhook registrations of any domain receive the events of every domain of the same API key, and each event type holds one URL (registering again replaces it); the v4 DELETE and the events API (GET /v3/{domain}/events) stay generated samples. Domains verify without DNS checks (verify flips unverified to active); sandbox recipient limits are not enforced and unverified domains can send. Timestamps created by the mock are ISO 8601 (seed data uses RFC 1123 like the vendor). Suppression and template lists page with limit (at most 100), page=first|last|next|previous and an address (or p) cursor; term filters, imports and allowlists are not modelled. The EU host api.eu.mailgun.net is the same API and is not modelled separately. 401 is the plain-text Forbidden; 429 and 5xx are never produced.

MaxoPerf is not affiliated with, endorsed by, or sponsored by Sinch Mailgun. Mailgun is a trademark of its owner.