POST /v1/mail/services/{mailServiceId}/forwarders
Forward an address, a catch-all, or a whole domain.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão mail.manage; uma chave sem ela é recusada com 403, e não 404.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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[]> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
`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`.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
mailServiceId (path) | Uuid | Sim | Email service ID (UUIDv7). |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
source | string | Não | Required for `mailbox`; ignored for `catchall`/`wildcard`. |
targets | string[] | Sim | — |
kind | MailForwarderKind | Não | `mailbox` forwards one address; `catchall` takes anything not otherwise matched at the domain; `wildcard` forwards the whole domain to another one. |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | string | Sim | The mail backend's identifier. |
source | string | Sim | The local part being forwarded for `mailbox`; the domain itself for `catchall`/`wildcard`. |
targets | string[] | Sim | Where mail goes. May include the backend's reserved drop/reject targets. |
kind | MailForwarderKind | Sim | `mailbox` forwards one address; `catchall` takes anything not otherwise matched at the domain; `wildcard` forwards the whole domain to another one. |
Erros que este endpoint pode retornar
401 · 403 · 404 · 422 · 429 · 503