User
Get available roles
Roles the caller may grant on POST /api/v2/users and PATCH /api/v2/users/{id}: every role ranked strictly below the caller (auth_item.priority) — system roles plus custom roles of the current workspace; never robot, guest or 2fa. Callers: holders of UserIndex, UserCreate or UserUpdate. Descriptor { name, displayName, priority, isSystem }, sorted by priority DESC.
Authorization
BearerAuthObject AuthorizationBearer <token>
Machine tokens only: a personal API token or a product robot token (POST /api/v2/products/{uid}/robot-tokens). A session JWT here is 401 — the web app uses the b2t_access cookie.
In: header
Response Body
application/json
curl -X GET "https://example.com/api/v2/users/available-roles"{ "data": [ { "name": "Administrator", "displayName": "Administrator", "priority": 600, "isSystem": true } ]}Empty
Empty