Layerbeat

Create an API key

POST
/v1/api-keys

Creates an API key with the scopes you choose. Save the secret; it is shown only once.

Access: User session: workspace admin or owner. API keys aren't supported.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token>. A token is an API key (lb_live_…, scoped, for programs) or a session (lb_sess_…, from signup or login, for people). See Authentication above.

Header Parameters

X-Org-ID?string

Sessions only: act on this organization (you must be a member). Default: your first organization.

Request Body

application/json
  1. body
name*string
Lengthlength <= 64
scopes*array<>

What the key may do.

Items1 <= items
expires_at?|

Optional expiry.

Formatdate-time

Response Body

Key created

application/json
  1. response
id*string
name*string
scopes*array<>
created_at*string
Formatdate-time
last_used_at*|
Formatdate-time
expires_at*|
Formatdate-time
revoked*boolean
key*string

The key. Shown once; store it now.

note*string
curl -X POST 'https://layerbeat.com/v1/api-keys' \  -H 'Content-Type: application/json' \  -d '{  "name": "ci",  "scopes": [    "vm:read",    "vm:write"  ]}'
{  "id": "key_rs6goiwfde7kq3mzt5xv2nuhpa",  "name": "ci",  "scopes": [    "vm:read",    "vm:write"  ],  "created_at": "2026-10-01T10:00:00Z",  "last_used_at": null,  "expires_at": null,  "revoked": false,  "key": "lb_live_5ydt2mw7q4k6bz3nhf8xvcjrpa.dGhpc2lzbm90YXJlYWxrZXk",  "note": "Store this key now. It is shown only once."}