# List incident grouping changes

List the times team members grouped incidents together or removed them from a group, newest first. Covers the last 30 days, or as many days as you set in `days`.

[endpoint]
method = "GET"
base_url = "https://incidents.betterstack.com"
path = "/api/v6/incident-grouping-changes"

[[query_param]]
name = "days"
default = "30"
type = "integer"
description = "How many days back to look, up to 90."

[[query_param]]
name = "page"
type = "integer"
description = "Page to return, starting at 1."

[[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"
[/endpoint]

[info]
#### Results are paginated
Use `pagination.next` and `pagination.prev` to move through pages or jump to a specific one using `page`. See [Pagination](/docs/getting-started/integrations/api/#pagination).
[/info]

[responses]
[[response]]
status = 200
description = "Returns the list of incident grouping changes."
body = '''
{
  "data": [
    {
      "id": "123456789",
      "type": "incident_grouping_change",
      "attributes": {
        "action": "ungrouped",
        "created_at": "2026-11-20T09:12:40Z",
        "user": {
          "id": "u4471",
          "name": "Ana Novak",
          "email": "ana@example.com"
        },
        "incident_group_id": "98765",
        "incident_group_name": "Checkout 502s",
        "incidents": [
          {
            "id": "103",
            "name": "api.example.com",
            "cause": "Status 502",
            "started_at": "2026-11-20T08:55:02Z",
            "metadata": {}
          }
        ],
        "incidents_count": 1,
        "group_incidents": [
          {
            "id": "101",
            "name": "api.example.com",
            "cause": "Status 502",
            "started_at": "2026-11-20T08:41:17Z",
            "metadata": {}
          }
        ],
        "group_incidents_count": 2
      }
    }
  ],
  "pagination": {
    "prev": null,
    "next": null
  }
}
'''

[[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 = "Your role doesn't allow viewing this, or the token can't be used for this API."

[[response]]
status = 422
description = "The `days` or `page` parameter isn't a positive whole number, or the token can access more than one team and the request named none."
[/responses]

[params]
title = "Response attributes"

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

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

[[param]]
name = "action"
type = "string"
description = "What the person did to the group.<br/>Valid values:<br/>`grouped`: The person put incidents into the group.<br/>`ungrouped`: The person removed incidents from the group."

[[param]]
name = "created_at"
type = "datetime"
description = "When the person made the change. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "user"
type = "object or null"
description = "Who made the change. `null` once the person's account is removed."

[[param]]
name = "user.id"
type = "string"
description = "The person's user ID, such as `u123`."

[[param]]
name = "user.name"
type = "string"
description = "The person's full name."

[[param]]
name = "user.email"
type = "string"
description = "The person's e-mail."

[[param]]
name = "incident_group_id"
type = "string or null"
description = "ID of the incident group the incidents joined or left. The group may no longer exist."

[[param]]
name = "incident_group_name"
type = "string or null"
description = "The group's name. `null` once the group is gone, or when it has no name."

[[param]]
name = "incidents"
type = "array of objects"
description = "Up to 5 of the incidents the person moved. Incidents removed since aren't listed."

[[param]]
name = "incidents[].id"
type = "string"
description = "The incident's ID."

[[param]]
name = "incidents[].name"
type = "string"
description = "The incident's name."

[[param]]
name = "incidents[].cause"
type = "string"
description = "The incident's cause as plain text, cut to 200 characters."

[[param]]
name = "incidents[].started_at"
type = "datetime"
description = "When the incident started. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "incidents[].metadata"
type = "object"
description = "The incident's metadata, each key with its text values."

[[param]]
name = "incidents_count"
type = "integer"
description = "How many incidents the person moved."

[[param]]
name = "group_incidents"
type = "array of objects"
description = "Up to 5 of the group's other incidents, the ones the moved incidents joined or were removed from, in the same shape as `incidents`."

[[param]]
name = "group_incidents[].id"
type = "string"
description = "The incident's ID."

[[param]]
name = "group_incidents[].name"
type = "string"
description = "The incident's name."

[[param]]
name = "group_incidents[].cause"
type = "string"
description = "The incident's cause as plain text, cut to 200 characters."

[[param]]
name = "group_incidents[].started_at"
type = "datetime"
description = "When the incident started. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "group_incidents[].metadata"
type = "object"
description = "The incident's metadata, each key with its text values."

[[param]]
name = "group_incidents_count"
type = "integer"
description = "How many other incidents the group held at the time of the change."

[[param]]
name = "pagination.prev"
type = "string or null"
description = "The URL of the previous page, or `null` on the first page."

[[param]]
name = "pagination.next"
type = "string or null"
description = "The URL of the next page, or `null` on the last page."
[/params]

#### Example cURL

[code-tabs]
```shell
[label List incident grouping changes]
curl --request GET \
  --url https://incidents.betterstack.com/api/v6/incident-grouping-changes \
  --header "Authorization: Bearer $TOKEN"
```
```shell
[label Last 7 days]
curl --request GET \
  --url "https://incidents.betterstack.com/api/v6/incident-grouping-changes?days=7" \
  --header "Authorization: Bearer $TOKEN"
```
[/code-tabs]
