Actually Tracking

Alerts

Create alerts that notify you in the app, by email, Slack, Discord or webhook when an event happens or a funnel is completed.

Authentication

Requires a root client or a key with the alerts:write permission. A key for one project can only manage that project's alerts.

Base URL

https://api.actuallytracking.com/manage/projects/{projectId}/alerts

Endpoints

MethodPathDescription
GET/manage/projects/{projectId}/alertsList the project's alerts
GET/manage/projects/{projectId}/alerts/{alertId}Get one alert
POST/manage/projects/{projectId}/alertsCreate an alert
PATCH/manage/projects/{projectId}/alerts/{alertId}Change an alert
DELETE/manage/projects/{projectId}/alerts/{alertId}Delete an alert
GET/manage/projects/{projectId}/alerts/historyThe alerts that went out, newest first (limit, default 50, up to 500)
GET/manage/projects/{projectId}/alerts/integrationsThe Slack, Discord and webhook integrations an alert can send to

These are the same alerts as the Rules tab on the dashboard's Notifications page.

Creating an alert

curl -X POST https://api.actuallytracking.com/manage/projects/YOUR_PROJECT_ID/alerts \
  -H "actuallytracking-client-id: YOUR_CLIENT_ID" \
  -H "actuallytracking-client-secret: YOUR_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New pro signup",
    "trigger": "events",
    "steps": [
      {
        "event": "signup",
        "filters": [{ "name": "properties.plan", "operator": "is", "value": ["pro"] }]
      }
    ],
    "template": "New {{properties.plan}} signup",
    "sendToEmail": true,
    "integrationIds": ["INTEGRATION_ID"]
  }'
FieldRequiredDescription
nameYesThe alert's name
triggerYesevents: fires when any of the steps happens. funnel: fires when a session completes the steps in order
stepsYes1 to 10 steps, each an event or a page path, with optional filters, as in funnels
templateNoThe message. $EVENT_NAME, $RULE_NAME and {{path.to.field}} from the event fill in
sendToAppNoNotify in the dashboard. Default true
sendToEmailNoEmail the project's members. Default false
integrationIdsNoIntegrations to send to, from /alerts/integrations. Set them up on the dashboard's Integrations page

PATCH takes the same fields, all optional. steps and integrationIds, when given, replace the old ones; "template": null goes back to the default message.

For full request and response schemas, see the API Reference.

On this page