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
Authorization
Body
application/jsonThe API namespace whose keys you want to list.
Returns all keys in this API, subject to pagination and filters.
Length: min 1
Maximum number of keys to return per request.
Balance between response size and number of pagination calls needed.
Default: 100
Range: 1–100
Pagination cursor from previous response to fetch next page.
Use when hasMore: true in previous response.
Filter keys by external ID to find keys for a specific user or entity.
Must exactly match the externalId set during key creation.
Length: min 1
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
Default: false
EXPERIMENTAL: Skip the cache and fetch the keys directly from the database. This ensures you see the most recent state, including keys created moments ago. Use this when:
- You've just created a key and need to display it immediately
- You need absolute certainty about the current key state
- You're debugging cache consistency issues
This parameter comes with a performance cost and should be used sparingly.
Default: false
Responses
hasMore: true.requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Items: max 100
Show child attributesHide child attributes
Range: 0–9223372036854776000
Range: 0–9223372036854776000
Range: >= 0
Range: 0–9223372036854776000
Show child attributesHide child attributes
Range: 0–9223372036854776000
Show child attributesHide child attributes
Range: 1–9223372036854776000
Day of the month for monthly refills (1-31).
Only required when interval is 'monthly'.
For days beyond the month's length, refill occurs on the last day of the month.
Range: 1–31
Show child attributesHide child attributes
Show child attributesHide child attributes
Length: 8–255Pattern: ^rl_[a-zA-Z0-9_]+$
Items: max 50
Show child attributesHide child attributes
Length: 8–255Pattern: ^rl_[a-zA-Z0-9_]+$
Show child attributesHide child attributes
Opaque pagination token for retrieving the next page of results.
Include this exact value in the cursor field of subsequent requests.
Cursors are temporary and may expire after extended periods.
Length: 1–1024
Indicates whether additional results exist beyond this page.
When true, use the cursor to fetch the next page.
When false, you have reached the end of the result set.
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).Show child attributesHide child attributes
JSON path indicating exactly where in the request the error occurred. This helps pinpoint the problematic field or parameter. Examples include:
- 'body.name' (field in request body)
- 'body.items[3].tags' (nested array element)
- 'path.apiId' (path parameter)
- 'query.limit' (query parameter)
Use this location to identify exactly which part of your request needs correction.
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).