Teams
Remove member
Remove a member from a team.
DELETE /teams/{teamId}/members/{userId}
Removes a member from the team. Requires the owner role.
Authentication: Bearer token · Role: owner · Permission:
teams:delete · Rate limit: default (120 / 60s)You cannot remove yourself, and you cannot remove the last remaining
owner. Both fail with 400 BAD_REQUEST.Path parameters
teamId
string · uuid v7 required
The ID of the team.
userId
string · uuid v7 required
The ID of the member to remove, from list members.
Request
curl -X DELETE https://api.twominutereports.com/v1/teams/0190f8b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f/members/0190f8a4-5e6f-7a8b-9c0d-1e2f3a4b5c6d \
-H "Authorization: Bearer tmrc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response
{
"success": true,
"data": { "removed": true }
}
{
"success": false,
"error": { "code": "BAD_REQUEST", "message": "Cannot remove the last owner. Assign another owner first." }
}
{
"success": false,
"error": { "code": "PAYMENT_REQUIRED", "message": "Your team's plan has been cancelled. Please reactivate your subscription to continue." }
}
{
"success": false,
"error": { "code": "FORBIDDEN", "message": "You do not have permission to perform this action" }
}
Returned when the team does not exist, or the user is not a member of it.
{
"success": false,
"error": { "code": "NOT_FOUND", "message": "Member not found in team" }
}