# Get an incident group — API reference

> Returns the incident group, or null when the incident belongs to no group.

Source: https://upfour.io/docs/api/incidents/get-an-incident-group

[Developers](https://upfour.io/docs/api.md)/[Incidents](https://upfour.io/docs/api/incidents.md)

Returns the incident group, or null when the incident belongs to no group.

GET https://app.upfour.io/v1/incidents/{incidentID}/group

scope incident.read stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `incidentID` required | uuid | path parameter |

## Returns

A successful request returns `200` with application/json.

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | IncidentGroup  · nullable | |
| IncidentGroup · 20 fields FieldTypeDescription `client_id` uuid  · nullable `correlation_key` string one of`dns` `tls` `timeout` `network` `content` `http_5xx` `http_4xx` `availability` `id` uuid `last_incident_at` string (date-time) `members` IncidentGroupMember[]  · nullable Each item · 10 fields FieldTypeDescription `incident_id` uuid `joined_at` string (date-time) `monitor_id` uuid  · nullable `monitor_name` string `recovered_at` string (date-time)  · nullable `resolved_at` string (date-time)  · nullable `severity` string one of`critical` `warning` `info` `started_at` string (date-time) `status` string one of`open` `acknowledged` `resolved` `title` string `organization_id` uuid `resolved_at` string (date-time)  · nullable `started_at` string (date-time) `status` string one of`open` `resolved` `title` string | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | [bad_request](https://upfour.io/docs/api/errors#code-bad_request) | The request is malformed or fails validation. |
| 404 | [not_found](https://upfour.io/docs/api/errors#code-not_found) | The requested resource does not exist or is outside the caller's scope. |

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

[PreviousGet an incident domain case](https://upfour.io/docs/api/incidents/get-an-incident-domain-case.md) [NextGet incident AI details](https://upfour.io/docs/api/incidents/get-incident-ai-details.md)

## Request

### cURL

```bash
curl -s "https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/group" \
  -H "Authorization: Bearer $UP4_API_KEY"
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/group", {
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/group",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/group", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(out))
}
```

### PHP

```php
<?php
$ch = curl_init("https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/group");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
    ],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 200

```json
{
  "data": null
}
```

### 400

```json
{
  "error": {
    "code": "bad_request",
    "message": "The request is malformed or fails validation.",
    "request_id": "req_…"
  }
}
```

### 404

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource does not exist or is outside the caller's scope.",
    "request_id": "req_…"
  }
}
```
