An incident is a period when a monitor was down. It opens when a check fails and resolves when one passes again. Pausing a monitor resolves its open incident.

## The incident object
| Field | Type | Description |
|---|---|---|
| `id` | integer | The incident's ID. |
| `started_at` | string | When the monitor went down, in UTC. |
| `resolved_at` | string or null | When it recovered, in UTC, or null while the incident is open. |
| `duration_seconds` | integer or null | How long it lasted, once resolved. |
| `cause` | string or null | What the failing check reported. |
| `resolved` | boolean | Whether the incident is over. |

## List incidents
`GET /api/v1/incidents`

Returns the newest 100 incidents across all of the team's monitors, open and resolved, newest first. Not paginated.

| | |
|---|---|
| Authentication | Bearer token. Any member of the team |
| Rate limit | 60 requests per minute per user, shared by all of that user's tokens |

### Example request

```bash
curl https://monitor.agilepixel.io/api/v1/incidents \
  -H "Authorization: Bearer $AGILEMONITOR_TOKEN" \
  -H "Accept: application/json"
```

### Responses

| Status | When | Body |
|---|---|---|
| `200` | The team's incidents. | [Incidents](#incident-object), in `data` |
| `401` | There is no token, or it is invalid or revoked. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |
| `403` | The token is valid but may not do this: a Viewer tried to change something, the token isn't pinned to a team, or its creator has left the team. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |
| `429` | The rate limit is used up. Wait for `Retry-After` seconds. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |
| `500` | Something went wrong on our side. Try again; if it persists, contact support. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |

#### 200

```json
{
  "data": [
    {
      "id": 77106,
      "started_at": "2026-10-07T09:10:00.000000Z",
      "resolved_at": null,
      "duration_seconds": null,
      "cause": "HTTP 503 Service Unavailable",
      "resolved": false
    },
    {
      "id": 77105,
      "started_at": "2026-10-06T22:41:00.000000Z",
      "resolved_at": "2026-10-06T22:47:00.000000Z",
      "duration_seconds": 360,
      "cause": "Connection timed out after 30 seconds",
      "resolved": true
    }
  ]
}
```

#### 401

```json
{"type": "about:blank", "title": "Unauthorized", "status": 401}
```

#### 403

```json
{"type": "about:blank", "title": "Forbidden", "status": 403}
```

#### 429

```json
{"type": "about:blank", "title": "Too Many Requests", "status": 429}
```

#### 500

```json
{"type": "about:blank", "title": "Internal Server Error", "status": 500}
```

## List a monitor's incidents
`GET /api/v1/monitors/{monitor}/incidents`

Returns the monitor's newest 50 incidents, open and resolved, newest first. Not paginated.

| | |
|---|---|
| Authentication | Bearer token. Any member of the team |
| Rate limit | 60 requests per minute per user, shared by all of that user's tokens |

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `monitor` | path | integer | Yes | The monitor's ID. |

### Example request

```bash
curl https://monitor.agilepixel.io/api/v1/monitors/48213/incidents \
  -H "Authorization: Bearer $AGILEMONITOR_TOKEN" \
  -H "Accept: application/json"
```

### Responses

| Status | When | Body |
|---|---|---|
| `200` | The monitor's incidents. | [Incidents](#incident-object), in `data` |
| `401` | There is no token, or it is invalid or revoked. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |
| `403` | The token is valid but may not do this: a Viewer tried to change something, the token isn't pinned to a team, or its creator has left the team. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |
| `404` | Nothing with that ID belongs to the team, or the path doesn't exist. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |
| `429` | The rate limit is used up. Wait for `Retry-After` seconds. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |
| `500` | Something went wrong on our side. Try again; if it persists, contact support. | [Problem](https://monitor.agilepixel.io/docs/api/errors) |

#### 200

```json
{
  "data": [
    {
      "id": 77106,
      "started_at": "2026-10-07T09:10:00.000000Z",
      "resolved_at": null,
      "duration_seconds": null,
      "cause": "HTTP 503 Service Unavailable",
      "resolved": false
    },
    {
      "id": 77105,
      "started_at": "2026-10-06T22:41:00.000000Z",
      "resolved_at": "2026-10-06T22:47:00.000000Z",
      "duration_seconds": 360,
      "cause": "Connection timed out after 30 seconds",
      "resolved": true
    }
  ]
}
```

#### 401

```json
{"type": "about:blank", "title": "Unauthorized", "status": 401}
```

#### 403

```json
{"type": "about:blank", "title": "Forbidden", "status": 403}
```

#### 404

```json
{"type": "about:blank", "title": "Not Found", "status": 404}
```

#### 429

```json
{"type": "about:blank", "title": "Too Many Requests", "status": 429}
```

#### 500

```json
{"type": "about:blank", "title": "Internal Server Error", "status": 500}
```
