Remove a team

Removes a team. This can't be undone. Needs a global API token that isn't read-only.

Remove all team members first, and remove admins in Better Stack, since the API can't remove them. Your organization's last team can't be removed.

DELETE https://betterstack.com/api/v2/teams/{id}

URL parameters

id
required string

Headers

Authorization
required string
204
401

Response body

{
  "errors": "We could not authenticate your request. Please provide a valid Global API token or Better Stack OAuth token."
}
403

Response body

{
  "errors": "This API token is read-only and cannot be used for write operations."
}
404

Response body

{
  "errors": "Resource type team with id = t123 was not found"
}
422

Response body

{
  "errors": "Please remove all team members from this team before removing it."
}

Example cURL

Example
curl --request DELETE \
  --url https://betterstack.com/api/v2/teams/t123 \
  --header "Authorization: Bearer $TOKEN"