hosting
PUT /v1/sites/{siteId}/wordpress/themes/{themeName}
Activate or deactivate a theme on a site.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea sites.view; o cheie care nu o are va fi respinsă cu 403, nu 404.
Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
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> }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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`.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
themeName (path) | string | Da | The theme's slug, exactly as `listSiteWordPressThemes` reports it. WordPress's identifier, not ours — percent-encode it. |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
active | boolean | Da | Whether the theme should be the site's active theme. |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
data | SiteWordPressTheme[] | Da | The installed themes. |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 409 · 422 · 429 · 503