Roles

Create a role

Create a new role with the given data.

post/api/roles

Request

  • Base URL: https://[tenant_id].logto.app
  • URL: https://[tenant_id].logto.app/api/roles
  • Auth: OAuth 2 (client credentials, token URL /oidc/token, scopes: all)

Request body

tenantIdstring
namestring required

The name of the role. It should be unique within the tenant.

descriptionstring required
type'User' | 'MachineToMachine'

The type of the role. It cannot be changed after creation.

isDefaultboolean
scopeIdsstring[]

The initial API resource scopes assigned to the role.

Response

The created role.

tenantIdstring required
idstring required
namestring required
descriptionstring required
type'User' | 'MachineToMachine' required
isDefaultboolean required

Changes

No recorded changes to this operation across all 8 revisions of this API.