Passer au contenu principal
POST
https://{tenantDomain}/api/v2
/
roles
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Roles.CreateAsync(
            new CreateRoleRequestContent {
                Name = "name"
            }
        );
    }

}
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>"
}

Autorisations

Authorization
string
header
requis

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

Corps

name
string
requis

Name of the role.

description
string

Description of the role.

Réponse

Role successfully created.

id
string

ID for this role.

name
string

Name of this role.

description
string

Description of this role.