Authentication
Send an API key as a bearer token. The key must carry the domains.dns.manage permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/domains/{domainId}/email-routing/rules \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "matcher": <string>, "destinations": <string[]> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Forward mail for one address to one or more verified destinations, or drop it. `drop` is a chosen behaviour and is never inferred from an empty destination list. Requires `domains.dns.manage`.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
domainId (path) | Uuid | Yes | The domain's id. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
matcher | string | Yes | — |
destinations | string[] | Yes | — |
action | EmailRoutingAction | No | `drop` is a chosen behaviour — it is how a catch-all silently discards spam — and is never inferred from an empty destination list. |
name | string | No | — |
enabled | boolean | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
rule_id | string | Yes | — |
matcher | string | Yes | The address this rule applies to. Empty for the catch-all. |
destinations | string[] | Yes | — |
action | EmailRoutingAction | Yes | `drop` is a chosen behaviour — it is how a catch-all silently discards spam — and is never inferred from an empty destination list. |
name | string | Yes | — |
enabled | boolean | Yes | — |
catch_all | boolean | Yes | — |
unsupported | boolean | Yes | `true` when the provider's rule uses a shape this API cannot express — a Worker target, say. Such a rule is shown read-only rather than hidden: hiding it would make this screen… |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429 · 503