---
title: "Get TCP Monitor Alert History"
description: "Returns paginated notification/escalation attempts (alert history) for incidents of a TCP monitor."
---

`GET /api/tcp-monitors/:tcpMonitorPublicId/alert-history`

## Authentication

Requires a valid session.

- Header: `Authorization: Bearer <token>`

## Parameters

- `tcpMonitorPublicId` (Path, required): TCP monitor public UUID.

## Query Parameters

- `page` (number, optional): Page number (default: `1`).
- `limit` (number, optional): Items per page (default: `25`; max `100`). Ignored in favor of export defaults when `format=csv` or `download=1` (default `10000`, max `50000`).
- `status` (string, optional): `sent` or `failed`.
- `from` / `to` (ISO date string, optional): Filter by `sentAt` range.
- `format` (string, optional): `json` (default) or `csv`.
- `download` (string, optional): `1` to force an attachment download.

## Example (cURL)

```bash
BASE_URL="https://uptimeify.io"
TOKEN="<your-api-token>"

curl -X GET "$BASE_URL/api/tcp-monitors/11111111-1111-4111-8111-111111111111/alert-history" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"
```

## Example Response

```json
{
  "data": [
    {
      "id": 987,
      "incidentId": 123,
      "type": "tcp",
      "status": "sent",
      "channelName": "Ops Slack",
      "channelType": "slack",
      "channelConfig": null,
      "sentAt": "2026-02-26T12:11:00.000Z",
      "errorMessage": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageCount": 1
}
```

Each entry is one delivery attempt to one notification channel. `status` is `sent` or `failed` (with `errorMessage` set on failure); `channelType` is the channel type (e.g. `email`, `slack`, `opsgenie`). `channelConfig` has secrets redacted.

When `format=csv` (or `download=1`), the response is a `text/csv` (or `application/json` for `format=json&download=1`) attachment instead of the paginated JSON envelope above.

## Common Errors

- `400 TCP monitor public ID (UUID) required` if `:tcpMonitorPublicId` is invalid
- `401 Unauthorized` if you are not authenticated
- `403 Forbidden` if you do not have access to the monitor
