rootKeys

Lists readable root keys in the authenticated workspace, ordered by key ID. Requires unkey:v1:<workspace_id>:rootKeys/<key_id>#read for each returned key. Use rootKeys/*#read to read all root keys. Write permission does not imply read. A caller with no readable keys receives an empty page.

Includes disabled and expired keys from the new root-key store. Deleted keys are excluded. Secrets and hashes are never returned. Pass the returned cursor when hasMore is true to retrieve the next page.

post/v2/rootKeys.listKeys

Request

  • Base URL
    https://api.unkey.com
  • URL
    https://api.unkey.com/v2/rootKeys.listKeys
  • Auth
    HTTP bearer

Request body

limitinteger

Maximum number of readable root keys per page.

cursorstring

Opaque cursor from a previous response. Omit for the first page.

Response

A page of readable root keys.

Example response

{
  "meta": {
    "requestId": "req_123"
  },
  "pagination": {
    "cursor": "eyJrZXkiOiJrZXlfMTIzNCIsInRzIjoxNjk5Mzc4ODAwfQ==",
    "hasMore": true
  }
}

Changes