API keys
Auth: Authorization: Bearer zpk_... required.
GET /v1/api-keys
List all keys for the account. Returns metadata only -- the raw secret is never shown after issuance.
Response 200
{
"data": [
{
"id": "key_uuid",
"customer_id": "cust_uuid",
"channel_id": null,
"name": "production-server",
"prefix": "zpk_live_abcd",
"scopes": [],
"last_used_at": "2026-05-29T10:00:00Z",
"expires_at": null,
"created_at": "2026-01-01T00:00:00Z",
"revoked_at": null
}
]
}POST /v1/api-keys
Issue a new API key. The secret field in the response is shown once only -- store it immediately.
Request body
{
"name": "production-server",
"scopes": [],
"expires_at": null
}| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | 1-120 chars. |
channel_id | string | no | Bind key to one channel for least-privilege. |
scopes | string[] | no | Future use; pass [] or omit. |
expires_at | ISO datetime | no | Key auto-revokes after this date. |
Response 201
{
"id": "key_uuid",
"customer_id": "cust_uuid",
"channel_id": null,
"name": "production-server",
"prefix": "zpk_live_abcd",
"scopes": [],
"last_used_at": null,
"expires_at": null,
"created_at": "2026-05-29T12:00:00Z",
"revoked_at": null,
"secret": "zpk_live_abcdefghijklmnopqrstuvwxyz0123456789ABCD"
}secret is only present in this response. It cannot be retrieved again.
DELETE /v1/api-keys/:id
Revoke a key. Takes effect immediately -- all requests using the revoked key return 401.
Path param
| Param | Type | Notes |
|---|---|---|
id | UUID | The key id from the list endpoint. |
Response 200
Returns the revoked key metadata with revoked_at set.
Errors
| Status | Meaning |
|---|---|
404 | Key not found or belongs to another account. |