hosting
GET /v1/sites/{siteId}/two-step
Get whether two-step sign-in is on for a WordPress site, and where a change is.
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 GET https://api.zinndigital.com/v1/sites/{siteId}/two-step \
-H "Authorization: Bearer zdk_live_…"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
BUILD-PANEL r197. After the password, the site's WordPress sign-in asks for a six-digit code from an authenticator app (RFC 6238), or a one-time recovery code. Each user sets it up on their own WordPress profile page; their secret and recovery codes stay on the site and never reach the platform. enabled is what was last asked for; status is what the site has (active once the site read back the same plugin and setting). admins_required makes every administrator set it up before using wp-admin. enrolled_users is how many of the site's users have set it up (read back from the site; null before the first read). busy while a change is running; step is where it is (queued, site, then idle). stale when a change has not finished 15 minutes after it was asked for. error_code is a code the console words (readonly, not_supported, no_answer, failed), never an English sentence. available is false for a site that cannot carry it (not WordPress, or not on one of our servers). 404 for a site that is not the caller's. Requires sites.view.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
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 · 429