Appearance
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.
| Method | Path | What it does |
|---|---|---|
| GET | /sites/{site}/alerts | The site's alerts (newest first) |
| POST | /sites/{site}/alerts | Creates an alert (recordings:write) |
| GET | /sites/{site}/alerts/events | The 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}/test | Sends a test notification to every channel now (recordings:write, 10 per minute) |
GET /sites/{site}/alerts
The site's alerts (newest first)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes |
Responses
- 200 — Alerts.
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | ||
data[].id | integer | ||
data[].site_id | integer | ||
data[].name | string | ||
data[].trigger | object | error / 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.type | string | yes | One of: error, network, rage, dead, tag, page. |
data[].trigger.value | string, nullable | At most 500 characters. | |
data[].trigger.key | string | At most 64 characters. | |
data[].channels | object | At 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.emails | string (email)[] | At most 10 items. | |
data[].channels.slack | string, nullable | A Slack incoming webhook (https://hooks.slack.com/…). | |
data[].channels.webhook | string, nullable | ||
data[].webhook_secret | string | ||
data[].cooldown_minutes | integer | ||
data[].enabled | boolean | ||
data[].last_sent_at | string (date-time), nullable | ||
data[].last_error | string, nullable | Why the last notification failed on some channel. | |
data[].created_at | string (date-time), nullable | ||
data[].updated_at | string (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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes |
Request body
application/json, required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | At most 120 characters. |
trigger | object | yes | error / 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.type | string | yes | One of: error, network, rage, dead, tag, page. |
trigger.value | string, nullable | At most 500 characters. | |
trigger.key | string | At most 64 characters. | |
channels | object | yes | At 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.emails | string (email)[] | At most 10 items. | |
channels.slack | string, nullable | A Slack incoming webhook (https://hooks.slack.com/…). | |
channels.webhook | string, nullable | ||
cooldown_minutes | integer | At most one notification per this many minutes; the next one counts the matches held back. Minimum 1. Maximum 10080. Default 60. | |
enabled | boolean | Default 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
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.site_id | integer | ||
data.name | string | ||
data.trigger | object | error / 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.type | string | yes | One of: error, network, rage, dead, tag, page. |
data.trigger.value | string, nullable | At most 500 characters. | |
data.trigger.key | string | At most 64 characters. | |
data.channels | object | At 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.emails | string (email)[] | At most 10 items. | |
data.channels.slack | string, nullable | A Slack incoming webhook (https://hooks.slack.com/…). | |
data.channels.webhook | string, nullable | ||
data.webhook_secret | string | ||
data.cooldown_minutes | integer | ||
data.enabled | boolean | ||
data.last_sent_at | string (date-time), nullable | ||
data.last_error | string, nullable | Why the last notification failed on some channel. | |
data.created_at | string (date-time), nullable | ||
data.updated_at | string (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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
alert | query | integer | Only this alert's matches. |
Responses
- 200 — Matches (replay at GET /sites/{site}/sessions/{session});
notifiedonce a notification included them. - 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | ||
data[].id | integer | ||
data[].alert_id | integer | ||
data[].session | string (uuid) | ||
data[].detail | string | ||
data[].at_ms | integer | ||
data[].notified | boolean |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
alert | path | integer | yes |
Responses
- 200 — The alert.
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.site_id | integer | ||
data.name | string | ||
data.trigger | object | error / 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.type | string | yes | One of: error, network, rage, dead, tag, page. |
data.trigger.value | string, nullable | At most 500 characters. | |
data.trigger.key | string | At most 64 characters. | |
data.channels | object | At 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.emails | string (email)[] | At most 10 items. | |
data.channels.slack | string, nullable | A Slack incoming webhook (https://hooks.slack.com/…). | |
data.channels.webhook | string, nullable | ||
data.webhook_secret | string | ||
data.cooldown_minutes | integer | ||
data.enabled | boolean | ||
data.last_sent_at | string (date-time), nullable | ||
data.last_error | string, nullable | Why the last notification failed on some channel. | |
data.created_at | string (date-time), nullable | ||
data.updated_at | string (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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
alert | path | integer | yes |
Request body
application/json, required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | At most 120 characters. |
trigger | object | yes | error / 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.type | string | yes | One of: error, network, rage, dead, tag, page. |
trigger.value | string, nullable | At most 500 characters. | |
trigger.key | string | At most 64 characters. | |
channels | object | yes | At 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.emails | string (email)[] | At most 10 items. | |
channels.slack | string, nullable | A Slack incoming webhook (https://hooks.slack.com/…). | |
channels.webhook | string, nullable | ||
cooldown_minutes | integer | At most one notification per this many minutes; the next one counts the matches held back. Minimum 1. Maximum 10080. Default 60. | |
enabled | boolean | Default true. |
Responses
- 200 — The alert.
- 404 — Missing, or another account's.
- 422 — Validation failed.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.site_id | integer | ||
data.name | string | ||
data.trigger | object | error / 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.type | string | yes | One of: error, network, rage, dead, tag, page. |
data.trigger.value | string, nullable | At most 500 characters. | |
data.trigger.key | string | At most 64 characters. | |
data.channels | object | At 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.emails | string (email)[] | At most 10 items. | |
data.channels.slack | string, nullable | A Slack incoming webhook (https://hooks.slack.com/…). | |
data.channels.webhook | string, nullable | ||
data.webhook_secret | string | ||
data.cooldown_minutes | integer | ||
data.enabled | boolean | ||
data.last_sent_at | string (date-time), nullable | ||
data.last_error | string, nullable | Why the last notification failed on some channel. | |
data.created_at | string (date-time), nullable | ||
data.updated_at | string (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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
alert | path | integer | yes |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
alert | path | integer | yes |
Responses
- 200 — The channels that failed, and why (empty when all worked).
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.failed | object |
bash
curl -X POST "https://your-site.com/api/v1/sites/{site}/alerts/{alert}/test" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"