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

Get alert history

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

Get recent alert trigger logs. Supports alertId and limit query parameters.

Request

Authentication

  • dft_ account token with alerts:read.

Path parameters

ParameterTypeDescription
websiteIdstringWebsite ObjectId used by account tokens to choose which website to query or manage. Website ObjectId. The caller token must have access to this website.

Query parameters

ParameterTypeRequiredDescription
alertIdstringNoFilter history to one alert ObjectId.
limitnumberNoMaximum number of rows returned in one response. Use with offset to paginate through long result sets. Maximum logs returned. Defaults to 50, capped at 100.

Response

Returns a JSON object with status and endpoint-specific fields.

Response fields

FieldTypeDescription
data[].alertIdstringAlert ObjectId.
data[].alertNamestringAlert name.
data[].goalNamestringGoal that triggered the alert.
data[].statusstringsent or failed status.
data[].errorstringnull
data[].visitorIdstringnull
data[].triggeredAtstringTrigger timestamp.
counts.sentnumberNumber of sent logs before limit slicing.
counts.failednumberNumber of failed logs before limit slicing.
counts.totalnumberTotal logs before limit slicing.

Errors

Common errors include 400 for invalid input, 401 for missing or invalid tokens, 403 for missing permissions or website access, 404 for missing resources, and 500 for server errors.

✍️ 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 }
}