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.

Removing a user with the admin role is not permitted via the API.

DELETE https://betterstack.com/api/v2/team-members

Query parameters

team_name
string
email
required string

Headers

Authorization
required string
204
404

Response body

{
  "errors": "Team member with email \"nonexistent@example.com\" not found"
}
422

Response body

{
  "errors": "Email is required"
}
403

Response body

{
  "errors": "Removing admins is not allowed via API"
}

Example cURL

Example
curl --request DELETE \
  --url "https://betterstack.com/api/v2/team-members?email=bob@example.com" \
  --header "Authorization: Bearer $TOKEN"