Remove member
DELETE /teams/{teamId}/members/{userId}
Removes a member from the team.
The key holder's role must include Remove members (Owner, Admin and Deputy Admin include it), and the key holder must have a seat in the team.
teams:delete · Team permission:members.remove · Rate limit: default (120 / 60s)owner. Both fail with 400 BAD_REQUEST.Beyond the key's own scope, the person who created the key must hold members.remove on the team, and the same containment rules apply as in the Hub: you cannot remove somebody whose role is not smaller than yours, and the team owner cannot be removed by anyone. One Admin cannot remove another, because Admin and Owner hold the same permissions and neither is below the other. A key created by the account owner is the exception: it can remove anybody.
What happens to their work
Removing a member removes their access, not their work. Dashboards, clients, goals, connections, Google Sheets queries and Google Data Studio query configs all stay with the team, and their scheduled refreshes keep running.
If you only want to free their seat, unassign the seat instead of removing them. They keep read access, and nothing they built is affected. See Manage members.
Path parameters
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": "INSUFFICIENT_ROLE", "message": "[email protected] is not allowed to use members.remove. This needs a role that includes it; their role is editor." }
}
The member holds permissions the key's holder does not. An equal role is refused too.
{
"success": false,
"error": { "code": "CANNOT_ACT_ON_MEMBER", "message": "This member holds permissions you do not have, so you cannot change or remove them. Ask an Admin." }
}
{
"success": false,
"error": { "code": "CANNOT_ACT_ON_OWNER", "message": "The team owner's role cannot be changed and they cannot be removed from the team." }
}
The key holder's role allows this, but they have no seat in the team.
{
"success": false,
"error": { "code": "SEAT_REQUIRED", "message": "[email protected] needs a seat in this team to use members.remove. Their role allows it — an Admin can assign a seat in Team settings." }
}
Returned when the user is not a member of the team.
{
"success": false,
"error": { "code": "NOT_FOUND", "message": "Member not found in team" }
}