domains
PUT /v1/domains/{domainId}/email-routing/rules/{ruleId}
Change a forwarding rule.
احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز 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