permissions
Update permission
Changed onUpdate the name, slug, or description of a permission, identified by its ID or slug.
Omitted fields keep their current values. A request with no fields to update returns the stored permission without a write.
Important: Keys and roles reference the permission by ID, so they keep the permission after a slug change. Key verification can return the old slug for a short time while caches refresh. A slug that another permission in your workspace already uses returns 409.
Required Permissions
Your root key must have the following permission:
- unkey:v1:<workspace_id>:projects/<project_id>/rbac/permissions/<permission_id>#write
post/v2/permissions.updatePermission
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/permissions.updatePermission
- AuthHTTP bearer
Request body
Example request
{
"permission": "perm_1234567890abcdef",
"name": "Read documents",
"slug": "documents.read",
"description": "Allows reading document resources"
}Response
Permission updated successfully
Example response
{
"meta": {
"requestId": "req_123"
},
"data": {
"id": "perm_1234567890abcdef",
"name": "users.read",
"slug": "users-read",
"description": "Allows reading user profile information and account details"
}
}Changes
- info
endpoint added
- info