Create Role: /role/ (POST)
Purpose:
Create a new role with permissions. The manage_roles permission is required.
Input:
- Headers:
- Content-Type: application/json
- Client-Secret: (Optional) A header to authenticate the request.
- Authorization: The JWT token of the user.
- JSON Body:
- name: (String) The name of the role.
- administrator: (Boolean) Whether the role is an administrator.
- manage_users: (Boolean) Whether the role can manage users.
- manage_channels: (Boolean) Whether the role can manage channels.
- manage_roles: (Boolean) Whether the role can manage roles.
Output (200):
{
"id": "9dfe7779-74db-47ec-babf-e84e436a6e69",
"name": "Administrator",
"administrator": true,
"manage_users": true,
"manage_channels": true,
"manage_roles": true
}