POST /v1/mail/services/{mailServiceId}/forwarders
Forward an address, a catch-all, or a whole domain.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение mail.manage; ключ без него отклоняется с кодом 403, а не 404.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
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[]> }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
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.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
mailServiceId (path) | Uuid | Да | Email service ID (UUIDv7). |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
source | string | Нет | Required for mailbox; ignored for catchall/wildcard. |
targets | string[] | Да | — |
kind | MailForwarderKind | Нет | mailbox forwards one address; catchall takes anything not otherwise matched at the domain; wildcard forwards the whole domain to another one. |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | string | Да | The mail backend's identifier. |
source | string | Да | The local part being forwarded for mailbox; the domain itself for catchall/wildcard. |
targets | string[] | Да | Where mail goes. May include the backend's reserved drop/reject targets. |
kind | MailForwarderKind | Да | mailbox forwards one address; catchall takes anything not otherwise matched at the domain; wildcard forwards the whole domain to another one. |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422 · 429 · 503