List API keys
Retrieve a paginated list of API keys for dashboard and administrative interfaces.
Use this to build key management dashboards, filter keys by user with externalId, or retrieve key details for administrative purposes. Each key includes status, metadata, permissions, and usage limits.
Important: Set decrypt: true only in secure contexts to retrieve plaintext key values from recoverable keys.
Required Permissions
Your root key must have one of the following permissions for basic key listing:
api.*.read_key(to read keys from any API)api.<api_id>.read_key(to read keys from a specific API)
Additionally, you need read access to the API itself:
api.*.read_apiorapi.<api_id>.read_api
Additional permission required for decrypt functionality:
api.*.decrypt_keyorapi.<api_id>.decrypt_key
Authorizations
Unkey uses bearer tokens for authentication. Public integrations use root keys, while the dashboard proxy uses short-lived JWTs. To authenticate, include the token in the Authorization header of each request:
Root keys have specific permissions attached to them, controlling what operations they can perform. Legacy permissions use tuple strings like api.*.create_key; resource permissions use Unkey Resource Names plus actions, like unkey:v1:ws_123:keyspaces/*#create_key.
Security best practices:
- Keep root keys secure and never expose them in client-side code
- Use different root keys for different environments
- Rotate keys periodically, especially after team member departures
- Create keys with minimal necessary permissions following least privilege principle
- Monitor key usage with audit logs.
Body
When true, attempts to include the plaintext key value in the response. SECURITY WARNING:
- This requires special permissions on the calling root key
- Only works for keys created with 'recoverable: true'
- Exposes sensitive key material in the response
- Should only be used in secure administrative contexts
- Never enable this in user-facing applications
Response
Successfully retrieved paginated keys. Use the pagination cursor for additional results when hasMore: true.