# Ungroup incidents

Remove incidents from an incident group, as **Ungroup** does in the incidents list. Leave out `incident_ids` to remove every incident. A group left with one incident or none dissolves, and the response is empty.

[endpoint]
method = "POST"
base_url = "https://incidents.betterstack.com"
path = "/api/v6/incident-groups/{id}/ungroup"

[[path_param]]
name = "id"
required = true
type = "string"
description = "The ID of the incident group."

[[body_param]]
name = "incident_ids"
type = "array of strings"
description = "IDs of the incidents to remove from the group, as strings or numbers. Leave it out to ungroup the whole group."

[[query_param]]
name = "team_id"
type = "string"
description = "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content-Type"
description = "application/json"
required = false
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = "Returns the incident group."
body = '''
{
  "data": {
    "id": "123456789",
    "type": "incident_group",
    "attributes": {
      "name": "Checkout 502s",
      "incidents_count": 3,
      "started_at": "2026-11-21T22:04:11.000Z",
      "acknowledged_at": "2026-11-21T22:09:30.000Z",
      "acknowledged_by": {
        "name": "John Smith",
        "email": "john@example.com"
      },
      "team_id": "t123",
      "team_name": "Production"
    }
  }
}
'''

[[response]]
status = 204
description = "The request succeeded. The response has no body. Returned when the group dissolved, with one incident or none left."

[[response]]
status = 401
description = "The API token is missing or invalid."
body = '''
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
'''

[[response]]
status = 403
description = "The token is read-only, your role doesn't allow the action, or the token can't be used for this API."
body = '''
{
  "errors": "This API token is read-only and cannot be used for write operations."
}
'''

[[response]]
status = 404
description = "The group doesn't exist, or it was ungrouped or removed in the meantime."

[[response]]
status = 409
description = "The group is being removed."

[[response]]
status = 422
description = "An incident isn't in the group, `incident_ids` is empty, or the request has an unknown field."
body = '''
{
  "errors": "These incidents aren't in incident group 98765: 103"
}
'''

[[response]]
status = 503
description = "The team's incidents are being regrouped right now. Try again in a moment."
[/responses]

[params]
title = "Response attributes"

[[param]]
name = "id"
type = "string"
description = "The ID of the incident group."

[[param]]
name = "type"
type = "string"
description = "Always `incident_group`."

[[param]]
name = "name"
type = "string or null"
description = "The group's name, up to 100 characters. `null` when it has none."

[[param]]
name = "incidents_count"
type = "integer"
description = "How many incidents the group holds. Incidents still being confirmed aren't counted."

[[param]]
name = "started_at"
type = "datetime"
description = "When the group's earliest incident started. Removing that incident from the group doesn't change it. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "acknowledged_at"
type = "datetime or null"
description = "When someone acknowledged the group. New incidents that join it later are acknowledged too. `null` while nobody has. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "acknowledged_by"
type = "object or null"
description = "Who acknowledged the group. `null` while nobody has."

[[param]]
name = "acknowledged_by.name"
type = "string"
description = "Full name of the team member, or the text credited instead of a team member."

[[param]]
name = "acknowledged_by.email"
type = "string or null"
description = "E-mail of the team member. `null` when the group was credited to something other than a team member, such as `API`, Slack or a custom text."

[[param]]
name = "team_id"
type = "string"
description = "Team that owns the group, such as `t123`."

[[param]]
name = "team_name"
type = "string"
description = "Name of the team that owns the group."
[/params]

#### Example cURL

[code-tabs]
```shell
[label Ungroup incidents]
curl --request POST \
  --url https://incidents.betterstack.com/api/v6/incident-groups/98765/ungroup \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "incident_ids": [
    "123458"
  ]
}'
```
```shell
[label Ungroup the whole group]
curl --request POST \
  --url https://incidents.betterstack.com/api/v6/incident-groups/98765/ungroup \
  --header "Authorization: Bearer $TOKEN"
```
[/code-tabs]
