Retrieve details about a specific role including its assigned permissions. Use this to verify role configuration, check which permissions are currently assigned, or retrieve metadata for access review. Accepts either a role ID (starting withDocumentation Index
Fetch the complete documentation index at: https://unkey.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
role_) or a role name.
Required permissions:
rbac.*.read_role(to read roles in any workspace)
See the API reference for the full HTTP endpoint documentation.
Usage
Flags
Role ID (starting with
role_) or role name to retrieve. Must be 3-255 characters and contain only letters, numbers, dots, hyphens, underscores, colons, and asterisks. Returns complete role information including all assigned permissions.Global Flags
| Flag | Type | Description |
|---|---|---|
--root-key | string | Override root key ($UNKEY_ROOT_KEY) |
--api-url | string | Override API base URL (default: https://api.unkey.com) |
--config | string | Path to config file (default: ~/.unkey/config.toml) |
--output | string | Output format. Use json for raw JSON |
Examples
Output
Default output shows the request ID with latency, followed by the role details:--output=json, the full response envelope is returned:

