Removing a user with the admin role is not permitted via the API.
Explore documentation
Remove a team member from team
Removes a member from the team by their ID. This action cannot be undone.
DELETE
https://betterstack.com/api/v2/team-members/{id}
URL parameters
id
required
string
The ID of the team member to remove.
Query parameters
team_name
string
Required if using a global API token to specify the team.
Headers
Authorization
required
string
Bearer $TOKEN
204
The team member was successfully removed.
404
The team member with the specified ID was not found.
Response body
403
Removing an admin is forbidden.
Response body
Example cURL
Example