Skip to content
StatusSupportDashboard

Add stream

POST/v1/streams/{namespace}

Monitor the livestream at the given stream URL. This method returns immediately.

Errors: 400 for an invalid body, with the reason in the message. 401 for a missing Authorization header. 403 for an invalid API key. 429 when the rate limit is exceeded. 5xx for transient internal failures. Retry 429 and 5xx with exponential backoff. Do not retry other 4xx errors, they indicate a problem with the request.

Path ParametersExpand Collapse
namespace: string

The namespace to ingest stream data into

Body ParametersJSONExpand Collapse
id: string
stream_url: string
ReturnsExpand Collapse
requestId: string
status: "accepted"

Add stream

curl https://api.safetykit.com/v1/streams/$NAMESPACE \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $SAFETYKIT_API_KEY" \
    -d '{
          "id": "YOUR_STREAM_ID",
          "stream_url": "https://cdn.example.com/20948D23.m3u8"
        }'
{
  "requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
  "status": "accepted"
}
Returns Examples
{
  "requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
  "status": "accepted"
}