Browse the docs

API keys

List, create and revoke the keys that authenticate to this API.

Keys are scoped to an organisation, optionally bound to one workspace, and carry read and/or write scopes. The raw key is returned once; only its hash is stored. How keys authenticate is in Authentication.

List keys

GET/user/api_keys

Active keys only. Only the prefix is shown.

Needs the api_keys.manage permission, or an API key with the matching scope.

Query parameters

org_idintegerrequired
Organisation id.
Request
curl "https://api.statusbee.co/user/api_keys?org_id=5" \
  -H "Authorization: Bearer sb_live_…"
Response
{
  "statusCode": 200,
  "error": false,
  "message": null,
  "data": {
    "rows": [
      {
        "id": 3,
        "org_id": 5,
        "workspace_id": null,
        "name": "CI deploys",
        "prefix": "sb_live_NXZB",
        "scopes": [
          "read",
          "write"
        ],
        "last_used_at": null,
        "revoked_at": null,
        "created_by": 12,
        "created_at": "2026-09-14T09:02:11.000Z"
      }
    ]
  }
}

Create a key

POST/user/api_keys

Counts against the plan's api_keys limit.

Needs the api_keys.manage permission, or an API key with the matching scope.

Body

org_idintegerrequired
namestringrequired
What will use it.
scopesarraydefault ["read"]
["read"], ["write"] or both.
workspace_idinteger
Bind the key to one workspace. Omit for organisation-wide.
Request
curl -X POST "https://api.statusbee.co/user/api_keys" \
  -H "Authorization: Bearer sb_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "org_id": 5,
  "name": "CI deploys",
  "scopes": [
    "read",
    "write"
  ]
}'
Response (key shown once)
{
  "statusCode": 200,
  "error": false,
  "message": null,
  "data": {
    "id": 3,
    "org_id": 5,
    "workspace_id": null,
    "name": "CI deploys",
    "prefix": "sb_live_NXZB",
    "scopes": [
      "read",
      "write"
    ],
    "last_used_at": null,
    "revoked_at": null,
    "created_by": 12,
    "created_at": "2026-09-14T09:02:11.000Z",
    "key": "sb_live_NXZB…"
  }
}

Revoke a key

DELETE/user/api_keys/:id

Immediate. The next request with the key answers 401.

Needs the api_keys.manage permission, or an API key with the matching scope.

Path parameters

idintegerrequired
Key id.
Request
curl -X DELETE "https://api.statusbee.co/user/api_keys/3" \
  -H "Authorization: Bearer sb_live_…"
Response
{
  "statusCode": 200,
  "error": false,
  "message": null,
  "data": {
    "revoked": 1
  }
}