Invitations
Team invitations (Faz 5D). Admins invite an email to join the tenant; the invited person accepts a slug-bound link (creating a new global account or joining as an existing one). Tenant-scoped under RLS; acceptance is public.
List invitations (admin only)
Lists the tenant's invitations, newest first. Defaults to `pending`; pass `status=accepted|revoked` to filter, or any other value for all. ADMIN-ONLY.
Invite a member (admin only)
Invites an email to join the tenant as a role and emails an accept link. ADMIN-ONLY. 422 (field `email`) if the email is already an active member; a still-pending invite for the same email is refreshed, not duplicated.
Revoke a pending invitation (admin only)
Revokes a pending invitation. ADMIN-ONLY. Tenant-isolated (404 cross-tenant).
Re-send a pending invitation (admin only)
Refreshes a pending invitation's token + expiry and re-mails it. ADMIN-ONLY.
Set a pending invitation up on the invitee's behalf (admin only)
Turns a pending invitation into a live member without the invitee ever
Preview an invitation (public)
PUBLIC. Previews a pending invitation so the accept page knows whether to ask for a name + password (new account) or just confirm (existing account). The tenant is bound from the link's slug (X-Tenant-Slug / ?tenant); the token is read under RLS.
Accept an invitation (public)
PUBLIC, pre-auth. Accepts a pending invitation: resolves/creates the global account by email (existing → joins as a new membership, password ignored; new → name + password required) and creates the membership user in the tenant. The tenant is bound from the link's slug. On success the SPA proceeds to login.
Get the invitation email template (admin only)
The tenant's editable, multilingual team-invitation email template. Admin only.
Update the invitation email template (admin only)
Partial update of the localized invitation subject / body. Admin only.