hosting
POST /v1/sites/{siteId}/error-pages
Add or replace the custom page for one status code.
Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran sites.panel_access; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
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> }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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`.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
siteId (path) | Uuid | Ya | Site ID (UUIDv7). |
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
status | integer | Ya | — |
value | string | Ya | — |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
data | SiteErrorPage[] | Ya | — |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422 · 429 · 503