Roles

Create roles

This route adds a new role for all tenants. To add a role for a specific tenant, send tenant ID in the frontegg-tenant-id header. Each role you add requires information about the role in the POST body. Note that you do not assign permissions to the role here. Use the attach permissions to role route to do that.

post/resources/roles/v1

Request

Headers

frontegg-tenant-idstring

For relating a role to a specific tenant, use get tenants API to find the tenant ids

Request body

keystring required
namestring required
descriptionstring
isDefaultboolean

This role will be assigned for every user that will be added without specified roles

migrateRoleboolean

Set this property to true together with isDefault in order to assign this role to all users

firstUserRoleboolean

This role will be assigned to the first user of a tenant (new tenants only)

levelnumber required

Role level for roles elevation, lower level means stronger role.

Response

idstring required
vendorIdstring required
tenantIdstring required
keystring required
namestring required
descriptionstring required
isDefaultboolean required
firstUserRoleboolean required
levelnumber required
createdAtstring date-time required
updatedAtstring date-time required
permissionsstring[] required

Changes

No recorded changes to this operation across all 1 revision of this API.