Skip to content

Team & roles

A tenant can have many members, each with a role that grants a set of scopes. Membership lives in a junction (a user can belong to multiple tenants), so roles are per-tenant.

Ventana de terminal
GET /v1/tenants/me/members
PATCH /v1/tenants/me/members/:userId # change role
DELETE /v1/tenants/me/members/:userId # remove

You invite by email — invitations never create pre-activated accounts:

Ventana de terminal
POST /v1/tenants/me/members/invitations
GET /v1/tenants/me/members/invitations
DELETE /v1/tenants/me/members/invitations/:invitationId

The invitation email carries a link and a six-digit code to type by hand; both expire after 7 days. The invitee accepts with either one (POST /v1/auth/accept-invitation takes the email and the code) and joins with the assigned role. Seat limits come from the plan — inviting over the cap returns MEMBER_LIMIT_REACHED.

Six built-in roles map to scope sets (owner, admin, issuer, accountant, …). You can define custom roles with a tailored scope set:

Ventana de terminal
GET /v1/tenants/me/roles
POST /v1/tenants/me/roles
PATCH /v1/tenants/me/roles/:slug
DELETE /v1/tenants/me/roles/:slug

Scopes gate individual actions (invoices:write, documents:accept, audit:read, webhooks:manage, …) and are the same axis as API-key scopes — though some scopes are JWT-only and can’t be granted to a key. Scopes are checked independently of plan entitlements; a gated write must pass both.

Exactly one member is the owner. Transfer is a two-step, confirmed handoff:

Ventana de terminal
POST /v1/tenants/me/members/transfer-ownership/request
POST /v1/tenants/me/members/transfer-ownership/confirm
DELETE /v1/tenants/me/members/transfer-ownership/pending

Every membership and role change is recorded in the audit log.