TenantRole

This document uses the REST API. For more details, see the Authentication for API page.

Create a custom tenant role for a given tenant (Early Access)

post

Create a custom tenant role for a given tenant.

Required permissions

  • View Tenant Roles (tenant.roles.read)

  • Create Tenant Roles (tenant.roles.create)

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
tenant_idstring · uuidRequired

Unique identifier of the tenant.

Example: 00000000-0000-0000-0000-000000000000
Query parameters
versionstringRequired

Requested API version

Example: 2025-11-05Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Body
Responses
post
/tenants/{tenant_id}/roles

List all available roles for a given tenant (Early Access)

get

List all available roles for a given tenant.

Required permissions

  • View Tenant Roles (tenant.roles.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
tenant_idstring · uuidRequired

Unique identifier of the tenant.

Example: 00000000-0000-0000-0000-000000000000
Query parameters
versionstringRequired

Requested API version

Example: 2025-11-05Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
namestringOptional

Role name filter.

Example: examplename
custombooleanOptional

Whether role is custom or not.

Example: false
assignable_by_mebooleanOptional

When true, only return roles that the current user can assign to others in the tenant.

Example: false
expand_permissionsbooleanOptional

option to show all permission types

Default: false
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringOptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 10 · max: 100Optional

Number of results to return per page

Default: 10Example: 10
Responses
200

Returns an array of roles that are the roles on a Tenant.

application/vnd.api+json
get
/tenants/{tenant_id}/roles

Update a specific tenant role by its id and its tenant id. (Early Access)

patch

Update attributes of a custom tenant role in a given tenant

Required permissions

  • View Tenant Roles (tenant.roles.read)

  • Edit Tenant Roles (tenant.roles.edit)

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
tenant_idstring · uuidRequired

Unique identifier of the tenant.

Example: 00000000-0000-0000-0000-000000000000
role_idstring · uuidRequired

Unique identifier of the role.

Example: 00000000-0000-0000-0000-000000000000
Query parameters
versionstringRequired

Requested API version

Example: 2025-11-05Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
forcebooleanOptional

flag to force the update of a role, required if users are assigned to the role

Example: false
Body
Responses
200

Returns the updated role.

application/vnd.api+json
patch
/tenants/{tenant_id}/roles/{role_id}

Return a specific role by its id and its tenant id. (Early Access)

get

Return a role from a tenant by the tenant and role id with its details and permissions.

Required permissions

  • View Tenant Roles (tenant.roles.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
tenant_idstring · uuidRequired

Unique identifier of the tenant.

Example: 00000000-0000-0000-0000-000000000000
role_idstring · uuidRequired

Unique identifier of the role.

Example: 00000000-0000-0000-0000-000000000000
Query parameters
versionstringRequired

Requested API version

Example: 2025-11-05Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
has_users_assignedbooleanOptional

returns current memberships of the role in the meta relationships section

Default: false
Responses
200

Returns the requested role.

application/vnd.api+json
get
/tenants/{tenant_id}/roles/{role_id}

Delete a specific tenant role by its id and its tenant id. (Early Access)

delete

Delete a custom tenant role in a given tenant

Required permissions

  • View Tenant Roles (tenant.roles.read)

  • Delete Tenant Roles (tenant.roles.delete)

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
tenant_idstring · uuidRequired

Unique identifier of the tenant.

Example: 00000000-0000-0000-0000-000000000000
role_idstring · uuidRequired

Unique identifier of the role.

Example: 00000000-0000-0000-0000-000000000000
Query parameters
versionstringRequired

Requested API version

Example: 2025-11-05Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Responses
delete
/tenants/{tenant_id}/roles/{role_id}

No content

Last updated

Was this helpful?