API Keys
API keys provide programmatic access to the LynxVizion API. Keys use the format lvz_live_<64 hex chars> and are authenticated by SHA-256 hash lookup.
GET /keys
Section titled “GET /keys”List all API keys for the authenticated user. The raw_key field is included for display but should be treated as sensitive.
Auth: Required
Response: ApiKeyResponse[]
[ { "id": "1", "name": "Production Key", "key_prefix": "lvz_live_abcdef...", "raw_key": "lvz_live_abcdef1234...", "is_active": 1, "last_used_at": "2025-01-15T10:30:00", "created_at": "2025-01-10T08:00:00" }]curl https://api.lynxvizion.com/api/keys \ -H "Authorization: $LVZ_KEY"POST /keys
Section titled “POST /keys”Create a new API key.
Auth: Required
| Body Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A descriptive name for the key |
Response: ApiKeyCreated (201 Created)
The raw_key is the full API key — save it immediately, it is stored as a hash and cannot be retrieved again.
{ "id": "2", "name": "CI/CD Pipeline", "key_prefix": "lvz_live_789abc...", "raw_key": "lvz_live_789abc1234567890...", "is_active": 1, "last_used_at": null, "created_at": "2025-01-15T11:00:00"}curl -X POST https://api.lynxvizion.com/api/keys \ -H "Authorization: $LVZ_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "CI/CD Pipeline"}'PATCH /keys/{key_id}
Section titled “PATCH /keys/{key_id}”Activate or deactivate an API key.
Auth: Required
| Path Param | Type | Required | Description |
|---|---|---|---|
key_id | string | Yes | API key ID |
| Body Field | Type | Required | Description |
|---|---|---|---|
is_active | boolean | Yes | true to activate, false to deactivate |
Response: Updated ApiKeyResponse
# Deactivate a keycurl -X PATCH https://api.lynxvizion.com/api/keys/2 \ -H "Authorization: $LVZ_KEY" \ -H "Content-Type: application/json" \ -d '{"is_active": false}'DELETE /keys/{key_id}
Section titled “DELETE /keys/{key_id}”Permanently delete an API key.
Auth: Required
| Path Param | Type | Required | Description |
|---|---|---|---|
key_id | string | Yes | API key ID |
Response:
{ "ok": true }curl -X DELETE https://api.lynxvizion.com/api/keys/2 \ -H "Authorization: $LVZ_KEY"