Skip to main content
Retrieve details about a specific permission including its name, description, and metadata.

Required Permissions

Your root key must have the following permission:
  • rbac.*.read_permission

Request

permission
string
required
The unique identifier of the permission to retrieve.Must be a valid permission ID that begins with ‘perm_’ and exists within your workspace.Pattern: ^[a-zA-Z][a-zA-Z0-9._-]*$Length: 3-255 charactersExample: perm_1234567890abcdef

Response

id
string
required
The unique identifier for this permission.
name
string
required
The permission name.
slug
string
URL-safe identifier for the permission.
description
string
Description of what this permission grants access to.
createdAt
integer
Unix timestamp in milliseconds when the permission was created.
updatedAt
integer
Unix timestamp in milliseconds when the permission was last updated.

Examples

curl -X POST https://api.unkey.com/v2/permissions.getPermission \
  -H "Authorization: Bearer <UNKEY_ROOT_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "permission": "perm_1234567890abcdef"
  }'

Response Example

{
  "meta": {
    "requestId": "req_1234abcd"
  },
  "data": {
    "id": "perm_1234567890abcdef",
    "name": "documents.read",
    "slug": "documents-read",
    "description": "Allows reading document resources",
    "createdAt": 1704067200000,
    "updatedAt": 1704067200000
  }
}

Build docs developers (and LLMs) love