Managed Streams API · Dashboard
Restream destinations
Push a channel or an input to YouTube, Twitch, Facebook, Kick, X, LinkedIn or any RTMP(S) or SRT target.
Base URL: https://api.hubfly.space. Use a Dashboard bearer token authorized for the project. Replace :projectId in each path with the Dashboard project ID. JSON routes use Content-Type: application/json.
Stream servers live in a project of type managed; other projects return 409 MANAGED_PROJECT_REQUIRED. Replace :instanceId with the stream server ID from the instance list. Each endpoint lists the permission it needs; a token scoped to the stream permissions must hold that exact permission.
How to use these endpoints
- Choose a
platformpreset (it fills the ingest URL) orcustomwith your ownurl, and thesource: a channel or an input. - The destination's
streamKeyis write-only; reads return astreamKeyHint. - With
autoStart, the destination starts whenever its source goes live. Otherwise start and stop it with live control (destination.start/destination.stop). - Bytes pushed to destinations are billed as bandwidth; restream copies cost no processing.
Restream a channel to YouTube
curl -X POST "https://api.hubfly.space/api/v1/projects/$PROJECT_ID/managed/instances/$INSTANCE_ID/stream/destinations/create" \
-H "Authorization: Bearer $HUBFLY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"YouTube","platform":"youtube","source":{"type":"channel","ref":"'"$CHANNEL_ID"'"},"streamKey":"'"$YOUTUBE_STREAM_KEY"'","autoStart":true}'The response uses the standard Dashboard envelope: ok, data, and meta on success. On failure, use the returned error code and message to decide whether to correct the request or retry. The exact schema and response codes for each operation are below.
Endpoint reference
Dashboard endpoints (5)
These JSON routes are served by the Hubfly space Dashboard API and use Dashboard project authorization.
| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/create | Create a restream destination |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations | List restream destinations |
| DELETE | /api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/:destinationId/delete | Delete a restream destination |
| GET | /api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/:destinationId | Read a restream destination |
| PUT | /api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/:destinationId/update | Update a restream destination |
POSTCreate a restream destinationDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/create
Add a target that receives a channel or an input over RTMP, RTMPS or SRT. The youtube, twitch, facebook, kick and x presets fill the protocol and ingest URL; linkedin and custom need a url. Defaults: rendition: "source" and autoStart: true, which starts the restream whenever the source goes live and stops it when the source ends.
- Requires
stream:admin. streamKeyis write-only: it is stored encrypted and shown afterwards only asstreamKeyHint.renditionissourceor one of the channel's ladder renditions; an input-fed destination can only usesource. URLs usertmp,rtmpsorsrtand may not point at private addresses.- A server holds up to 50 destinations. Invalid values return
422 STREAM_INVALIDwithdetails; a duplicate name returns409 STREAM_NAME_TAKEN.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
JSON request body
| Field | Type / allowed values | Required |
|---|---|---|
source | object | No |
protocol | rtmp | rtmps | srt | No |
url | string | No |
rendition | string | No |
autoStart | boolean | No |
name | string | Yes |
enabled | boolean | No |
platform | custom | youtube | twitch | facebook | kick | x | linkedin | Yes |
streamKey | string | Yes |
srtPassphrase | string | No |
Complete request schema
{
"type": "object",
"properties": {
"source": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"input",
"channel"
]
},
"ref": {
"type": "string"
}
},
"required": [
"type",
"ref"
],
"additionalProperties": false
},
"protocol": {
"type": "string",
"enum": [
"rtmp",
"rtmps",
"srt"
]
},
"url": {
"type": "string"
},
"rendition": {
"type": "string"
},
"autoStart": {
"type": "boolean"
},
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"platform": {
"type": "string",
"enum": [
"custom",
"youtube",
"twitch",
"facebook",
"kick",
"x",
"linkedin"
]
},
"streamKey": {
"type": "string"
},
"srtPassphrase": {
"type": "string",
"nullable": true
}
},
"required": [
"name",
"platform",
"streamKey"
],
"additionalProperties": false
}Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "destination": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "platform": { "type": "string", "enum": [ "custom", "youtube", "twitch", "facebook", "kick", "x", "linkedin" ] }, "enabled": { "type": "boolean" }, "source": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "input", "channel" ] }, "ref": { "type": "string" } }, "required": [ "type", "ref" ], "additionalProperties": false }, "protocol": { "type": "string", "enum": [ "rtmp", "rtmps", "srt" ] }, "url": { "type": "string" }, "rendition": { "type": "string" }, "autoStart": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "revision": { "type": "number" }, "streamKeyHint": { "type": "string", "nullable": true }, "hasSrtPassphrase": { "type": "boolean" } }, "required": [ "id", "name", "platform", "enabled", "source", "protocol", "url", "rendition", "autoStart", "createdAt", "updatedAt", "revision", "streamKeyHint", "hasSrtPassphrase" ], "additionalProperties": false }, "sync": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "pending", "applied" ] }, "generation": { "type": "number" }, "error": { "type": "string", "nullable": true }, "warnings": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "path", "code", "message" ], "additionalProperties": false } } }, "required": [ "status", "generation", "error", "warnings" ], "additionalProperties": false } }, "required": [ "destination", "sync" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "destination": { "id": "string", "name": "string", "platform": "custom", "enabled": true, "source": { "type": "input", "ref": "string" }, "protocol": "rtmp", "url": "string", "rendition": "string", "autoStart": true, "createdAt": "string", "updatedAt": "string", "revision": 0, "streamKeyHint": "string", "hasSrtPassphrase": true }, "sync": { "status": "pending", "generation": 0, "error": "string", "warnings": [ { "path": "string", "code": "string", "message": "string" } ] } }, "meta": { "requestId": "string", "timestamp": "string" } }
GETList restream destinationsDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations
List the server's restream destinations with their platform, source (a channel or an input), protocol, URL, rendition, autoStart, streamKeyHint and hasSrtPassphrase. Stream keys are never returned.
- Requires
stream:read.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "platform": { "type": "string", "enum": [ "custom", "youtube", "twitch", "facebook", "kick", "x", "linkedin" ] }, "enabled": { "type": "boolean" }, "source": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "input", "channel" ] }, "ref": { "type": "string" } }, "required": [ "type", "ref" ], "additionalProperties": false }, "protocol": { "type": "string", "enum": [ "rtmp", "rtmps", "srt" ] }, "url": { "type": "string" }, "rendition": { "type": "string" }, "autoStart": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "revision": { "type": "number" }, "streamKeyHint": { "type": "string", "nullable": true }, "hasSrtPassphrase": { "type": "boolean" } }, "required": [ "id", "name", "platform", "enabled", "source", "protocol", "url", "rendition", "autoStart", "createdAt", "updatedAt", "revision", "streamKeyHint", "hasSrtPassphrase" ], "additionalProperties": false } }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": [ { "id": "string", "name": "string", "platform": "custom", "enabled": true, "source": { "type": "input", "ref": "string" }, "protocol": "rtmp", "url": "string", "rendition": "string", "autoStart": true, "createdAt": "string", "updatedAt": "string", "revision": 0, "streamKeyHint": "string", "hasSrtPassphrase": true } ], "meta": { "requestId": "string", "timestamp": "string" } }
DELETEDelete a restream destinationDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/:destinationId/delete
Delete a destination and its stored stream key.
- Requires
stream:admin. - Refused with
409 STREAM_IN_USEwhile a schedule still uses the destination; the error lists thereferrers.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
destinationId | path | Yes | string | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "deleted": { "const": true, "type": "boolean" }, "sync": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "pending", "applied" ] }, "generation": { "type": "number" }, "error": { "type": "string", "nullable": true }, "warnings": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "path", "code", "message" ], "additionalProperties": false } } }, "required": [ "status", "generation", "error", "warnings" ], "additionalProperties": false } }, "required": [ "deleted", "sync" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "deleted": true, "sync": { "status": "pending", "generation": 0, "error": "string", "warnings": [ { "path": "string", "code": "string", "message": "string" } ] } }, "meta": { "requestId": "string", "timestamp": "string" } }
GETRead a restream destinationDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/:destinationId
Return one destination with its settings, revision, streamKeyHint and hasSrtPassphrase. The stream key itself is never returned.
- Requires
stream:read.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
destinationId | path | Yes | string | — |
Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "platform": { "type": "string", "enum": [ "custom", "youtube", "twitch", "facebook", "kick", "x", "linkedin" ] }, "enabled": { "type": "boolean" }, "source": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "input", "channel" ] }, "ref": { "type": "string" } }, "required": [ "type", "ref" ], "additionalProperties": false }, "protocol": { "type": "string", "enum": [ "rtmp", "rtmps", "srt" ] }, "url": { "type": "string" }, "rendition": { "type": "string" }, "autoStart": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "revision": { "type": "number" }, "streamKeyHint": { "type": "string", "nullable": true }, "hasSrtPassphrase": { "type": "boolean" } }, "required": [ "id", "name", "platform", "enabled", "source", "protocol", "url", "rendition", "autoStart", "createdAt", "updatedAt", "revision", "streamKeyHint", "hasSrtPassphrase" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "id": "string", "name": "string", "platform": "custom", "enabled": true, "source": { "type": "input", "ref": "string" }, "protocol": "rtmp", "url": "string", "rendition": "string", "autoStart": true, "createdAt": "string", "updatedAt": "string", "revision": 0, "streamKeyHint": "string", "hasSrtPassphrase": true }, "meta": { "requestId": "string", "timestamp": "string" } }
PUTUpdate a restream destinationDetails +/api/v1/projects/:projectId/managed/instances/:instanceId/stream/destinations/:destinationId/update
Change a destination's name, enabled state, source, protocol, URL, rendition or autoStart, or replace its streamKey or srtPassphrase. Omitted fields keep their value; the stored key stays unless you send a new one.
- Requires
stream:admin. - Send
revisionequal to the destination's currentrevision; if it changed meanwhile you get409 STREAM_REVISION_CONFLICT. - Invalid values return
422 STREAM_INVALIDwithdetails. Start and stop a restream live withdestination.startanddestination.stopin the control call.
Request parameters
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
projectId | path | Yes | string | — |
instanceId | path | Yes | string | — |
destinationId | path | Yes | string | — |
JSON request body
| Field | Type / allowed values | Required |
|---|---|---|
source | object | No |
protocol | rtmp | rtmps | srt | No |
url | string | No |
rendition | string | No |
autoStart | boolean | No |
name | string | No |
enabled | boolean | No |
streamKey | string | No |
srtPassphrase | string | No |
revision | number | Yes |
Complete request schema
{
"type": "object",
"properties": {
"source": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"input",
"channel"
]
},
"ref": {
"type": "string"
}
},
"required": [
"type",
"ref"
],
"additionalProperties": false
},
"protocol": {
"type": "string",
"enum": [
"rtmp",
"rtmps",
"srt"
]
},
"url": {
"type": "string"
},
"rendition": {
"type": "string"
},
"autoStart": {
"type": "boolean"
},
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"streamKey": {
"type": "string"
},
"srtPassphrase": {
"type": "string",
"nullable": true
},
"revision": {
"type": "number"
}
},
"required": [
"revision"
],
"additionalProperties": false
}Responses
200— Successful responseResponse schema
{ "type": "object", "properties": { "ok": { "const": true, "type": "boolean" }, "data": { "type": "object", "properties": { "destination": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "platform": { "type": "string", "enum": [ "custom", "youtube", "twitch", "facebook", "kick", "x", "linkedin" ] }, "enabled": { "type": "boolean" }, "source": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "input", "channel" ] }, "ref": { "type": "string" } }, "required": [ "type", "ref" ], "additionalProperties": false }, "protocol": { "type": "string", "enum": [ "rtmp", "rtmps", "srt" ] }, "url": { "type": "string" }, "rendition": { "type": "string" }, "autoStart": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "revision": { "type": "number" }, "streamKeyHint": { "type": "string", "nullable": true }, "hasSrtPassphrase": { "type": "boolean" } }, "required": [ "id", "name", "platform", "enabled", "source", "protocol", "url", "rendition", "autoStart", "createdAt", "updatedAt", "revision", "streamKeyHint", "hasSrtPassphrase" ], "additionalProperties": false }, "sync": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "pending", "applied" ] }, "generation": { "type": "number" }, "error": { "type": "string", "nullable": true }, "warnings": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "path", "code", "message" ], "additionalProperties": false } } }, "required": [ "status", "generation", "error", "warnings" ], "additionalProperties": false } }, "required": [ "destination", "sync" ], "additionalProperties": false }, "meta": { "type": "object", "properties": { "requestId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "requestId", "timestamp" ], "additionalProperties": false } }, "required": [ "ok", "data", "meta" ], "additionalProperties": false }Example response
{ "ok": true, "data": { "destination": { "id": "string", "name": "string", "platform": "custom", "enabled": true, "source": { "type": "input", "ref": "string" }, "protocol": "rtmp", "url": "string", "rendition": "string", "autoStart": true, "createdAt": "string", "updatedAt": "string", "revision": 0, "streamKeyHint": "string", "hasSrtPassphrase": true }, "sync": { "status": "pending", "generation": 0, "error": "string", "warnings": [ { "path": "string", "code": "string", "message": "string" } ] } }, "meta": { "requestId": "string", "timestamp": "string" } }