API Keys
API keys allow programmatic access to the Livestorm Nexus API. Keys are scoped to a workspace and can be managed by owners and admins.
Authentication
Include your API key in the Authorization header:
Authorization: Bearer lnx_your_api_key_here
API keys are prefixed with lnx_. Only the first 8 characters (prefix) are visible after creation — the full key is shown only once at creation time.
List API Keys
GET /api/workspaces/:id/api-keys
Response:
{
"apiKeys": [
{
"id": 1,
"workspace_id": 2,
"name": "Production",
"key_prefix": "lnx_abc1",
"created_by": 1,
"created_by_name": "John Doe",
"is_active": 1,
"last_used_at": null,
"created_at": 1710000000
}
]
}
Create API Key
Owner or admin only.
POST /api/workspaces/:id/api-keys
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A descriptive name for the key |
Response:
{
"apiKey": {
"id": 1,
"name": "Production",
"key_prefix": "lnx_abc1",
"full_key": "lnx_abc123...full_key_here",
...
}
}
warning
The full_key is only returned on creation. Store it securely — it cannot be retrieved again.
Toggle API Key
Activate or deactivate an API key.
PATCH /api/workspaces/:id/api-keys/:keyId
Response:
{
"apiKey": { "id": 1, "is_active": 0, ... }
}
Delete API Key
DELETE /api/workspaces/:id/api-keys/:keyId
Response:
{ "ok": true }