Delete several teams
curl --request DELETE \ --url "$UNEEQ_API_URL/external/v1/organization/$UNEEQ_ORG_ID/teams" \ --header "Authorization: Bearer $UNEEQ_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "team_ids": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "7c9e6679-7425-40de-944b-e07fc1f90ae7" ]}'const url = `${process.env.UNEEQ_API_URL}/external/v1/organization/${process.env.UNEEQ_ORG_ID}/teams`;const response = await fetch(url, { method: 'DELETE', headers: { Authorization: `Bearer ${process.env.UNEEQ_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "team_ids": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "7c9e6679-7425-40de-944b-e07fc1f90ae7" ] }),});console.log(response.status, await response.text());Deletes every team in team_ids in one all-or-nothing operation. If any ID is not a team of
this organization, nothing is deleted and the call returns 403. Teams that are already
deleted are accepted and left as they are; duplicate IDs count once. An empty array is a
no-op that returns 204. This DELETE request takes a JSON body.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ID of the organization the API key belongs to, for example org_HYPCX67vaupjhdTn.
Example
org_HYPCX67vaupjhdTnRequest Bodyrequired
Section titled “Request Bodyrequired”object
IDs of the teams to delete. Must not be null; an empty array is a no-op.
Example
{ "team_ids": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "7c9e6679-7425-40de-944b-e07fc1f90ae7" ]}Responses
Section titled “Responses”All listed teams are deleted.
team_ids is missing, null, or contains a value that is not a UUID (message invalid request, no error_code).
The body of an error returned by an endpoint.
object
Human-readable explanation of what went wrong.
Stable machine-readable cause. Present only for errors that have one.
Example generated
{ "message": "example", "error_code": "example"}The Authorization header is missing, or the API key is not valid for this organization. A key check that fails on the server is also reported as 401.
The body of an error returned before the request reaches an endpoint (authentication and rate limiting).
object
Human-readable explanation of what went wrong.
Example generated
{ "error": "example"}One or more IDs are not teams of this organization; nothing was deleted (message team does not belong to the requested organization, no error_code).
The body of an error returned by an endpoint.
object
Human-readable explanation of what went wrong.
Stable machine-readable cause. Present only for errors that have one.
Example generated
{ "message": "example", "error_code": "example"}The API key has sent too many requests. Wait for the number of seconds in Retry-After, then retry.
The body of an error returned before the request reaches an endpoint (authentication and rate limiting).
object
Human-readable explanation of what went wrong.
Example generated
{ "error": "example"}Headers
Section titled “Headers”Seconds to wait before retrying.
The body is empty, not valid JSON, or has a field of the wrong type (message unable to decode request body), or the delete failed (message unable to delete requested team). No error_code.
The body of an error returned by an endpoint.
object
Human-readable explanation of what went wrong.
Stable machine-readable cause. Present only for errors that have one.
Example generated
{ "message": "example", "error_code": "example"}
