This error occurs when you’re trying to perform an operation on a permission that doesn’t exist in the Unkey system. Permissions in Unkey are used to control access to resources and operations.Common scenarios that trigger this error:
Using an incorrect permission ID or name
Referencing a permission that has been deleted
Trying to assign a permission that doesn’t exist in the current workspace
Typos in permission names when using name-based lookups
Here’s an example of a request that would trigger this error:
Copy
Ask AI
# Attempting to assign a non-existent permission to a rolecurl -X POST https://api.unkey.com/v1/roles.addPermission \ -H "Content-Type: application/json" \ -H "Authorization: Bearer unkey_YOUR_API_KEY" \ -d '{ "roleId": "role_123abc", "permissionId": "perm_nonexistent" }'