API Keys
Not authenticated— sign in to auto-fill your API key in code examples
List keys
GET
/v1/api-keysResponse200
{
"ok": true,
"apiKeys": [
{
"id": "key_01HQXYZ",
"name": "Production ERP sync",
"prefix": "lzk_prod_abc1",
"createdAt": "2025-06-15T10:30:00Z",
"lastUsedAt": "2026-03-30T14:22:00Z"
},
{
"id": "key_01HQABC",
"name": "Staging tests",
"prefix": "lzk_stag_def2",
"createdAt": "2025-09-01T08:00:00Z",
"lastUsedAt": null
}
]
}Response401
{
"ok": false,
"error": "Authentication required",
"code": "UNAUTHORIZED",
"details": {}
}Create key
POST
/v1/api-keysRequest body
namestringrequiredA human-readable label for this key.
Response201
{
"ok": true,
"id": "key_01HQXYZ",
"name": "Production ERP sync",
"key": "lzk_prod_abc123def456ghi789jkl012mno345"
}Response400
{
"ok": false,
"error": "Invalid request parameters",
"code": "VALIDATION_ERROR",
"details": {
"field": "email",
"reason": "must be a valid email address"
}
}Response401
{
"ok": false,
"error": "Authentication required",
"code": "UNAUTHORIZED",
"details": {}
}Delete key
DELETE
/v1/api-keys/:id| Parameter | Required | Description |
|---|---|---|
idstring | required | API key ID. |
Response200
{
"ok": true
}Response401
{
"ok": false,
"error": "Authentication required",
"code": "UNAUTHORIZED",
"details": {}
}Response404
{
"ok": false,
"error": "Resource not found",
"code": "NOT_FOUND",
"details": {}
}Roll key
POST
/v1/api-keys/:id/roll| Parameter | Required | Description |
|---|---|---|
idstring | required | API key ID. |
Response200
{
"ok": true,
"id": "key_01HQXYZ",
"name": "Production ERP sync",
"key": "lzk_prod_xyz789abc012def345ghi678jkl901"
}Response401
{
"ok": false,
"error": "Authentication required",
"code": "UNAUTHORIZED",
"details": {}
}Response404
{
"ok": false,
"error": "Resource not found",
"code": "NOT_FOUND",
"details": {}
}