List the org's roles
Returns every role in the active organization, including the seeded admin and member built-ins (flagged with is_builtin=true). Each entry includes the resolved permission list and the count of users assigned to the role.
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List the org's roles › Responses
OK
Create a custom role
Creates a custom role with the supplied permissions. Built-in names ("admin", "member") are reserved. Each permission must be in the catalog (see GET /v1/permissions) and assignable (not system-only).
Headers
Idempotency-KeyUnique key that makes this POST safe to retry: repeats with the same key replay the first response instead of re-executing. Replays are scoped to the retrying principal (same API key / user) and kept for 24 hours. Required on every POST.
Client-generated idempotency key (e.g. a UUID).
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Create a custom role › Responses
Created
Fetch one role
Returns one role's permission list and assignment count. 404 when the role belongs to a different organization (cross-tenant guard).
path Parameters
idKeycloak group UUID
Keycloak group UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Fetch one role › Responses
OK
Delete a custom role
Removes the role. Refuses if the role still has members assigned (409 ROLE_HAS_MEMBERS - reassign first) or if it's a built-in (409 ROLE_BUILTIN_IMMUTABLE).
path Parameters
idKeycloak group UUID
Keycloak group UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Delete a custom role › Responses
No Content
Update a custom role
Replaces the role's permission list with the supplied one. The change reflects in each member's next refresh-token call. Built-ins cannot be modified (409 ROLE_BUILTIN_IMMUTABLE).
path Parameters
idKeycloak group UUID
Keycloak group UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Update a custom role › Responses
OK