POST
/
roles
curl --request POST \
  --url https://api.identety.dev/roles \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "Content Editor",
  "description": "Can manage and publish content",
  "is_system": false
}'
{
  "id": "uuid-123",
  "name": "admin_role",
  "description": "Administrator role with full access",
  "is_system": false,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
required

Role name will be converted to snake_case automatically

description
string
is_system
boolean

Whether this is a system role. Cannot be set to true manually.

Response

201
application/json
Role created successfully.
id
string
required
name
string
required
description
string
required
is_system
boolean
required
created_at
string
required
updated_at
string
required