Update Role: /role/ (PATCH)

Purpose:

Update a 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:
    • id: (Uuid) The id of the role.
    • 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": "c8132499-8e78-47fd-ada4-c4e259d5fc01",
  "name": "Administrator",
  "administrator": true,
  "manage_users": true,
  "manage_channels": true,
  "manage_roles": true
}