Skip to main content
err:unkey:authorization:insufficient_permissions
Your root key is valid, but it doesn’t have a permission this endpoint needs. You get HTTP 403. On most endpoints, detail shows the permission that was missing, with resource IDs replaced by their prefix in braces, such as {api} or {ks}. Substitute the ID from your own request.
Example response

Likely causes

  • The root key was never given this permission.
  • The permission names the wrong resource ID, for example an API ID where the URN needs a keyspace ID.
  • The request asks for a broader scope than the key’s permission, such as listing deployments without environment filters.
  • Someone saved the key in Edit root key and left the permission unchecked. Saving replaces the whole set.
A missing permission doesn’t always return 403. When your root key can’t read the resource you named, the endpoint returns a 404 for it instead, so a 404 doesn’t prove the resource is gone. When the key can read the resource but lacks the action, you get this 403 and detail names the missing permission. Check the root key’s permissions before you decide the ID is wrong.

How to fix

  1. Identify the required resource and action. In unkey:v1:{workspace_id}:{resource_path}#{action}, the path selects the resource and the part after # selects the action.
  2. Check the workspace and resource IDs, including every parent in the path. Narrow the request’s filters if it asks for more resources than the task needs.
  3. Assign the missing permission through the dashboard or API. For example, unkey:v1:ws_demo:projects/proj_shop/keyspaces/ks_customers/keys/*#write permits creating and updating keys in one keyspace. Replace the example IDs with your own.
Give each service its own root key with only what it needs, so a leaked key can’t do more. See Root key permissions. keys.verifyKey distinguishes the root key’s access from your customer’s permissions. If the root key lacks verify access, the response has valid: false and code NOT_FOUND. If the customer’s key lacks a permission required by your verification query, the code is INSUFFICIENT_PERMISSIONS.
Last modified on October 27, 2026