hosting

PUT /v1/sites/{siteId}/two-step

Switch two-step sign-in on or off for a WordPress site.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/two-step \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": <boolean> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Answers 202: the request is saved and the change runs as a background job (it writes or removes the site's plugin). Poll the GET while busy. Switching off removes the plugin only: users keep their set-up, so switching it back on needs no one to set it up again. 409 while an earlier change is still running, or when the site cannot carry it. Audit-logged. Requires sites.view and sites.panel_access.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Request body

NameTypeRequiredWhat it is
enabledbooleanYes—
admins_requiredbooleanNoEvery administrator must set it up before using wp-admin.

Response

NameTypeRequiredWhat it is
availablebooleanYes—
enabledbooleanYes—
admins_requiredbooleanYes—
statusstring<off, pending, active, failed>Yes—
stepstring<queued, site, idle>Yes—
busybooleanYes—
stalebooleanYes—
error_codestring<, readonly, not_supported, no_answer, failed>Yes—
enrolled_usersintegerYes—
verified_atstringYes—
requested_atstringYes—

Errors this endpoint can return

401 · 403 · 404 · 409 · 422 · 429