Team
Invite colleagues, accept invites, and manage roles and membership.
Key APIs
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/team/invite/:token | Public invite preview |
| POST | /v1/team/invite/:token/accept | Accept with password |
| POST | /v1/team/invite/:token/accept/google | Accept with Google |
| GET | /v1/team | List members (paginated) |
| POST | /v1/team/invite | Send invite (admin) |
| PATCH | /v1/team/:userId/role | Change role (admin) |
| POST | /v1/team/:userId/deactivate | Disable member (admin) |
| POST | /v1/team/:userId/reactivate | Re-enable member (admin) |
| POST | /v1/team/:userId/resend-invite | New invite token (admin) |
| POST | /v1/team/:userId/revoke-invite | Cancel pending invite (admin) |
Business Rules
- Invites expire after seven days; cannot invite an email that already exists in the system.
- Google accept must match the invited email; you cannot demote or deactivate the only active admin.
- Deactivate revokes Firebase sessions for that user.
Dependencies
- Firebase Admin (create user on accept, claims, revoke on deactivate)