hosting
PUT /v1/sites/{siteId}/wordpress/themes/{themeName}
Activate or deactivate a theme on a site.
Autentikasi
Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin sites.view; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.
Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/wordpress/themes/{themeName} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "active": <boolean> }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
Switches the site's active theme and returns the whole theme list. Activating a theme changes what every visitor sees immediately, so the client confirms first. Refused `422` when the package type does not carry `wp_themes`, or when WordPress is not installed. `404` for a site with no vendor hosting package. Requires `sites.view` and `sites.panel_access`.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
siteId (path) | Uuid | Ya | Site ID (UUIDv7). |
themeName (path) | string | Ya | The theme's slug, exactly as `listSiteWordPressThemes` reports it. WordPress's identifier, not ours — percent-encode it. |
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
active | boolean | Ya | Whether the theme should be the site's active theme. |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
data | SiteWordPressTheme[] | Ya | The installed themes. |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 409 · 422 · 429 · 503