hosting
PUT /v1/sites/{siteId}/two-step
Switch two-step sign-in on or off for a WordPress site.
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
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
enabled | boolean | Yes | — |
admins_required | boolean | No | Every administrator must set it up before using wp-admin. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
available | boolean | Yes | — |
enabled | boolean | Yes | — |
admins_required | boolean | Yes | — |
status | string<off, pending, active, failed> | Yes | — |
step | string<queued, site, idle> | Yes | — |
busy | boolean | Yes | — |
stale | boolean | Yes | — |
error_code | string<, readonly, not_supported, no_answer, failed> | Yes | — |
enrolled_users | integer | Yes | — |
verified_at | string | Yes | — |
requested_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 409 · 422 · 429