RoomScope

Last updated

Alerts

Alert rules that fire on LIVE events (webhook, email, in-app, Telegram).

Every operation authenticates with an API key (Authorization: Bearer <key>) and errors use the shared envelope described in Errors. Generated from the API's OpenAPI document.

List alert rules

GET/v1/alerts/rules

Every rule of the workspace with its channels. Signing secrets are never returned again.

Scopewebhook:manageCreditsFree

Request

curl "https://api.roomscope.io/v1/alerts/rules" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

200 OK
{  "rules": [    {      "id": "7d01133d-6ecb-5101-a9c0-e23e4755bad9",      "name": "Envelopes from Linh",      "creatorUniqueId": "linh.live",      "region": null,      "eventTypes": [        "envelope"      ],      "minScore": null,      "minRate": null,      "minDiamondCount": 100,      "goodyBagAllowAllViewers": null,      "goodyBagMaxRequiredLevel": null,      "enabled": true,      "createdAt": "2026-11-01T10:51:45.582Z",      "updatedAt": "2026-11-01T10:51:45.582Z",      "channels": [        {          "id": "3d0d4dc5-6993-55ab-a1cd-ffbe7db95507",          "channelType": "in_app",          "target": null,          "enabled": true,          "hasSigningSecret": false        }      ]    }  ]}

Errors

  • 400 Invalid parameter or body; code names the problem.
  • 401 Missing or unknown API key.
  • 403 The key lacks the scope, or the plan does not include the feature.
  • 429 Request rate exceeded; honour Retry-After.

Create an alert rule

POST/v1/alerts/rules

A rule watches one creator (or a whole region) for event types and delivers to its channels. A webhook channel's signing secret is returned once, in webhookSecrets.

Scopewebhook:manageCreditsFree

Request body

Body of POST /v1/alerts/rules
NameTypeDescription
nameRequired
stringShown in notifications.
creatorUniqueIdOptional
string | nullWatch one creator; omit for all of the region.
regionOptional
string | null
eventTypesOptional
("gift" | "envelope" | "goodyBag" | "*")[]
minDiamondCountOptional
integer | nullIgnore events worth fewer diamonds.
enabledOptional
boolean
Default: true
channelsOptional
object[]

Request

curl -X POST "https://api.roomscope.io/v1/alerts/rules" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY" \  -H "Content-Type: application/json" \  -d '{"name":"Envelopes from Linh","creatorUniqueId":"linh.live","eventTypes":["envelope"],"minDiamondCount":100,"channels":[{"channelType":"webhook","target":"https://example.com/hooks/roomscope"}]}'

Response

201 Created
{  "rule": {    "id": "7d01133d-6ecb-5101-a9c0-e23e4755bad9",    "name": "Envelopes from Linh",    "creatorUniqueId": "linh.live",    "region": null,    "eventTypes": [      "envelope"    ],    "minScore": null,    "minRate": null,    "minDiamondCount": 100,    "goodyBagAllowAllViewers": null,    "goodyBagMaxRequiredLevel": null,    "enabled": true,    "createdAt": "2026-11-01T10:51:45.582Z",    "updatedAt": "2026-11-01T10:51:45.582Z",    "channels": [      {        "id": "3d0d4dc5-6993-55ab-a1cd-ffbe7db95507",        "channelType": "in_app",        "target": null,        "enabled": true,        "hasSigningSecret": false      }    ]  },  "webhookSecrets": []}

Errors

  • 400 Invalid parameter or body; code names the problem.
  • 401 Missing or unknown API key.
  • 403 The key lacks the scope, or the plan does not include the feature.
  • 429 Request rate exceeded; honour Retry-After.

Update an alert rule

PATCH/v1/alerts/rules/{rule_id}

Send only the fields to change; channels replaces the whole list.

Scopewebhook:manageCreditsFree

Path parameters

Path parameters of PATCH /v1/alerts/rules/{rule_id}
NameTypeDescription
rule_idRequired
stringAlert rule id (UUID).

Request body

Body of PATCH /v1/alerts/rules/{rule_id}
NameTypeDescription
nameOptional
stringShown in notifications.
creatorUniqueIdOptional
string | nullWatch one creator; omit for all of the region.
regionOptional
string | null
eventTypesOptional
("gift" | "envelope" | "goodyBag" | "*")[]
minDiamondCountOptional
integer | nullIgnore events worth fewer diamonds.
enabledOptional
boolean
Default: true
channelsOptional
object[]

Request

curl -X PATCH "https://api.roomscope.io/v1/alerts/rules/7d01133d-6ecb-5101-a9c0-e23e4755bad9" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY" \  -H "Content-Type: application/json" \  -d '{"enabled":false}'

Response

200 OK
{  "id": "7d01133d-6ecb-5101-a9c0-e23e4755bad9",  "name": "Envelopes from Linh",  "creatorUniqueId": "linh.live",  "region": null,  "eventTypes": [    "envelope"  ],  "minScore": null,  "minRate": null,  "minDiamondCount": 100,  "goodyBagAllowAllViewers": null,  "goodyBagMaxRequiredLevel": null,  "enabled": true,  "createdAt": "2026-11-01T10:51:45.582Z",  "updatedAt": "2026-11-01T10:51:45.582Z",  "channels": [    {      "id": "3d0d4dc5-6993-55ab-a1cd-ffbe7db95507",      "channelType": "in_app",      "target": null,      "enabled": true,      "hasSigningSecret": false    }  ]}

Errors

  • 400 Invalid parameter or body; code names the problem.
  • 401 Missing or unknown API key.
  • 403 The key lacks the scope, or the plan does not include the feature.
  • 429 Request rate exceeded; honour Retry-After.

Delete an alert rule

DELETE/v1/alerts/rules/{rule_id}

Deletes the rule and its channels. Returns no body.

Scopewebhook:manageCreditsFree

Path parameters

Path parameters of DELETE /v1/alerts/rules/{rule_id}
NameTypeDescription
rule_idRequired
stringAlert rule id (UUID).

Request

curl -X DELETE "https://api.roomscope.io/v1/alerts/rules/7d01133d-6ecb-5101-a9c0-e23e4755bad9" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

204 with no body.

Errors

  • 400 Invalid parameter or body; code names the problem.
  • 401 Missing or unknown API key.
  • 403 The key lacks the scope, or the plan does not include the feature.
  • 429 Request rate exceeded; honour Retry-After.

Send a test notification

POST/v1/alerts/rules/{rule_id}/test

Delivers a synthetic event to every enabled channel of the rule.

Scopewebhook:manageCreditsFree

Path parameters

Path parameters of POST /v1/alerts/rules/{rule_id}/test
NameTypeDescription
rule_idRequired
stringAlert rule id (UUID).

Request

curl -X POST "https://api.roomscope.io/v1/alerts/rules/7d01133d-6ecb-5101-a9c0-e23e4755bad9/test" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

200 OK
{  "enqueued": 1}

Errors

  • 400 Invalid parameter or body; code names the problem.
  • 401 Missing or unknown API key.
  • 403 The key lacks the scope, or the plan does not include the feature.
  • 429 Request rate exceeded; honour Retry-After.
Was this page helpful?