List API keys
GET /v1/api-keys · permission api-keys:read
Lists the management API keys of the environment, newest first (order=asc reverses); revoked and expired keys are included. The raw key is never returned, only metadata.
Request
| Parameter | In | Description |
|---|---|---|
limit |
query | Page size, 1–100. |
after |
query | Cursor for the next page (list_metadata.after). |
before |
query | Cursor for the previous page (list_metadata.before). |
order |
query | desc (default, newest first) or asc. |
Response
200 OK. last_used_ip is truncated to a /24 (IPv4) or /48 (IPv6) prefix.
{
"data": [
{
"id": "key_0000000000000000000000001z",
"name": "ci",
"type": "restricted",
"permissions": ["users:read"],
"allowed_cidrs": [],
"last4": "xxxx",
"created_by": "key_…",
"created_at": "2026-10-01T10:00:00Z",
"expires_at": "2027-10-01T10:00:00Z",
"last_used_at": null,
"last_used_ip": null,
"rotated_from": null,
"revoked_at": null,
"revoke_reason": null
}
],
"list_metadata": { "before": null, "after": null }
}
Errors
| HTTP | code |
When |
|---|---|---|
| 400 | invalid_cursor |
The cursor is invalid. |
| 401 | unauthenticated |
The key is missing, invalid or revoked. |
| 403 | insufficient_permissions |
The key lacks the required permission. |
| 422 | validation_failed |
A query parameter is invalid (for example limit outside 1–100). |
Example
curl "https://api.eu.keenauth.com/v1/api-keys?limit=20" \
-H "Authorization: Bearer $KEENAUTH_SECRET_KEY"