Referenz

API-Referenz

Basis-URL https://mailzone-api.oritool.com. Authentifizierung per HTTP Basic (api:KEY) oder Bearer-Token.

Diese Seite ist auf Englisch verfügbar.

Fehler und Limits

Errors return {"message": "…"} with a 4xx or 5xx status. Responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Timestamps are RFC 3339 except in Mailgun-shaped event payloads, where timestamp is a Unix float.

Versand

Mailgun-compatible message endpoints. Accepts multipart/form-data, urlencoded or JSON bodies.

POST/v3/{domain}/messages

Queue a message for delivery.

fromerforderlichSender address, e.g. Acme <[email protected]>
toerforderlichRecipient(s); repeat or comma separate
cc / bccAdditional recipients
subjectMessage subject
text / html / amp-htmlMessage bodies (at least one, unless template is used)
attachment / inlineFiles; inline files are referenced as cid:filename
templateStored template name; use t:version and t:variables (JSON)
o:tagUp to 10 tags for analytics and filtering
o:deliverytimeSchedule delivery (RFC 2822 date, up to 7 days ahead)
o:testmodeyes — accept and log without delivering
o:tracking, o:tracking-opens, o:tracking-clicksyes | no | htmlonly
o:require-tls / o:skip-verificationTLS policy for this message
o:sending-ip-poolIP pool id to send from
h:X-My-HeaderCustom MIME header
v:my-varUser variable returned in events and webhooks
recipient-variablesJSON keyed by address for batch sends; use %recipient.key%
{ "id": "<[email protected]>", "message": "Queued. Thank you." }
POST/v3/{domain}/messages.mime

Send a pre-built MIME message.

toerforderlichEnvelope recipients
messageerforderlichRaw MIME file
GET/v3/domains/{domain}/messages/{storage_key}

Retrieve a stored outbound message (metadata + raw MIME).

DELETE/v3/{domain}/envelopes

Purge the domain's pending queue.

Domains

GET/v3/domains

List domains.

{ "total_count": 1, "items": [Domain] }
POST/v3/domains

Add a domain and get the DNS records to publish.

nameerforderlichDomain name, e.g. mg.example.com
wildcardAllow sending from subdomains
spam_actiondisabled | tag | block — spam filtering for routed inbound mail: tag adds X-Mailgun-Sflag / X-Mailgun-Sscore, block drops spam
{ "message", "domain", "sending_dns_records": [DNSRecord], "receiving_dns_records": [DNSRecord] }
GET/v3/domains/{name}

Domain details with DNS records and verification state.

PUT/v3/domains/{name}/verify

Re-check DNS immediately.

PUT/v3/domains/{name}

Update settings: tracking_host, ip_pool_id, spam_action, wildcard.

DELETE/v3/domains/{name}

Delete a domain.

POST/v3/domains/{name}/dkim/rotate

Generate a new DKIM key (publish the new record).

GET/v3/domains/{name}/tracking

Tracking settings for opens, clicks and unsubscribes.

PUT/v3/domains/{name}/tracking/{open|click|unsubscribe}

Toggle tracking.

activeerforderlichyes | no
GET/v3/domains/{name}/credentials

List SMTP credentials.

POST/v3/domains/{name}/credentials

Create SMTP credentials.

loginerforderlichLocal part or full address
passwordOptional; generated when omitted
{ "message", "login", "password" }
PUT/v3/domains/{name}/credentials/{login}

Change an SMTP password.

DELETE/v3/domains/{name}/credentials/{login}

Delete SMTP credentials.

Ereignisse und Statistiken

GET/v3/{domain}/events

Query the event log (keyset pagination).

eventaccepted, delivered, failed, opened, clicked, unsubscribed, complained, stored, rejected (space = OR)
severitypermanent | temporary
recipient / message-id / tagsFilters
begin / endRFC 2822 date or Unix timestamp
ascendingyes for oldest first
limitUp to 300
{ "items": [event-data], "paging": { "next": "https://…?page=…", "previous": "…" } }
GET/v3/{domain}/stats/total

