メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
roles
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    management "github.com/auth0/go-auth0/management"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Roles.Create(
        context.TODO(),
        &management.CreateRoleRequestContent{
            Name: "name",
        },
    )
}
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>"
}

承認

Authorization
string
header
必須

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

ボディ

name
string
必須

Name of the role.

description
string

Description of the role.

レスポンス

Role successfully created.

id
string

ID for this role.

name
string

Name of this role.

description
string

Description of this role.