Authorization
Descope Project ID and Management Key Project ID:Management Key as bearer token.
In: header
Request Body
application/json
Create a role, using a valid management key.
This API endpoint allows administrators to create a new role. The endpoint takes the following three parameters:
- name (required)
- description (optional)
- permissionNames (optional)
See also
- See User Authorization for further details on managing roles and permissions.
curl -X POST "https://api.descope.com/v1/mgmt/role/create" \ -H "Content-Type: application/json" \ -d '{}'{ "name": "string", "description": "string", "permissionNames": [ "string" ], "createdTime": 0, "tenantId": "string", "default": true, "private": true}export interface Response {name?: stringdescription?: stringpermissionNames?: string[]createdTime?: numbertenantId?: stringdefault?: booleanprivate?: boolean}Search Roles POST
### Search roles, using a valid management key. This API endpoint allows administrators to search against existing roles. This endpoint returns an array of roles including their name, description, and permissionsNames that match the search parameters. ### See also - See [User Authorization](/manage/roles/) for further details on managing roles and permissions.
Update Role POST
### Update an existing role, using a valid management key. This API endpoint allows administrators to update an existing role. The endpoint takes the following four parameters: - name (required) - newName (required) - description (optional - though if not provided, it will be removed from the role)) - permissionNames (optional - though if not provided, it will be removed from the role)) ### See also - See [User Authorization](/manage/roles/) for further details on managing roles and permissions.