Team Invitations
Invite colleagues to join your team with granular role-based permissions.
Invitation System
The invitation system allows you to:
- Invite members via email
- Assign roles before joining
- Track invitation status
- Resend or revoke invitations
Team Roles
Owner
Full control over team management:
- Add/remove members
- Change team settings
- Delete team
- Manage billing
- Assign roles
Admin
Team and repository management:
- Add/remove members (except Owner)
- Connect/disconnect repositories
- View analytics
- Manage invitations
Member
Read and review access:
- View team information
- Access connected repositories
- Participate in reviews
- View analytics (read-only)
Sending Invitations
Via Dashboard
- Go to your team page
- Click “Invite Members”
- Enter email addresses (comma-separated)
- Select role for each invitee
- Add optional message
- Click “Send Invitations”
Via API
curl -X POST https://api.mesrai.com/v1/teams/{teamId}/invitations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "colleague@example.com",
"role": "ADMIN",
"message": "Join our team!"
}'Invitation Flow
For Inviter
- Send invitation with role
- Invitation email sent automatically
- Track status in dashboard
- Resend if needed
- Notification when accepted
For Invitee
- Receive invitation email
- Click “Accept Invitation” link
- Sign up or log in to Mesrai
- Automatically added to team
- Access team resources immediately
Managing Invitations
View Pending Invitations
See all outstanding invitations:
- Email address
- Role assigned
- Date sent
- Expiration date
- Status
Resend Invitations
For undelivered or expired invitations:
- Go to team invitations tab
- Find pending invitation
- Click “Resend”
- New email sent with fresh link
Revoke Invitations
Cancel invitations before acceptance:
- Locate invitation in list
- Click “Revoke”
- Confirm revocation
- Link becomes invalid immediately
Invitation Expiry
Invitations expire after:
- Standard: 7 days
- Extended: 30 days (Enterprise)
Expired invitations can be resent with new expiry.
Bulk Invitations
Invite multiple members at once:
CSV Import
-
Prepare CSV file:
email,role,message alice@example.com,ADMIN,Welcome! bob@example.com,MEMBER,Join us! -
Go to team page
-
Click “Bulk Invite”
-
Upload CSV file
-
Review and confirm
-
All invitations sent
Multiple Emails
Enter multiple email addresses:
alice@example.com, bob@example.com, charlie@example.comAll recipients receive same role initially (can be changed after acceptance).
Invitation Notifications
Email Notifications
Invitees receive emails containing:
- Team name and description
- Inviter’s name
- Assigned role
- Accept/Decline buttons
- Expiration date
Slack Integration
Notify team in Slack when:
- New invitation sent
- Invitation accepted
- Invitation declined
Configure in team settings.
Security
Email Verification
All invitations require:
- Valid email address
- Email verification
- Secure token-based links
Domain Restrictions
Enterprise teams can:
- Whitelist email domains
- Block public email providers
- Require SSO authentication
Example:
allowed_domains:
- company.com
- company.ioTroubleshooting
Invitation Not Received
Problem: Invitee didn’t receive email
Solutions:
- Check spam/junk folder
- Verify email address spelling
- Resend invitation
- Check email service status
Can’t Accept Invitation
Problem: Link shows error or expired
Solutions:
- Request new invitation
- Check if already team member
- Verify email address matches invitation
- Contact team owner
Wrong Role Assigned
Problem: Incorrect permissions after joining
Solutions:
- Team admin can update role
- Go to Team Members page
- Click member’s role dropdown
- Select correct role
Best Practices
1. Clear Communication
Include personalized messages:
Hi Alice! We'd love you to join our engineering team.
You'll have Admin access to our repositories.
Let me know if you have questions!2. Role Selection
Choose appropriate roles:
- Start with “Member” for new team members
- Promote to “Admin” as responsibilities grow
- Limit “Owner” role to 1-2 people
3. Regular Cleanup
Periodically review:
- Pending invitations (revoke stale ones)
- Expired invitations (resend if still relevant)
- Inactive members (remove if necessary)
4. Onboarding
After acceptance:
- Send welcome message
- Share team guidelines
- Connect relevant repositories
- Schedule intro meeting
API Reference
Create Invitation
POST /v1/teams/{teamId}/invitations
{
"email": "user@example.com",
"role": "MEMBER|ADMIN|OWNER",
"message": "Optional message"
}List Invitations
GET /v1/teams/{teamId}/invitations?status=PENDINGResend Invitation
POST /v1/teams/{teamId}/invitations/{invitationId}/resendRevoke Invitation
DELETE /v1/teams/{teamId}/invitations/{invitationId}