domains
PUT /v1/domains/{domainId}/email-routing/rules/{ruleId}
Change a forwarding rule.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение domains.dns.manage; ключ без него отклоняется с кодом 403, а не 404.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X PUT https://api.zinndigital.com/v1/domains/{domainId}/email-routing/rules/{ruleId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "matcher": <string>, "destinations": <string[]> }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
Requires `domains.dns.manage`. The catch-all is a separate resource at the provider and cannot be changed through this path — use `PUT .../email-routing/catch-all`.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
domainId (path) | Uuid | Да | The domain's id. |
ruleId (path) | string | Да | The provider's own id for the routing rule. |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
matcher | string | Да | — |
destinations | string[] | Да | — |
action | EmailRoutingAction | Нет | `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 | Нет | — |
enabled | boolean | Нет | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
rule_id | string | Да | — |
matcher | string | Да | The address this rule applies to. Empty for the catch-all. |
destinations | string[] | Да | — |
action | EmailRoutingAction | Да | `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 | Да | — |
enabled | boolean | Да | — |
catch_all | boolean | Да | — |
unsupported | boolean | Да | `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… |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422 · 429 · 503