Teams
Invite member
Invite a new member to a team by email.
POST /teams/{teamId}/members/invite
Invites someone to join the team by email. Responds with 201 Created. Requires the owner role.
Authentication: Bearer token · Role: owner · Permission:
teams:write · Rate limit: 15 / 5 minPath parameters
teamId
string · uuid v7 required
The ID of the team.
Request body
email
string required
The invitee's email address. Must be a valid email.
role
string
The role to grant on acceptance. One of
viewer, editor, owner. Defaults to viewer.{ "email": "[email protected]", "role": "viewer" }
Request
curl -X POST https://api.twominutereports.com/v1/teams/0190f8b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f/members/invite \
-H "Authorization: Bearer tmrc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "email": "[email protected]", "role": "viewer" }'
Response
{
"success": true,
"data": { "invited": true }
}
{
"success": false,
"error": { "code": "BAD_REQUEST", "message": "email: Invalid email" }
}
Returned when adding another member would exceed the plan's user limit.
{
"success": false,
"error": { "code": "FORBIDDEN", "message": "You've reached your plan's user limit of 8. Remove a member or upgrade your plan." }
}
Returned when a pending invite already exists for this email on the team.
{
"success": false,
"error": { "code": "CONFLICT", "message": "Invite already pending for this email" }
}
{
"success": false,
"error": { "code": "TOO_MANY_REQUESTS", "message": "Too many requests — please slow down and try again later" }
}
Pending invites can be reviewed with list invites.