domains
POST /v1/domains/{domainId}/email-routing/rules
Add a forwarding rule.
Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione domains.dns.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua 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[]> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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`.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
domainId (path) | Uuid | Sì | The domain's id. |
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
matcher | string | Sì | — |
destinations | string[] | Sì | — |
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 | — |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
rule_id | string | Sì | — |
matcher | string | Sì | The address this rule applies to. Empty for the catch-all. |
destinations | string[] | Sì | — |
action | EmailRoutingAction | Sì | `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 | Sì | — |
enabled | boolean | Sì | — |
catch_all | boolean | Sì | — |
unsupported | boolean | Sì | `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… |
Errori che questo endpoint può restituire
401 · 403 · 404 · 422 · 429 · 503