v4

latestOpenAPI 3.1.1Apache 2.02026-07-31107278570.4 KB
Roles

List organization roles

Retrieves all environment roles and organization specific roles. Use this endpoint to view all role definitions, including custom roles and their configurations. You can optionally include permission details for each role to understand their capabilities. This is useful for role management, auditing organization access controls, or understanding the available access levels within the organization.

get/api/v1/organizations/{org_id}/roles

Path parameters

org_idstring required

Unique identifier of the organization

Query parameters

includestring

Include additional data in the response. Valid values: 'permissions' (direct permissions only), 'permissions:all' (includes inherited permissions)

Response

Successfully retrieved list of organization roles. Returns all roles with their metadata and optionally their permissions.

Example response

{
  "roles": [
    {
      "default_creator": true,
      "default_member": true,
      "dependent_roles_count": 3,
      "description": "Can create, edit, and publish content but cannot delete or manage users",
      "display_name": "Content Editor",
      "extends": "admin_role",
      "id": "role_1234abcd5678efgh",
      "is_org_role": true,
      "name": "content_editor",
      "permissions": [
        {
          "description": "Read Content",
          "name": "read:content",
          "role_name": "admin_role"
        },
        {
          "description": "Write Content",
          "name": "write:content",
          "role_name": "editor_role"
        }
      ]
    }
  ]
}