Update Push Stream
Update the information of push stream
curl -X POST "https://api.5centscdn.com/v2/streams/push/1001" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"server": "201",
"codec": "h264",
"draft": 0,
"protocols": [
"HLS",
"DASH"
],
"ingests": [
"RTMP"
]
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/push/1001"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"server": "201",
"codec": "h264",
"draft": 0,
"protocols": [
"HLS",
"DASH"
],
"ingests": [
"RTMP"
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/push/1001", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"server": "201",
"codec": "h264",
"draft": 0,
"protocols": [
"HLS",
"DASH"
],
"ingests": [
"RTMP"
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"server": "201",
"codec": "h264",
"draft": 0,
"protocols": [
"HLS",
"DASH"
],
"ingests": [
"RTMP"
]
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/push/1001", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/streams/push/1001')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"server": "201",
"codec": "h264",
"draft": 0,
"protocols": [
"HLS",
"DASH"
],
"ingests": [
"RTMP"
]
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Stream Updated",
"stream": {
"monitoring_id": 12345,
"type": "push",
"id": "monitor-12345",
"serviceid": 103,
"name": "sample/stream",
"codec": "h264",
"ingests": [
null,
null
],
"protocols": [
[
"HLS"
],
[
"HLS"
]
],
"parentid": null,
"server": "201",
"backup": "",
"dedicatedLTC": "0",
"hasAdvancedFeatures": "0",
"monitoring_triggers": "[3,1,0]",
"draft": "0",
"disabled": "0",
"created_at": "2026-01-01 00:00:00",
"updated_at": "2026-04-30 11:23:14",
"lastseen_at": false,
"deleted": null,
"ingestsLock": 0,
"protocolsLock": 0,
"status": "Deploying",
"has": {
"rtmp": 0,
"rtsp": 0,
"hls": 1,
"dash": 0,
"rtmpauth": false
},
"fms": {
"server": {
"country": "Oceania",
"meta": {
"fmsUrl": "rtmp://fms-01-01.5centscdn.com"
}
}
},
"parts": {
"pp": "sample",
"sn": "test",
"full": "samplestream"
},
"restream": {},
"playbackurls": {
"scheme": "https",
"url_prefix": "https://stream-abc12-hls-live.stream.example.com",
"rtmp": "rtmp://rtmp.5centscdn.com:1935/",
"rtsp": "rtsp://rtsp.5centscdn.com:554/",
"hlsManifest": "playlist.m3u8",
"dashManifest": "manifest.mpd",
"hls": "https://hash-hls-live.5centscdn.com",
"dash": "https://hash-hls-live.5centscdn.com",
"players": {
"flowplayer": {
"baseQ": "",
"base": "https://cdn.example.com/flowplayer/hls/",
"hls": "https://cdn.example.com/flowplayer/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"videojs": {
"baseQ": "",
"base": "https://cdn.example.com/videojs/hls/",
"hls": "https://cdn.example.com/videojs/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"own": {
"hashes": {
"stream-abc12-hls-live.stream.example.com": {
"hash": "def34hash",
"hls": "https://hash-hls-live.5centscdn.com",
"base64": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
"dash": "https://hash-hls-live.5centscdn.com",
"base64dash": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
}
},
"baseQ": "?showcv=true&title=sample/stream",
"base": "https://cdn.example.com/player/hls/skin1/def34hash/",
"hls": "https://cdn.example.com/player/hls/skin1/def34hash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=sample/stream",
"dash": "https://cdn.example.com/player/dash/skin1/def34hash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=sample/stream"
}
},
"tokenized": null
},
"platformsCount": 0,
"ssl_enabled": true,
"hash": "test",
"ndvr": {
"enabled": "N",
"retention": "8"
},
"securetoken": {
"enabled": "N",
"policy": "D",
"keyip": "N",
"list": "",
"timeout": 3600,
"session": "0",
"ips": "",
"dirs": null,
"active": "N"
},
"record": {
"enabled": "N",
"retention": "3",
"stream": null
},
"domainlock": {
"enabled": "N",
"policy": "Y",
"list": "example.com,docs.example.com",
"ips": "",
"noreferer": "N",
"active": "N"
},
"geoblock": {
"enabled": "N",
"policy": "N",
"list": [
""
],
"ips": "",
"active": "N"
},
"ipaccess": {
"enabled": "N",
"policy": "N",
"list": "",
"ips": "",
"active": "N"
},
"useragent": {
"enabled": "N",
"policy": "Y",
"list": "",
"ips": "",
"casesensitive": "N",
"active": "N",
"listArr": [
""
]
},
"rtmpauth": {
"password": "",
"active": "N"
},
"transcode": {
"ltc": 0,
"type": "mixed",
"enabled": false,
"isEditable": true
},
"platforms": [],
"messages": {},
"adInsertion": null
},
"warnings": null,
"errors": null
}
/streams/push/{streamid}Target server for requests. Edit to use your own host.
API key (sent in header)
Stream ID
The media type of the request body
Server ID(s) for the stream. Use comma-separated values for multiple servers. Value must be one of the server codes returned by the GET /streams/push/servers call.
Video codec for the stream. Allowed values: h264, h265.
Set to 0 to publish the stream, or 1 to save it as a draft.
Output protocols to enable for the stream. Send every protocol that should remain enabled; any protocol omitted from the array is disabled. Allowed values: RTMP, RTSP, DASH, HLS. Read-only when the stream's protocolsLock is 1; enabling a new output protocol requires review and activation by the support team.
Input (ingest) protocol for the stream. Send a one-item array with the selected protocol, or an empty array to clear the selection; only one protocol can be active at a time. RTMP is always available. The advanced protocols (RTMPS, RTSP, SRT, WHIP, ZIXI, RIST, ICECAST) are Advanced Protocol Features and can only be submitted once the stream's hasAdvancedFeatures flag is enabled; enabling this flag requires review and activation by the support team. Read-only when the stream's ingestsLock is greater than 0. Allowed values: RTMP, RTMPS, RTSP, SRT, WHIP, ZIXI, RIST, ICECAST.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Body
Server ID(s) for the stream. Use comma-separated values for multiple servers. Value must be one of the server codes returned by the GET /streams/push/servers call.
201Output protocols to enable for the stream. Send every protocol that should remain enabled; any protocol omitted from the array is disabled. Allowed values: RTMP, RTSP, DASH, HLS. Read-only when the stream's protocolsLock is 1; enabling a new output protocol requires review and activation by the support team.
["HLS","DASH"]Input (ingest) protocol for the stream. Send a one-item array with the selected protocol, or an empty array to clear the selection; only one protocol can be active at a time. RTMP is always available. The advanced protocols (RTMPS, RTSP, SRT, WHIP, ZIXI, RIST, ICECAST) are Advanced Protocol Features and can only be submitted once the stream's hasAdvancedFeatures flag is enabled; enabling this flag requires review and activation by the support team. Read-only when the stream's ingestsLock is greater than 0. Allowed values: RTMP, RTMPS, RTSP, SRT, WHIP, ZIXI, RIST, ICECAST.
["RTMP"]Responses
Status of the API response.
Human-readable message describing the result.
Stream object containing configuration and status details.
Non-fatal warnings returned with the response.
Errors returned with the response.