Aggregated counters.

eventerforderlichRepeat for each event type
duratione.g. 30d, 24h
resolutionhour | day | month

Sperrlisten

Types: bounces, complaints, unsubscribes, allowlists.

GET/v3/{domain}/{type}

List entries (limit, page, term).

GET/v3/{domain}/{type}/{address}

Look up one address.

POST/v3/{domain}/{type}

Add entries: form fields address, code, error, tag — or a JSON array of up to 1,000.

DELETE/v3/{domain}/{type}/{address}

Remove one address.

DELETE/v3/{domain}/{type}

Clear the whole list.

Webhooks

Types: accepted, delivered, permanent_fail, temporary_fail, opened, clicked, unsubscribed, complained.

GET/v3/domains/{domain}/webhooks

All webhooks of a domain.

{ "webhooks": { "delivered": { "urls": ["https://…"] } } }
POST/v3/domains/{domain}/webhooks

Create a webhook.

iderforderlichWebhook type
urlerforderlichEndpoint URL; repeat up to 3 times
GET/v3/domains/{domain}/webhooks/{type}

Get one webhook.

PUT/v3/domains/{domain}/webhooks/{type}

Replace URLs.

DELETE/v3/domains/{domain}/webhooks/{type}

Delete a webhook.

Eingangsrouten

GET/v3/routes

List routes (skip, limit).

POST/v3/routes

Create a route.

priorityLower runs first
descriptionFree text
expressionerforderlichmatch_recipient("…"), match_header("name", "…") or catch_all()
actionerforderlichforward("…"), store(notify="…"), stop(); repeatable
GET/v3/routes/{id}

Get a route.

PUT/v3/routes/{id}

Update a route.

DELETE/v3/routes/{id}

Delete a route.

Vorlagen

GET/v3/{domain}/templates

List templates.

POST/v3/{domain}/templates

Create a template, optionally with its first version (template, tag, engine, comment, subject).

GET/v3/{domain}/templates/{name}

Get a template; add active=yes to include the active version.

PUT/v3/{domain}/templates/{name}

Update the description.

DELETE/v3/{domain}/templates/{name}

Delete a template and its versions.

GET/v3/{domain}/templates/{name}/versions

List versions.

POST/v3/{domain}/templates/{name}/versions

Create a version (template, tag, subject, text, comment, active=yes).

GET/v3/{domain}/templates/{name}/versions/{tag}

Get a version.

PUT/v3/{domain}/templates/{name}/versions/{tag}

Update or activate a version.

DELETE/v3/{domain}/templates/{name}/versions/{tag}

Delete a version.

Mailinglisten

GET/v3/lists/pages

List mailing lists.

POST/v3/lists

Create a list (address, name, description, access_level).

GET/v3/lists/{address}

Get a list.

PUT/v3/lists/{address}

Update a list.

DELETE/v3/lists/{address}

Delete a list.

GET/v3/lists/{address}/members/pages

List members (limit, subscribed).

POST/v3/lists/{address}/members

Add a member (address, name, vars, subscribed, upsert).

POST/v3/lists/{address}/members.json

Bulk add members (members JSON array, upsert).

GET/v3/lists/{address}/members/{member}

Get a member.

PUT/v3/lists/{address}/members/{member}

Update a member.

DELETE/v3/lists/{address}/members/{member}

Remove a member.

E-Mail-Validierung

GETPOST/v4/address/validate

Validate one address.

addresserforderlichAddress to check
{ "address", "is_disposable_address", "is_role_address", "is_free_provider", "reason": [], "result": "deliverable", "risk": "low", "did_you_mean": null, "root_address", "mx_found": true }
POST/v4/address/validate/bulk

Validate up to 1,000 addresses: JSON { addresses: [...] }.

Betrieb

GET/healthz

Liveness probe.

GET/readyz

Readiness probe (database reachable).

API-Referenz · Dokumentation · MailZone