hosting

PUT /v1/sites/{siteId}/wordpress/themes/{themeName}

Activate or deactivate a theme on a site.

Todos os endpoints de hosting

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão sites.view; uma chave sem ela é recusada com 403, e não 404.

Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

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> }'

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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`.

Parâmetros

NomeTipoObrigatórioO que é
siteId (path)UuidSimSite ID (UUIDv7).
themeName (path)stringSimThe theme's slug, exactly as `listSiteWordPressThemes` reports it. WordPress's identifier, not ours — percent-encode it.

Corpo da requisição

NomeTipoObrigatórioO que é
activebooleanSimWhether the theme should be the site's active theme.

Resposta

NomeTipoObrigatórioO que é
dataSiteWordPressTheme[]SimThe installed themes.

Erros que este endpoint pode retornar

401 · 403 · 404 · 409 · 422 · 429 · 503