Skip to main content
POST
/
rtstream
/
{stream_id}
/
index
/
{scene_index_id}
/
alert
Create RTStream alert
curl --request POST \
  --url https://api.videodb.io/rtstream/{stream_id}/index/{scene_index_id}/alert \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "event_id": "event-12345",
  "callback_url": "https://webhook.example.com/alert",
  "ws_connection_id": "conn-123"
}
'
{
  "success": true,
  "data": {
    "alert_id": "alert-12345"
  }
}
Create an alert that triggers when a detection event matches on a stream’s scene index. Alerts can send webhooks or WebSocket notifications.
  • event_id is required - must reference an existing detection event
  • Use callback_url for HTTP webhook notifications when the event is detected
  • Use ws_connection_id for real-time WebSocket notifications
  • Alerts are created in enabled status by default

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Path Parameters

stream_id
string
required
Example:

"rts-12345"

scene_index_id
string
required
Example:

"scene-idx-12345"

Body

application/json
event_id
string
required
Example:

"event-12345"

callback_url
string
Example:

"https://webhook.example.com/alert"

ws_connection_id
string
Example:

"conn-123"

Response

200 - application/json

Alert created

success
boolean
Example:

true

data
object