Create new role

post/api/usermanagement/v1/organizations/{orgId}/roles

Creates a new role within an organization with specified permissions and assignments.

Path Parameters

  • orgIdstringRequired

Request Body

name string required
The name of the role
Min length: >= 0 characters
Max length: <= 256 characters
Example: admin
enterprises object required
allEnterprises boolean required
enterprises array[string] required
enterpriseNames array[string]
resources array[object] required
Resource access configuration for a role
enterpriseId string required
The public ID of the enterprise
Example: 59cd72485007a239fb00282ed480da1f
resourceType string required
The type of resource
Example: wallet
scope string required
The scope of resource access
Allowed values: ALL LIMITED
resources array[string] required
List of external resource IDs
Example: ["63c86bf4555aba000652d5c59aff2866"]
permissions object required
Permission configuration for a role
allPermissions boolean required
Indicates if the role has access to all permissions
Example: false
permissions array[string] required
List of specific permissions for the role

201 Response

id string <uuid>required
organizationId string required
name string required
status string required
Allowed values: ACTIVE INACTIVE
enterprises object required
allEnterprises boolean required
enterprises array[string] required
enterpriseNames array[string]
permissions object required
allPermissions boolean required
permissions array[object] required
isDefaultRole boolean required
users array[object] required
id string <uuid>required
userId string
userName string required
status string required
Allowed values: ACTIVE INACTIVE
firstName string
lastName string
resources array[object] required
enterpriseId string required
resourceType string required
scope string required
Allowed values: ALL LIMITED
numResources integer <int32>required
numResourcesAvailable integer <int32>required
createdDate string <date-time>required
modifiedDate string <date-time>required
hidden boolean required
defaultRole boolean write-only

202 Response

400 Response

403 Response