Add permissions to a key without affecting existing permissions.
Use this for privilege upgrades, enabling new features, or plan changes that grant additional capabilities. Permissions granted through roles remain unchanged.
Important: Changes take effect immediately with up to 30-second edge propagation.
Required Permissions
Your root key must have one of the following permissions:
api.*.update_key
(to update keys in any API)api.<api_id>.update_key
(to update keys in a specific API)Side Effects
Invalidates the key cache for immediate effect, and makes permissions available for verification within 30 seconds across all regions.
Unkey uses API keys (root keys) for authentication. These keys authorize access to management operations in the API. To authenticate, include your root key in the Authorization header of each request:
Authorization: Bearer unkey_123
Root keys have specific permissions attached to them, controlling what operations they can perform. Key permissions follow a hierarchical structure with patterns like resource.resource_id.action
(e.g., apis.*.create_key
, apis.*.read_api
).
Security best practices:
Permissions added successfully. Returns all permissions currently assigned to the key.
The response is of type object
.