hosting
POST /v1/sites/{siteId}/error-pages
Add or replace the custom page for one status code.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن sites.panel_access؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.
لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/error-pages \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "status": <integer>, "value": <string> }'هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API
التفاصيل
Sends **one** rule; the others are preserved. ⛔ The vendor endpoint underneath is a **whole-set** write — it replaces every rule on every call — so the engine reads the current set, applies this one change and sends the whole thing back. Two edits made inside one vendor round trip are therefore last-writer-wins, which cannot be fixed from our side: there is no per-rule identifier and no conditional write. A client should re-read after a write rather than assume its own optimistic copy is current. Only `400`–`599` may carry a custom page: a rule on any other code would replace a working response. Requires `sites.panel_access`.
المعلمات
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
siteId (path) | Uuid | نعم | Site ID (UUIDv7). |
جسم الطلب
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
status | integer | نعم | — |
value | string | نعم | — |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
data | SiteErrorPage[] | نعم | — |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
401 · 403 · 404 · 422 · 429 · 503