Skip to content
Get started

Create

POST/roles

Creates a new role

Body ParametersJSONExpand Collapse
role: string

Name of the role

ReturnsExpand Collapse
data: object { id, role }

Role object

id: string

Unique role ID

role: string

Name of the role

Create

curl https://api.us-west-2.fragment.dev/roles \
    -H 'Content-Type: application/json' \
    -d '{
          "role": "admin"
        }'
{
  "data": {
    "id": "role_abc123",
    "role": "admin"
  }
}
Returns Examples
{
  "data": {
    "id": "role_abc123",
    "role": "admin"
  }
}