Skip to content
Docs
Ask the assistant
Sign inCreate a free account
Get startedMark and signCertificatesDocumentsCheck and recoverComply and proveAPI referencePricing and data

The API

  • Introduction
  • Errors

Events

  • Webhooks
  • Events
  • Realtime

Tools

  • CLI
  • SDKs
  • Agent prompts
  • API logs

Workspace

  • Workspace overview
  • Workspace
  • Members
  • API keys
  • Settings
  • Billing and plan
  • Search
  • Assistant

Your account

  • Your account
  • Notifications
  • Inbox

For agents

  • agent-setup.md
  • llms.txt
  • llms-full.txt
  1. Home
  2. Docs
  3. API keys

API referenceWorkspace

API keys

Create, roll and revoke the keys your servers and agents use: secret, restricted, provisioning, test and publishable. A secret is shown once and stored as a hash.

Updated December 3, 2026

Ask about this pageRead this page as Markdown
On this page 7 sections
  1. Check a key
  2. List API keys
  3. Create an API key
  4. Roll an API key
  5. Change an API key
  6. Revoke an API key
  7. Read how the keys are used

Every key belongs to one workspace and one mode. A restricted key holds only the scopes it needs, read or write per resource, with an expiry and a daily spend cap. See Keys and test mode.

Check a key

GET/v1/key_check

Which workspace a key belongs to, its mode, its kind, its scopes and when it expires. It changes and bills nothing, so an agent can check its key before it starts.

Who may
Any key
CLI
widar auth status
MCP tool
check_key
Returns
The key’s workspace, mode, kind, scopes and expiry.

No parameters.

curl -X GET https://api.widar.com/v1/key_check \
  -H "Authorization: Bearer $WIDAR_API_KEY"
Response, 200 OK
{
  "object": "key_check",
  "workspace": { "id": "ws_Lm3Qx8Rk2VnT", "name": "Lumen Labs" },
  "mode": "test",
  "kind": "secret",
  "scopes": [],
  "expires_at": null
}

List API keys

Reads only

GET/v1/keys

The workspace’s keys, live and test, each shown by its start and last four characters.

Who may
Owner, Admin and Developer
CLI
widar keys list
MCP tool
list_api_keys
Returns
The keys, never their secrets.

No parameters.

curl -X GET https://api.widar.com/v1/keys \
  -H "Authorization: Bearer $WIDAR_API_KEY"

GET /v1/keys

Create an API key

Changes data

POST/v1/keys

A key for a server (secret or restricted) or for a page or an app (publishable), live or test.

Who may
Owner, Admin and Developer
CLI
widar keys create --name <name> [--kind <secret|restricted|publishable>] [--mode <live|test>] [--scopes <scope,...>] [--origins <url,...>] [--allow-native]
MCP tool
create_api_key
Returns
The key, and its secret shown once.

Parameters

  • namestringRequired

    The name. At most 80 characters.

  • kindenumDefault "secret"

    The kind. One of secret, restricted, publishable.

  • modeenum

    live or test; the call’s own mode when left out One of live, test.

  • scopesarray of stringDefault []

    a restricted key’s, each resource:read or resource:write; write includes read At most 30 items.

  • originsarray of URLDefault []

    The origins. At most 20 items.

  • allow_nativeboolean

    a publishable key’s: it also starts a verification from a native app, which sends no origin; with it, origins may be empty

curl -X POST https://api.widar.com/v1/keys \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<name>"
  }'

POST /v1/keys

Roll an API key

Changes data

POST/v1/keys/{key_id}/roll

Replace a key’s secret; the old one keeps working for the hours you give, up to 30 days, then stops.

Who may
Owner, Admin and Developer
CLI
widar keys roll <key_id> [--expire-old-in-hours <0-720>]
MCP tool
roll_api_key
Returns
The key with its new secret, shown once.

Parameters

  • key_idid (key_)Required

    The key’s id. In the path.

  • expire_old_in_hoursintegerDefault 0

    The expire old in hours. At most 720.

curl -X POST https://api.widar.com/v1/keys/key_7Kq2Xw9/roll \
  -H "Authorization: Bearer $WIDAR_API_KEY"

POST /v1/keys/{key_id}/roll

Change an API key

Changes data

PATCH/v1/keys/{key_id}

Rename a key, change the scopes of a restricted key, the origins of a publishable key and whether a native app may start with it, or the most a secret or restricted key may spend in a UTC day. Its secret stays the same.

Who may
Owner, Admin and Developer
CLI
widar keys update <key_id> [--name <name>] [--scopes <scope,...>] [--origins <url,...>] [--allow-native <true|false>] [--daily-spend-cap <usd|none>]
MCP tool
update_api_key
Returns
The key as it now stands, never its secret.

Parameters

  • key_idid (key_)Required

    The key’s id. In the path.

  • namestring

    The name. At most 80 characters.

  • scopesarray of string

    The scopes. At most 30 items.

  • originsarray of string

    The origins. At most 20 items.

  • allow_nativeboolean

    The allow native.

  • daily_spend_capobject

    The most the key may spend in a UTC day, in USD from 0.01 to 1000 in whole cents; null removes the cap null clears it.

curl -X PATCH https://api.widar.com/v1/keys/key_7Kq2Xw9 \
  -H "Authorization: Bearer $WIDAR_API_KEY"

PATCH /v1/keys/{key_id}

Revoke an API key

Changes data

DELETE/v1/keys/{key_id}

Stop a key at once: every call made with it is refused from now on. It cannot be undone; make a new key instead.

Who may
Owner, Admin and Developer
CLI
widar keys revoke <key_id>
MCP tool
revoke_api_key
Returns
The key’s id, object key and deleted true: it stopped at once.

Parameters

  • key_idid (key_)Required

    The key’s id. In the path.

curl -X DELETE https://api.widar.com/v1/keys/key_7Kq2Xw9 \
  -H "Authorization: Bearer $WIDAR_API_KEY"

DELETE /v1/keys/{key_id}

Read how the keys are used

Reads only

GET/v1/key_usage

For each key: its requests in the last 24 hours and the last 7 days, its errors, when it was last used, and until when an old secret still works after a roll.

Who may
Owner, Admin and Developer
CLI
widar keys usage [--key-id <key_id>]
MCP tool
get_api_key_usage
Returns
One row per key, never a secret.

Parameters

  • key_idid (key_)

    The key’s id.

curl -X GET https://api.widar.com/v1/key_usage \
  -H "Authorization: Bearer $WIDAR_API_KEY"

GET /v1/key_usage

PreviousMembersNextSettings

For agents

  • Read this page as Markdown

Start without a browser: POST https://api.widar.com/v1/signups, then the emailed code; or sign in with the CLI, which comes with a widar workspace: widar auth login. The key is read from WIDAR_API_KEY.

  • Agent setup
  • MCP serverhttps://widar.com/mcp
  • Docs MCP serverhttps://widar.com/mcp
  • OpenAPI
  • llms.txt

The examples in these docs use invented companies, such as Lumen Labs B.V., and invented values: none is a real check, mark, signature or certificate.

A product of Bynn Intelligence, Inc.

  • llms.txt
  • agent-setup.md
  • Pricing

On this page

  1. Check a key
  2. List API keys
  3. Create an API key
  4. Roll an API key
  5. Change an API key
  6. Revoke an API key
  7. Read how the keys are used