Skip to content

Alerts API ​

Notifications (email, Slack, signed webhook) when a session matches a rule.

All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.

MethodPathWhat it does
GET/sites/{site}/alertsThe site's alerts (newest first)
POST/sites/{site}/alertsCreates an alert (recordings:write)
GET/sites/{site}/alerts/eventsThe 50 latest sessions that matched the site's alerts (newest first)
GET/sites/{site}/alerts/{alert}One alert
PATCH/sites/{site}/alerts/{alert}Changes an alert (recordings:write); only the fields sent
DELETE/sites/{site}/alerts/{alert}Deletes an alert and its matches (recordings:write)
POST/sites/{site}/alerts/{alert}/testSends a test notification to every channel now (recordings:write, 10 per minute)

GET /sites/{site}/alerts ​

The site's alerts (newest first)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Responses ​

  • 200 — Alerts.
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].idinteger
data[].site_idinteger
data[].namestring
data[].triggerobjecterror / network / page: value is text the error message, failed request URL or page URL must contain (required for page). rage / dead: no value. tag: key, and optionally the value it must have.
data[].trigger.typestringyesOne of: error, network, rage, dead, tag, page.
data[].trigger.valuestring, nullableAt most 500 characters.
data[].trigger.keystringAt most 64 characters.
data[].channelsobjectAt least one channel. Webhooks are signed with X-Replora-Signature: sha256=<HMAC-SHA256 of the body with webhook_secret>; in the SaaS edition they must be https to a public address.
data[].channels.emailsstring (email)[]At most 10 items.
data[].channels.slackstring, nullableA Slack incoming webhook (https://hooks.slack.com/…).
data[].channels.webhookstring, nullable
data[].webhook_secretstring
data[].cooldown_minutesinteger
data[].enabledboolean
data[].last_sent_atstring (date-time), nullable
data[].last_errorstring, nullableWhy the last notification failed on some channel.
data[].created_atstring (date-time), nullable
data[].updated_atstring (date-time), nullable
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/alerts" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /sites/{site}/alerts ​

Creates an alert (recordings:write)

403 when the account's plan allows no more alerts (plan feature alerts.count).

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Request body ​

application/json, required

FieldTypeRequiredDescription
namestringyesAt most 120 characters.
triggerobjectyeserror / network / page: value is text the error message, failed request URL or page URL must contain (required for page). rage / dead: no value. tag: key, and optionally the value it must have.
trigger.typestringyesOne of: error, network, rage, dead, tag, page.
trigger.valuestring, nullableAt most 500 characters.
trigger.keystringAt most 64 characters.
channelsobjectyesAt least one channel. Webhooks are signed with X-Replora-Signature: sha256=<HMAC-SHA256 of the body with webhook_secret>; in the SaaS edition they must be https to a public address.
channels.emailsstring (email)[]At most 10 items.
channels.slackstring, nullableA Slack incoming webhook (https://hooks.slack.com/…).
channels.webhookstring, nullable
cooldown_minutesintegerAt most one notification per this many minutes; the next one counts the matches held back. Minimum 1. Maximum 10080. Default 60.
enabledbooleanDefault true.

Responses ​

  • 201 — Created.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.site_idinteger
data.namestring
data.triggerobjecterror / network / page: value is text the error message, failed request URL or page URL must contain (required for page). rage / dead: no value. tag: key, and optionally the value it must have.
data.trigger.typestringyesOne of: error, network, rage, dead, tag, page.
data.trigger.valuestring, nullableAt most 500 characters.
data.trigger.keystringAt most 64 characters.
data.channelsobjectAt least one channel. Webhooks are signed with X-Replora-Signature: sha256=<HMAC-SHA256 of the body with webhook_secret>; in the SaaS edition they must be https to a public address.
data.channels.emailsstring (email)[]At most 10 items.
data.channels.slackstring, nullableA Slack incoming webhook (https://hooks.slack.com/…).
data.channels.webhookstring, nullable
data.webhook_secretstring
data.cooldown_minutesinteger
data.enabledboolean
data.last_sent_atstring (date-time), nullable
data.last_errorstring, nullableWhy the last notification failed on some channel.
data.created_atstring (date-time), nullable
data.updated_atstring (date-time), nullable
bash
curl -X POST "https://your-site.com/api/v1/sites/{site}/alerts" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","trigger":{"type":"error"},"channels":{"emails":["[email protected]"],"slack":"text","webhook":"text"},"cooldown_minutes":60,"enabled":true}'

GET /sites/{site}/alerts/events ​

The 50 latest sessions that matched the site's alerts (newest first)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
alertqueryintegerOnly this alert's matches.

Responses ​

  • 200 — Matches (replay at GET /sites/{site}/sessions/{session}); notified once a notification included them.
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].idinteger
data[].alert_idinteger
data[].sessionstring (uuid)
data[].detailstring
data[].at_msinteger
data[].notifiedboolean
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/alerts/events" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /sites/{site}/alerts/{alert} ​

One alert

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
alertpathintegeryes

Responses ​

  • 200 — The alert.
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.site_idinteger
data.namestring
data.triggerobjecterror / network / page: value is text the error message, failed request URL or page URL must contain (required for page). rage / dead: no value. tag: key, and optionally the value it must have.
data.trigger.typestringyesOne of: error, network, rage, dead, tag, page.
data.trigger.valuestring, nullableAt most 500 characters.
data.trigger.keystringAt most 64 characters.
data.channelsobjectAt least one channel. Webhooks are signed with X-Replora-Signature: sha256=<HMAC-SHA256 of the body with webhook_secret>; in the SaaS edition they must be https to a public address.
data.channels.emailsstring (email)[]At most 10 items.
data.channels.slackstring, nullableA Slack incoming webhook (https://hooks.slack.com/…).
data.channels.webhookstring, nullable
data.webhook_secretstring
data.cooldown_minutesinteger
data.enabledboolean
data.last_sent_atstring (date-time), nullable
data.last_errorstring, nullableWhy the last notification failed on some channel.
data.created_atstring (date-time), nullable
data.updated_atstring (date-time), nullable
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/alerts/{alert}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

PATCH /sites/{site}/alerts/{alert} ​

Changes an alert (recordings:write); only the fields sent

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
alertpathintegeryes

Request body ​

application/json, required

FieldTypeRequiredDescription
namestringyesAt most 120 characters.
triggerobjectyeserror / network / page: value is text the error message, failed request URL or page URL must contain (required for page). rage / dead: no value. tag: key, and optionally the value it must have.
trigger.typestringyesOne of: error, network, rage, dead, tag, page.
trigger.valuestring, nullableAt most 500 characters.
trigger.keystringAt most 64 characters.
channelsobjectyesAt least one channel. Webhooks are signed with X-Replora-Signature: sha256=<HMAC-SHA256 of the body with webhook_secret>; in the SaaS edition they must be https to a public address.
channels.emailsstring (email)[]At most 10 items.
channels.slackstring, nullableA Slack incoming webhook (https://hooks.slack.com/…).
channels.webhookstring, nullable
cooldown_minutesintegerAt most one notification per this many minutes; the next one counts the matches held back. Minimum 1. Maximum 10080. Default 60.
enabledbooleanDefault true.

Responses ​

  • 200 — The alert.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.site_idinteger
data.namestring
data.triggerobjecterror / network / page: value is text the error message, failed request URL or page URL must contain (required for page). rage / dead: no value. tag: key, and optionally the value it must have.
data.trigger.typestringyesOne of: error, network, rage, dead, tag, page.
data.trigger.valuestring, nullableAt most 500 characters.
data.trigger.keystringAt most 64 characters.
data.channelsobjectAt least one channel. Webhooks are signed with X-Replora-Signature: sha256=<HMAC-SHA256 of the body with webhook_secret>; in the SaaS edition they must be https to a public address.
data.channels.emailsstring (email)[]At most 10 items.
data.channels.slackstring, nullableA Slack incoming webhook (https://hooks.slack.com/…).
data.channels.webhookstring, nullable
data.webhook_secretstring
data.cooldown_minutesinteger
data.enabledboolean
data.last_sent_atstring (date-time), nullable
data.last_errorstring, nullableWhy the last notification failed on some channel.
data.created_atstring (date-time), nullable
data.updated_atstring (date-time), nullable
bash
curl -X PATCH "https://your-site.com/api/v1/sites/{site}/alerts/{alert}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","trigger":{"type":"error"},"channels":{"emails":["[email protected]"],"slack":"text","webhook":"text"},"cooldown_minutes":60,"enabled":true}'

DELETE /sites/{site}/alerts/{alert} ​

Deletes an alert and its matches (recordings:write)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
alertpathintegeryes

Responses ​

  • 204 — Deleted.
  • 404 — Missing, or another account's.
bash
curl -X DELETE "https://your-site.com/api/v1/sites/{site}/alerts/{alert}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /sites/{site}/alerts/{alert}/test ​

Sends a test notification to every channel now (recordings:write, 10 per minute)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
alertpathintegeryes

Responses ​

  • 200 — The channels that failed, and why (empty when all worked).
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject
data.failedobject
bash
curl -X POST "https://your-site.com/api/v1/sites/{site}/alerts/{alert}/test" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Replora: see what your visitors see.