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