A valid request URL is required to generate request examples{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "teacher",
"name": "Professor",
"is_system": true,
"permissions": [
"$team.manage",
"grades:write"
],
"current_version": 123,
"member_count": 123
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "owner_must_manage_the_team",
"message": "the owner role must keep $team.manage: without it no team in this environment would have anybody who can administer it"
}
}Update a customer role
Requires customers:write. The display name and the permission set; the key is absent from the request on purpose — see the create operation.
permissions is a REPLACEMENT of the whole set, which is the only shape that can remove one. Omit the field to leave the set untouched; send [] to strip it. Both halves of a system role are editable: an organization that wants “Administrador” on screen, or an owner that does not manage billing, is asking for something legitimate. The single exception is $team.manage on owner, which is refused with 409 owner_must_manage_the_team — the last-administrator guard runs when a membership moves, so stripping it here would leave every team in the environment with nobody who can administer it and no membership having changed.
A valid request URL is required to generate request examples{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "teacher",
"name": "Professor",
"is_system": true,
"permissions": [
"$team.manage",
"grades:write"
],
"current_version": 123,
"member_count": 123
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "owner_must_manage_the_team",
"message": "the owner role must keep $team.manage: without it no team in this environment would have anybody who can administer it"
}
}Autorizações
Cabeçalhos
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.
Parâmetros de consulta
Resposta
The role.
A role inside a customer, in one environment. permissions mixes the two vocabularies: $… entries are the capabilities UserKit evaluates, everything else is yours and reaches your backend through the contact's JWT.