DHUB bridges
A bridge is DCAST's multi-source, multi-destination broadcast routing element. You attach one or more ingest sources (RTMP push, SRT listener, SRTLA bonded uplink, WHIP, HLS pull, RTSP pull) and one or more egress destinations (RTMP/RTMPS to YouTube / Twitch / Facebook / custom, SRT caller, WHEP, HLS). The bridge handles failover, transcode, and per-destination key rotation.
Partner-API headline subset. Director-mode, WHEP playback URLs, SRTLA modem labels, failover policies, slates and network probe live on the dashboard surface (operator-grade). File a feature request via support if you need API access to any of those.
Bridge lifecycle
# 1. Create a source (the bridge's ingest point).
POST https://api.dcast.pro/api/v1/bridges/sources
{
"name": "Stadium hard camera",
"protocol": "rtmps" // rtmps | srt_listener | srt_caller | srtla | whip | hls_pull | rtsp_pull
}
# → 201 { data: { id, ingressKey, ... } }
# ingressKey is the per-source authentication token your encoder publishes with.
# 2. Create the bridge, optionally pinning the primary source up front.
POST https://api.dcast.pro/api/v1/bridges
{
"name": "World Cup final",
"primarySourceId": "<src_id>",
"reconnectWindowS": 60,
"ipAllowlistCidrs": ["203.0.113.0/24"] // optional ingress IP gate
}
# → 201 { data: { id, jwtCurrentKey, primarySource: { ingressKey, ... }, destinations: [] } }
# 3. Add destinations (where the bridge sends).
POST https://api.dcast.pro/api/v1/bridges/{bridgeId}/destinations
{
"name": "YouTube primary",
"protocol": "rtmps", // rtmps | srt_caller | whep | hls_public | custom
"targetUrl": "rtmps://a.rtmps.youtube.com/live2/<stream-key>",
"transcodeProfile": "passthrough", // "passthrough" or a profile id
"enabled": true
}
# Internal/private IPs in targetUrl are rejected — 400 INVALID_URL (SSRF guard).
# 4. Start the bridge.
POST https://api.dcast.pro/api/v1/bridges/{bridgeId}/start
# 5. Stop when finished.
POST https://api.dcast.pro/api/v1/bridges/{bridgeId}/stop
Sources
| Method | Path | Notes |
|---|
| GET | https://api.dcast.pro/api/v1/bridges/sources | List your sources (owner-scoped). |
| POST | https://api.dcast.pro/api/v1/bridges/sources | Create source. Required: name, protocol. Returns ingressKey. |
| DELETE | https://api.dcast.pro/api/v1/bridges/sources/{sourceId} | Delete. Not blocked by an attached bridge — that bridge's primarySourceId becomes null. |
Bridges
| Method | Path | Notes |
|---|
| GET | https://api.dcast.pro/api/v1/bridges | List (newest first). |
| POST | https://api.dcast.pro/api/v1/bridges | Create. jwtCurrentKey is minted for ingress auth. |
| GET | https://api.dcast.pro/api/v1/bridges/{id} | Read one + last 50 events. |
| PATCH | https://api.dcast.pro/api/v1/bridges/{id} | Update name / primarySourceId / backupSourceIds / reconnectWindowS / ipAllowlistCidrs. |
| DELETE | https://api.dcast.pro/api/v1/bridges/{id} | 409 BRIDGE_LIVE if status is on_air or starting — stop first. |
| POST | https://api.dcast.pro/api/v1/bridges/{id}/start | Spin up worker assignment + per-destination ffmpeg. |
| POST | https://api.dcast.pro/api/v1/bridges/{id}/stop | Tear down. |
Destinations
| Method | Path | Notes |
|---|
| GET | https://api.dcast.pro/api/v1/bridges/{id}/destinations | List destinations on a bridge. |
| POST | https://api.dcast.pro/api/v1/bridges/{id}/destinations | Add. SSRF-guarded. |
| PATCH | https://api.dcast.pro/api/v1/bridges/destinations/{destId} | Update name / targetUrl / enabled / transcodeProfile / videoCodec / lufsTarget. |
| DELETE | https://api.dcast.pro/api/v1/bridges/destinations/{destId} | Remove. |
Operations
Beyond CRUD + start/stop, partner-API exposes the following operator endpoints:
| Method | Path | Notes |
|---|
| POST | https://api.dcast.pro/api/v1/bridges/{id}/rotate-key | Mint a new jwtCurrentKey; the old key becomes jwtPreviousKey and stays valid for the publish-grace window. |
| GET | https://api.dcast.pro/api/v1/bridges/{id}/events | Paginated event log (?limit ≤ 200). Type / fromState / toState / reason / createdAt. |
| PATCH | https://api.dcast.pro/api/v1/bridges/{id}/tally-endpoints | Set the Tally TSL UMD destinations. Body: { tallyEndpoints: [{ url, name }] }. URLs SSRF-guarded. |
| POST | https://api.dcast.pro/api/v1/bridges/{id}/return-pgm/start | Turn on Phase 5.5d Return-PGM feed (host viewing the published program output). |
| POST | https://api.dcast.pro/api/v1/bridges/{id}/return-pgm/stop | Turn it off. |
Errors
| Code | HTTP | Meaning |
|---|
BAD_REQUEST | 400 | missing or invalid field (e.g. unknown protocol) |
INVALID_REF | 400 | primarySourceId or slateId not owned by you |
INVALID_URL | 400 | destination targetUrl SSRF-blocked (private / loopback / link-local) |
DHUB_REQUIRES_ADDON | 403 | creating a bridge, source or destination, reading a bridge, or starting one needs the DHUB add-on (or a plan that includes it) |
NOT_FOUND | 404 | bridge / source / destination not yours |
BRIDGE_LIVE | 409 | cannot delete a live bridge — stop first |
SERVICE_UNAVAILABLE | 503 | internal lifecycle service down — retry |
Related
- Restreams — simpler one-source-many-dest flow without director-mode.
- Recording — bridge sessions can be captured for replay.