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}/alertsEndpoints
| Method | Path | Description |
|---|---|---|
GET | /manage/projects/{projectId}/alerts | List the project's alerts |
GET | /manage/projects/{projectId}/alerts/{alertId} | Get one alert |
POST | /manage/projects/{projectId}/alerts | Create 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/history | The alerts that went out, newest first (limit, default 50, up to 500) |
GET | /manage/projects/{projectId}/alerts/integrations | The 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"]
}'| Field | Required | Description |
|---|---|---|
name | Yes | The alert's name |
trigger | Yes | events: fires when any of the steps happens. funnel: fires when a session completes the steps in order |
steps | Yes | 1 to 10 steps, each an event or a page path, with optional filters, as in funnels |
template | No | The message. $EVENT_NAME, $RULE_NAME and {{path.to.field}} from the event fill in |
sendToApp | No | Notify in the dashboard. Default true |
sendToEmail | No | Email the project's members. Default false |
integrationIds | No | Integrations 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.