Roles API¶
Older endpoint notes
Rendered from ProjectInfo/api-docs/api/roles.md on docs/encryption-modes-spec. These notes predate the REST API reference, which is canonical wherever the two overlap. They are published because they still cover endpoints the reference does not yet document — check shapes against the reference and the spec errata.
All endpoints require Authorization: Bearer <token>.
The @everyone role has id == server_id. It is always present and cannot be deleted.
GET /api/servers/{serverID}/roles¶
List all roles (includes @everyone).
Response 200: Array of Role
POST /api/servers/{serverID}/roles¶
Create a role.
Auth: PermManageRoles
Request:
color is an RGB integer: 0xFF5733 for red-orange.
Response 201: Role
PATCH /api/servers/{serverID}/roles/{roleID}¶
Update a role.
Auth: PermManageRoles
Request (all optional): same fields as create
Response 200: Role
DELETE /api/servers/{serverID}/roles/{roleID}¶
Delete a role.
Auth: PermManageRoles
Response 204