domains

PUT /v1/domains/{domainId}/email-routing/rules/{ruleId}

Change 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 PUT https://api.zinndigital.com/v1/domains/{domainId}/email-routing/rules/{ruleId} \
  -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

Requires `domains.dns.manage`. The catch-all is a separate resource at the provider and cannot be changed through this path — use `PUT .../email-routing/catch-all`.

Parameters

NameTypeRequiredWhat it is
domainId (path)UuidYesThe domain's id.
ruleId (path)stringYesThe provider's own id for the routing rule.

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