Skip to main content
Your server can read and end the Verified Accounts on your platform with its secret API key. Three operations cover it: The paths and the SDK namespace keep the older name, secured-accounts and securedAccounts. They are the Verified Accounts operations. None of these operations returns who the person is: no name, email, device, BotShield ID, or your own reference back. Your reference goes in, a handle comes out.

Authentication and environment

Send your server API key as Authorization: Bearer <key>. Create it in the Console under Settings → Developer Tools → API Keys. The environment always comes from the key. It is never an input, so a development key can never read or unlink a production link. Site keys (pk_…), grant tokens (bss_…) and agent keys (bs_agent_…) are refused with api_key_required.
The API key is a secret. Call these operations from your server only. In the browser, the widget shows the live state with your public site key.

Status

GET /secured-accounts/status answers whether an account is linked right now. It is the same answer the widget’s live connection gives the page, so your server and the page always agree.
fresh and stale both mean the account is linked. Use stale only if you want to ask for a new passkey confirmation, for example with a gate. If BotShield cannot read the state, the call returns data.error with statusCode 503 and code: "presence_unavailable". It never guesses a state. Try again shortly.

List

GET /secured-accounts/list returns your registry for the key’s environment, newest first.
POST /secured-accounts/revoke ends one link. It does what Revoke does in the Console registry, from code. Send exactly one of platform_user_ref and handle.
When revoked is true, BotShield:
  • marks the link Unlinked · by you in the registry,
  • sends account.unlinked to your webhook endpoints with by: "platform" and the reason,
  • removes your company’s agents for that person, in the same environment,
  • moves any open widget for the account to none, which shows the chip again, and
  • tells the person in the BotShield app.
Revoke is safe to repeat. An account that is not linked, already unlinked, or linked only in the other environment returns success: true with revoked: false and changes nothing. No passkey step-up applies: the server key acts for your platform. The Console’s Revoke button asks for a Developer passkey in Production because a person is clicking it.

When to revoke

Errors

Errors arrive as data.error with HTTP 200, like every BotShield operation. Branch on statusCode and code. See Errors for the envelope and a typed helper.

Next steps

Account lifecycle

Every state, and what moves an account between them.

Staying in sync

Combine the live widget, webhooks and these calls.

API reference

The generated reference for every operation.

TypeScript SDK

client.securedAccounts.* and the rest of the client.