Create a new role to group related permissions for easier management. Roles enable consistent permission assignment across multiple API keys.
Important: Role names must be unique within the workspace. Once created, roles are immediately available for assignment.
Required Permissions
Your root key must have the following permission:
rbac.*.create_roleUnkey 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_123Root 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:
The unique name for this role. Must be unique within your workspace and clearly indicate the role's purpose. Use descriptive names like 'admin', 'editor', or 'billing_manager'.
Examples: 'admin.billing', 'support.readonly', 'developer.api', 'manager.analytics'
1 - 512"support.readonly"
Provides comprehensive documentation of what this role encompasses and what access it grants. Include information about the intended use case, what permissions should be assigned, and any important considerations. This internal documentation helps team members understand role boundaries and security implications. Not visible to end users - designed for administration teams and access control audits.
Consider documenting:
2048"Provides read-only access for customer support representatives. Includes permissions to view user accounts, support tickets, and basic analytics. Does not include access to billing, admin functions, or data modification capabilities."
Role created successfully