v50

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-031984301.2 MB
Role and Permission

Create Role

Creates a custom role.

See List Permissions for available permission names.

post/roles

Query parameters

fieldsstring

A comma separated list of fields to include in the response. Every value in the list should either consist of a top-level property name (excluding the items envelope for endpoints returning lists) or refer to a property of a top-level property of type object, in the following form: "toplevelpropertyname.subpropertyname". When this query parameter is omitted, default resource representations are returned (excluding fields marked as optional). The same applies to nested objects when just specifying the top-level property name, without explicitly listing sub-property names. When specifying the fields query parameter, only the specified fields are returned. The id property is always returned.

Headers

Authorizationstring required

The bearer access token provided by Auth0.

X-LC-Tenantstring required

The identifier of the account where the request is executed.

Request body

namestring

Name of the role.

descriptionstring

Description of the role.

permissionsstring[]

List of permission names associated with role.

Example request

{
  "permissions": [
    "projectCreate"
  ]
}

Response

idstring required

The identifier of the role.

type'provisioned' | 'custom' required

The role type.

namestring required

Name of the role.

descriptionstring

Description of the role.

Example response

{
  "permissions": [
    {
      "name": "projectCreate",
      "category": "Projects",
      "entityType": {
        "name": "Projects"
      },
      "dependsOn": [
        "projectRead"
      ]
    }
  ]
}