OrganizationUnit Management API
Create and manage the organizational hierarchy. Organization units can be nested and are used to scope applications, users, groups, and policies.
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:8090/oauth2/token, authorization URL https://localhost:8090/oauth2/authorize
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
clientCredentials flow, token URL https://localhost:8090/oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
Organization Units
Create and manage organization units including member, group, and role assignments.
List root organization units
GET /organization-units
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: | |
filter | query | string | Filter organization units by attribute values.
Format:
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of root organization units | OrganizationUnitListResponse |
400 | Bad request | Error |
500 | Internal server error |
Create a new organization unit
POST /organization-units
Scopes: system
Request body (required): application/json
Schema: CreateOrganizationUnitRequest
16 properties
| Name | Type | Required | Description |
|---|---|---|---|
parent | string (uuid) | Yes | |
handle | string | Yes | The unique handle for the organization unit within its parent |
name | string | Yes | The display name of the organization unit |
description | string | Optional description of the organization unit | |
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Default Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Organization unit created | OrganizationUnit |
400 | Bad request | Error |
409 | Conflict: Organization unit already exists | Error |
500 | Internal server error |
Get an organization unit by id
GET /organization-units/{id}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Organization unit details | OrganizationUnit |
404 | Organization unit not found | Error |
500 | Internal server error |
Update an organization unit by id
PUT /organization-units/{id}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Request body (required): application/json
Schema: UpdateOrganizationUnitRequest
16 properties
| Name | Type | Required | Description |
|---|---|---|---|
parent | string (uuid) | Yes | |
handle | string | Yes | The unique handle for the organization unit within its parent |
name | string | Yes | The display name of the organization unit |
description | string | Optional description of the organization unit | |
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Default Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Organization unit updated | OrganizationUnit |
400 | Bad request | Error |
404 | Organization unit not found | Error |
409 | Conflict: Organization unit already exists | Error |
500 | Internal server error |
List child organization units
GET /organization-units/{id}/ous
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | |
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: | |
filter | query | string | Filter organization units by attribute values.
Format:
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of child organization units | OrganizationUnitListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
List users in organization unit
GET /organization-units/{id}/users
Lists the users the organization unit owns, followed by the users shared into it. Each
listed user's isOwnedByOU field says which of the two it is.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | |
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: | |
include | query | string | Specifies additional information to include in the response.
Supported values: Allowed values: |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of users in the organization unit | UserListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
List groups in organization unit
GET /organization-units/{id}/groups
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | |
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of groups in the organization unit | GroupListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
List roles in organization unit
GET /organization-units/{id}/roles
Lists the roles the organization unit owns, followed by the roles shared with it. Each
listed role's isOwnedByOU field says which of the two it is. A shared role is read-only
here.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | |
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of roles in the organization unit | RoleListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
organization-units-by-path
Create, retrieve, update, delete, and list organization units using their hierarchical handle path.
Get an organization unit by hierarchical handle path
GET /organization-units/tree/{path}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Hierarchical path of organization unit handles separated by forward slashes. Examples:
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | Organization unit details | OrganizationUnit |
404 | Organization unit not found | Error |
500 | Internal server error |
Update an organization unit by hierarchical handle path
PUT /organization-units/tree/{path}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Hierarchical path of organization unit handles separated by forward slashes. Examples:
|
Request body (required): application/json
Schema: UpdateOrganizationUnitByHandleRequest
15 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The display name of the organization unit |
handle | string | Yes | The unique handle for the organization unit within its parent |
description | string | Optional description of the organization unit | |
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Default Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Organization unit updated | OrganizationUnit |
400 | Bad request | Error |
404 | Organization unit not found | Error |
409 | Conflict: Organization unit already exists | Error |
500 | Internal server error |
Delete an organization unit by hierarchical handle path
DEL /organization-units/tree/{path}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Hierarchical path of organization unit handles separated by forward slashes. Examples:
|
Responses
| Code | Description | Schema |
|---|---|---|
204 | Organization unit deleted | |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
List child organization units by handle path
GET /organization-units/tree/{path}/ous
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Hierarchical path of organization unit handles separated by forward slashes. Examples:
|
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: | |
filter | query | string | Filter organization units by attribute values.
Format:
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of child organization units | OrganizationUnitListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
List users in organization unit by handle path
GET /organization-units/tree/{path}/users
Lists the users the organization unit owns, followed by the users shared into it. Each
listed user's isOwnedByOU field says which of the two it is.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Hierarchical path of organization unit handles separated by forward slashes. Examples:
|
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: | |
include | query | string | Specifies additional information to include in the response.
Supported values: Allowed values: |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of users in the organization unit | UserListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
List groups in organization unit by handle path
GET /organization-units/tree/{path}/groups
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Hierarchical path of organization unit handles separated by forward slashes. Examples:
|
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of groups in the organization unit | GroupListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
List roles in organization unit by handle path
GET /organization-units/tree/{path}/roles
Lists the roles the organization unit owns, followed by the roles shared with it. Each
listed role's isOwnedByOU field says which of the two it is.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Hierarchical path of organization unit handles separated by forward slashes. Examples:
|
limit | query | integer | Maximum number of records to return. Default: | |
offset | query | integer | Number of records to skip for pagination. Default: |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of roles in the organization unit | RoleListResponse |
400 | Bad request | Error |
404 | Organization unit not found | Error |
500 | Internal server error |
Schemas
OrganizationUnitBasic
Type: object
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | |
handle | string | Yes | |
name | string | Yes | |
description | string | ||
logoUrl | string (uri) | Logo URL for the organization unit | |
isReadOnly | boolean | Yes | Whether the organization unit is immutable by clients. |
createdAt | string (date-time) | Yes | Creation timestamp in UTC. |
updatedAt | string (date-time) | Yes | Last update timestamp in UTC. |
OrganizationUnit
Type: object
19 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | |
handle | string | Yes | |
name | string | Yes | |
description | string | ||
parent | string (uuid) | ||
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Default Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Default Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI | |
createdAt | string (date-time) | Yes | Creation timestamp in UTC. |
updatedAt | string (date-time) | Yes | Last update timestamp in UTC. |
User
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | |
type | string | Handle of the user type | |
display | string | Display name of the user, resolved from the schema-configured display attribute. Falls back to the user ID when no display attribute is configured or the value cannot be resolved. Only included when include=display is specified. | |
isOwnedByOU | boolean | Whether the organization unit owns the user rather than being shared it. |
Role
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | |
name | string | Yes | |
description | string | ||
isReadOnly | boolean | Whether the role is read-only here: declarative, or shared with the organization unit. | |
isOwnedByOU | boolean | Whether the organization unit owns the role rather than being shared it. |
CreateOrganizationUnitByHandleRequest
Type: object
15 properties
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | The unique handle for the organization unit within its parent |
name | string | Yes | The display name of the organization unit |
description | string | Optional description of the organization unit | |
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Default Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI |
UpdateOrganizationUnitByHandleRequest
Type: object
15 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The display name of the organization unit |
handle | string | Yes | The unique handle for the organization unit within its parent |
description | string | Optional description of the organization unit | |
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Default Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI |
CreateOrganizationUnitRequest
Type: CreateOrganizationUnitByHandleRequest
16 properties
| Name | Type | Required | Description |
|---|---|---|---|
parent | string (uuid) | Yes | |
handle | string | Yes | The unique handle for the organization unit within its parent |
name | string | Yes | The display name of the organization unit |
description | string | Optional description of the organization unit | |
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Default Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI |
UpdateOrganizationUnitRequest
Type: CreateOrganizationUnitRequest
16 properties
| Name | Type | Required | Description |
|---|---|---|---|
parent | string (uuid) | Yes | |
handle | string | Yes | The unique handle for the organization unit within its parent |
name | string | Yes | The display name of the organization unit |
description | string | Optional description of the organization unit | |
themeId | string (uuid) | Theme configuration ID for the organization unit | |
layoutId | string (uuid) | Layout configuration ID for the organization unit | |
authFlowId | string (uuid) | Default authentication flow ID for the organization unit | |
registrationFlowId | string (uuid) | Default Registration flow ID for the organization unit | |
isRegistrationFlowEnabled | boolean | Whether the registration flow is enabled for the organization unit | |
recoveryFlowId | string (uuid) | Default Recovery flow ID for the organization unit | |
isRecoveryFlowEnabled | boolean | Whether the recovery flow is enabled for the organization unit | |
signOutFlowId | string (uuid) | Sign-out flow ID for the organization unit | |
logoUrl | string (uri) | Logo URL for the organization unit | |
tosUri | string (uri) | Terms of Service URI | |
policyUri | string (uri) | Privacy Policy URI | |
cookiePolicyUri | string (uri) | Cookie Policy URI |
OrganizationUnitListResponse
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | Number of results that match the listing operation. | |
startIndex | integer | Index of the first element of the page, which will be equal to offset + 1. | |
count | integer | Number of elements in the returned page. | |
organizationUnits | array of OrganizationUnitBasic | ||
links | array of Link |
UserListResponse
Type: object
GroupListResponse
Type: object
RoleListResponse
Type: object
Error
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Error code. Codes follow the OU-XXXX convention. |
message | I18nMessage | Yes | Internationalized message with translation key and default value. |
description | I18nMessage | Internationalized message with translation key and default value. |
I18nMessage
Type: object
Internationalized message with translation key and default value.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Translation key for fetching localized message. |
defaultValue | string | Yes | Default message in English (fallback). |
Was this page helpful?