domains

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

Add a forwarding rule.

Tous les points de terminaison domains

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation domains.dns.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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[]> }'

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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`.

Paramètres

NomTypeObligatoireQu'est-ce que c'est
domainId (path)UuidOuiThe domain's id.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
matcherstringOui
destinationsstring[]Oui
actionEmailRoutingActionNon`drop` is a chosen behaviour — it is how a catch-all silently discards spam — and is never inferred from an empty destination list.
namestringNon
enabledbooleanNon

Réponse

NomTypeObligatoireQu'est-ce que c'est
rule_idstringOui
matcherstringOuiThe address this rule applies to. Empty for the catch-all.
destinationsstring[]Oui
actionEmailRoutingActionOui`drop` is a chosen behaviour — it is how a catch-all silently discards spam — and is never inferred from an empty destination list.
namestringOui
enabledbooleanOui
catch_allbooleanOui
unsupportedbooleanOui`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…

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 404 · 422 · 429 · 503