Skip to content
UneeqUneeqUneeq Docs

Delete several teams

DELETE
/external/v1/organization/{organizationID}/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"
]
}'

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.

organizationID
required
string

ID of the organization the API key belongs to, for example org_HYPCX67vaupjhdTn.

Example

org_HYPCX67vaupjhdTn
Media typeapplication/json
object
team_ids
required

IDs of the teams to delete. Must not be null; an empty array is a no-op.

Array<string>

Example

{
"team_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
]
}

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).

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

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.

Media typeapplication/json

The body of an error returned before the request reaches an endpoint (authentication and rate limiting).

object
error
required

Human-readable explanation of what went wrong.

string

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).

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

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.

Media typeapplication/json

The body of an error returned before the request reaches an endpoint (authentication and rate limiting).

object
error
required

Human-readable explanation of what went wrong.

string

Example generated

{
"error": "example"
}
Retry-After
integer
>= 1

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.

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

Example generated

{
"message": "example",
"error_code": "example"
}