Create a role

Creates a custom role. Requires Role Manager (rbac) and role:write or usermanagement.write. Each .write feature permission must include the matching .read.

Request

POST /role

Headers

HeaderValue
AuthorizationBearer <token> (or HMAC headers, see Authentication)
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
namestringYes{customer}.{Name} (spaces in the name part are stripped). Must not start with Makaira. or contain -- / __.
descriptionstringNoDescription.
permissionsarrayNoFeature permission identifiers (dot notation).

Example Request

{
  "name": "stage.Editor",
  "description": "Can edit pages",
  "permissions": ["pageeditor.read", "pageeditor.write"]
}

Response

{
  "role": {
    "id": "rol_newrole123",
    "name": "stage.Editor",
    "description": "Can edit pages"
  },
  "updated": true
}
Response
200

Successful response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!