Source: https://datafa.st/docs/api/account/alerts/list
Markdown source: https://datafa.st/docs/api/account/alerts/list.md
Description: List alerts.

# List alerts

`GET https://datafa.st/api/v1/admin/websites/{websiteId}/alerts`

List email alerts configured for a website. Each alert fires when a specific goal is completed and sends an email to the website owner.

Maximum 25 alerts per website.

> **Related:** [Alerts](/changelog/alerts-mobile-wordpress)

## Request

#### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `websiteId` | string | — | Website ObjectId. From [List websites](/docs/api/account/websites/list) (`_id` field). Example: `665f0b3c4d2e1a0012345678`. |

## Response

Returns a JSON object with `status: "success"` and endpoint-specific fields in `data`.

#### Response fields

| Field | Type | Description |
| --- | --- | --- |
| `data[].id` | string | Alert ObjectId. |
| `data[].websiteId` | string | Website ObjectId used by account tokens to choose which website to query or manage. |
| `data[].name` | string | Human-readable name for the resource or event. The exact meaning depends on the endpoint. |
| `data[].trigger.type` | string | Trigger type. Currently `goal`. |
| `data[].trigger.goalName` | string | Goal watched by the alert. |
| `data[].destination.type` | string | Destination type. Currently `email`. |
| `data[].template.subject` | string (optional) | Custom subject when configured; omitted otherwise. |
| `data[].template.message` | string | Human-readable confirmation or status message for the operation. |
| `data[].isEnabled` | boolean | Whether the alert is enabled. |
| `data[].triggerCount` | number | All-time successful trigger count. |
| `data[].monthlyCount` | number | Current billing-cycle trigger count. |
| `data[].monthlyCountResetAt` | string | Timestamp used to reset the monthly counter. |
| `data[].dailyCount` | number | Current UTC-day trigger count. |
| `data[].dailyCountResetAt` | string | Timestamp used to reset the daily counter. |
| `data[].lastTriggeredAt` | string\|null (optional) | Latest successful trigger timestamp, when available; omitted before the first trigger. |
| `data[].lastError` | string\|null (optional) | Latest delivery error, when available; omitted before an error is recorded. |
| `data[].recentLogs` | object[] | Recent trigger logs. |
| `data[].recentLogs[].status` | string | `sent` or `failed`. |
| `data[].recentLogs[].error` | string\|null | Delivery error for a failed log entry. |
| `data[].recentLogs[].visitorId` | string\|null | Alias for `datafast_visitor_id` on endpoints that accept both names. |
| `data[].recentLogs[].at` | string | Trigger timestamp. |
| `data[].createdAt` | string | Creation timestamp. |
| `data[].updatedAt` | string | Last update timestamp. |

### Authentication

Use a `dft_` account token with `alerts:read`.

A `df_` website API key for the same website can also call this route when the path `websiteId` matches the key's website. Write access with a `df_` key is capped at **member** level — owner-only actions such as [team management](/docs/api/account/team) require a `dft_` token and owner role.

### Errors

See [API errors](/docs/api#errors) for the standard error envelope, auth failures, validation errors, permission errors, and rate limits.

## Code examples

### Example request

```bash
curl -X GET "https://datafa.st/api/v1/admin/websites/{websiteId}/alerts" \
  -H "Authorization: Bearer dft_xxx"
```

### Success response

```json
{
  "status": "success",
  "data": [{
    "id": "665f0b3c4d2e1a0012345678",
    "websiteId": "665f0b3c4d2e1a0012345678",
    "name": "New signup",
    "trigger": { "type": "goal", "goalName": "signup" },
    "destination": { "type": "email" },
    "template": { "subject": "New signup", "message": "A visitor signed up." },
    "isEnabled": true,
    "triggerCount": 18,
    "monthlyCount": 4,
    "monthlyCountResetAt": "2026-05-01T00:00:00.000Z",
    "dailyCount": 1,
    "dailyCountResetAt": "2026-05-21T00:00:00.000Z",
    "lastTriggeredAt": "2026-05-21T12:00:00.000Z",
    "recentLogs": [],
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-05-21T12:00:00.000Z"
  }]
}
```
