Invitations
Invitations bring new users into a team. A team admin invites an existing user by username; the recipient accepts to join the workspace. All endpoints authenticate with a JWT access token.
Sending an Invitation
A team admin invites a user and assigns their role (team_role defaults to member):
POST /api/teams/{team_id}/invitations
{ "username": "grace", "team_role": "member" }{
"id": 5,
"team_id": 1,
"user_id": 9,
"invited_by": 7,
"status": "pending",
"team_role": "member",
"created_at": "2026-07-10T09:15:00Z"
}Errors: 400 "username is required", 404 "User not found", 409 "User is already a member of this team", 409 "An invitation is already pending for this user".
List a team's invitations with GET /api/teams/{team_id}/invitations to track who has yet to accept.
Accepting an Invitation
A user lists their own pending invitations, then accepts or rejects one:
GET /api/invitations # my pending invitations
POST /api/invitations/{invitation_id}/accept
POST /api/invitations/{invitation_id}/reject{ "message": "Invitation accepted", "team_id": 1, "team_role": "member" }Accepting moves the user into the team with the assigned role. Errors: 404 "Invitation not found or already processed".
Tip
Invite users at the role they need from the start. You can change a member's effective access later by removing and re-inviting, or through team administration.