Skip to content
Website API / Alerts

Create an alert

POSThttps://<your Reveata origin>/api/v1/websites/{website}/alerts

Creates an alert or a scheduled report (weekly_summary, monthly_summary). Email recipients must be members of the website; without channels.email.recipientUserIds the email goes to the token owner. Needs the editor role.

Related: Recent alert firings and List alerts in Alerts.

Try in playground

Request

Path parameters

websitestringrequired

Website id or domain, e.g. example.com

1–253 characters

Headers

Authorizationstringrequired

Bearer followed by an account token or an OAuth access token with the alerts:write scope.

Content-Typestringrequired

Send the body as JSON.

One of: application/json

Body fields

typestringrequired

One of: traffic_spike, traffic_drop, new_payment, revenue_threshold, goal_threshold, new_referrer, weekly_summary, monthly_summary

namestringoptional

1–80 characters

messagestring | nulloptional

Up to 2000 characters

enabledbooleanoptional
conditionobjectoptional
condition.thresholdnumber | nulloptional

0 to 1000000000000

condition.percentChangenumber | nulloptional

1 to 10000

condition.windowMinutesinteger | nulloptional

5 to 10080

condition.goalstring | nulloptional

Up to 100 characters

channelsobjectoptional
channels.emailobjectoptional
channels.email.enabledbooleanoptional
channels.email.recipientUserIdsstring[]optional

Up to 50 items

channels.slackobjectoptional
channels.slack.enabledbooleanoptional
channels.slack.webhookUrlstring (uri) | nulloptional

Up to 500 characters

channels.discordobjectoptional
channels.discord.enabledbooleanoptional
channels.discord.webhookUrlstring (uri) | nulloptional

Up to 500 characters

Response

The alert.

{
  "status": "string",
  "data": {
    "id": "string",
    "siteId": "string",
    "type": "traffic_spike",
    "name": "string",
    "enabled": true,
    "condition": {
      "threshold": "string",
      "percentChange": "string",
      "windowMinutes": "string",
      "goal": "string"
    },
    "channels": {
      "email": {
        "enabled": true,
        "recipientUserIds": []
      },
      "slack": {
        "enabled": true,
        "configured": true
      },
      "discord": {
        "enabled": true,
        "configured": true
      }
    },
    "message": "string",
    "lastTriggeredAt": "2026-01-01T00:00:00.000Z",
    "createdBy": "string",
    "createdAt": "2026-01-01T00:00:00.000Z"
  }
}

Response fields

FieldTypeDescription
status"ok"
dataobject
data.idstring
data.siteIdstring
data.typestring
data.namestring
data.enabledboolean
data.conditionobject
data.condition.thresholdnumber | null | null
data.condition.percentChangenumber | null | null
data.condition.windowMinutesinteger | null | null
data.condition.goalstring | null | null
data.channelsobject
data.channels.emailobject
data.channels.email.enabledboolean
data.channels.email.recipientUserIdsstring[]
data.channels.slackobject
data.channels.slack.enabledboolean
data.channels.slack.configuredboolean
data.channels.discordobject
data.channels.discord.enabledboolean
data.channels.discord.configuredboolean
data.messagestring | null | null
data.lastTriggeredAtstring (date-time) | null | null
data.createdBystring
data.createdAtstring (date-time)