domains

POST /v1/domains/{domainId}/email-routing/rules

Add a forwarding rule.

All domains endpoints

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

NameTypeRequiredWhat it is
domainId (path)UuidYesThe domain's id.

Request body

NameTypeRequiredWhat it is
matcherstringYes
destinationsstring[]Yes
actionEmailRoutingActionNo`drop` is a chosen behaviour — it is how a catch-all silently discards spam — and is never inferred from an empty destination list.
namestringNo
enabledbooleanNo

Response

NameTypeRequiredWhat it is
rule_idstringYes
matcherstringYesThe address this rule applies to. Empty for the catch-all.
destinationsstring[]Yes
actionEmailRoutingActionYes`drop` is a chosen behaviour — it is how a catch-all silently discards spam — and is never inferred from an empty destination list.
namestringYes
enabledbooleanYes
catch_allbooleanYes
unsupportedbooleanYes`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