"Best analytics tool I've used in 14 years"

Get alert history

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

Return recent alert trigger logs — which alerts fired, for which goals, and whether delivery succeeded or failed.

Use alertId to filter to one alert. Results are capped at 100.

Request

Path parameters

websiteId
string
Website ObjectId. From List websites (_id field). Example: 665f0b3c4d2e1a0012345678.

Query parameters

alertId
string
Filter to one alert. ObjectId from List alerts. Example: 665f0b3c4d2e1a0012345678.
limit
number
Max logs returned. Default 50, max 100. Example: limit=25.

Example query

GET /api/v1/admin/websites/{websiteId}/alerts/history?alertId=665f0b3c4d2e1a0012345678&limit=25

Response

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

Response fields

data[].alertId
string
Alert ObjectId.
data[].alertName
string
Alert name.
data[].goalName
string
Goal that triggered the alert.
data[].status
string
sent or failed status.
data[].error
string|null
Error message when delivery failed.
data[].visitorId
string|null
Alias for datafast_visitor_id on endpoints that accept both names.
data[].triggeredAt
string
Trigger timestamp.
counts.sent
number
Number of sent logs before limit slicing.
counts.failed
number
Number of failed logs before limit slicing.
counts.total
number
Total logs before limit slicing.

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 require a dft_ token and owner role.

Errors

See API errors for the standard error envelope, auth failures, validation errors, permission errors, and rate limits.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown

Example request
curl -X GET "https://datafa.st/api/v1/admin/websites/{websiteId}/alerts/history" \
  -H "Authorization: Bearer dft_xxx"
Success response
{
  "status": "success",
  "data": [{
    "alertId": "665f0b3c4d2e1a0012345678",
    "alertName": "New signup",
    "goalName": "signup",
    "status": "sent",
    "error": null,
    "visitorId": "a3ab2331-989f-4cfa-91c6-2461c9e3c6bd",
    "triggeredAt": "2026-05-21T00:00:00.000Z"
  }],
  "counts": { "sent": 1, "failed": 0, "total": 1 }
}