Removing a user with the admin role is not permitted via the API. Removing a member with the billing_admin role requires a global API token, because Billing admin applies to every team in your organization.
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.
Query parameters
Required if using a global API token to specify the team, unless you set team_id.
The ID of the team shown in Better Stack URLs, like t123. Use it instead of team_name with a global API token.
The email address of the team member to remove or invitation to cancel. Can be passed as a query parameter or in the request body.
Headers
Bearer $TOKEN
The team member or invitation was successfully removed.
No team member or invitation with the specified email was found.
Response body
The email field is missing or blank.
Response body
Removing an admin is forbidden.
Response body
Example cURL