Skip to main content
POST
/
roles
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.roles.create({
        name: "name",
    });
}
main();
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

name
string
required

Name of the role.

description
string

Description of the role.

Response

Role successfully created.

id
string

ID for this role.

name
string

Name of this role.

description
string

Description of this role.