POST /v1/mail/services/{mailServiceId}/forwarders
Forward an address, a catch-all, or a whole domain.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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
التفاصيل
`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