Skip to content

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.


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"
}
]
Terminal window
curl https://api.lynxvizion.com/api/keys \
-H "Authorization: $LVZ_KEY"

Create a new API key.

Auth: Required

Body FieldTypeRequiredDescription
namestringYesA 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"
}
Terminal window
curl -X POST https://api.lynxvizion.com/api/keys \
-H "Authorization: $LVZ_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "CI/CD Pipeline"}'

Activate or deactivate an API key.

Auth: Required

Path ParamTypeRequiredDescription
key_idstringYesAPI key ID
Body FieldTypeRequiredDescription
is_activebooleanYestrue to activate, false to deactivate

Response: Updated ApiKeyResponse

Terminal window
# Deactivate a key
curl -X PATCH https://api.lynxvizion.com/api/keys/2 \
-H "Authorization: $LVZ_KEY" \
-H "Content-Type: application/json" \
-d '{"is_active": false}'

Permanently delete an API key.

Auth: Required

Path ParamTypeRequiredDescription
key_idstringYesAPI key ID

Response:

{ "ok": true }
Terminal window
curl -X DELETE https://api.lynxvizion.com/api/keys/2 \
-H "Authorization: $LVZ_KEY"