The catalogue
permission
Rename the organization, change its logo, close onboarding, set an environment’s
auth mode.
permission
Destroy the organization and everything under it.
permission
List members and pending invitations.
permission
Invite, revoke invitations, change roles, remove members.
permission
List roles and read the permission catalogue.
permission
Create, edit and delete roles. This one can grant any permission, including
itself — whoever holds it can self-escalate, which is why
admin does not get
it by default.permission
List API keys and publishable keys.
permission
Create and revoke API keys, set allowed origins, read and rotate an
environment’s identity secret.
permission
Read contacts in the panel.
permission
Merge contacts. Split from read because a merge is destructive in the
“no un-merge” sense.
The system roles
Seeded into every organization at creation. They are markedis_system.
admin runs the operation but cannot delete the organization nor manage roles.
member is read-only.
Role names are stored in English —
owner, admin, member — because the API
matches those literals: the last-owner guard and the seeding both compare on them.
Translate for display only.Custom roles
Custom roles are neveris_system, so they stay renamable and deletable.
roles:manage.
An unknown permission is refused with 400 unknown_permission rather than
silently dropped. Stored as-is it would sit in the database looking like access
nobody ever grants.
Editing system roles
A system role’s permissions can be edited — that is how an organization tailorsadmin to itself. Its name cannot: 403 system_role.
One rule is absolute: the owner role must keep roles:manage. Removing it
answers 403 owner_locked. Without it an owner could edit themselves out of role
management and leave the organization with nobody able to grant it back.
Deleting
A role that still has members is refused with409 role_in_use rather than
cascaded — those people would silently lose every permission. Move them first.
System roles cannot be deleted at all.
How enforcement works
Permissions load with the session, at no extra round-trip, and every gated route checks them before the handler runs:403