POST /v1/mail/services/{mailServiceId}/forwarders
Forward an address, a catch-all, or a whole domain.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation mail.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/mail/services/{mailServiceId}/forwarders \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "targets": <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
`source` is required for `mailbox` and **ignored** for `catchall`/`wildcard`, where the whole domain is the source — so it may be omitted for those rather than sending a value the backend discards. Requires `mail.manage`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
mailServiceId (path) | Uuid | Oui | Email service ID (UUIDv7). |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
source | string | Non | Required for `mailbox`; ignored for `catchall`/`wildcard`. |
targets | string[] | Oui | — |
kind | MailForwarderKind | Non | `mailbox` forwards one address; `catchall` takes anything not otherwise matched at the domain; `wildcard` forwards the whole domain to another one. |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | string | Oui | The mail backend's identifier. |
source | string | Oui | The local part being forwarded for `mailbox`; the domain itself for `catchall`/`wildcard`. |
targets | string[] | Oui | Where mail goes. May include the backend's reserved drop/reject targets. |
kind | MailForwarderKind | Oui | `mailbox` forwards one address; `catchall` takes anything not otherwise matched at the domain; `wildcard` forwards the whole domain to another one. |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 422 · 429 · 503