Add Platform
Add the platform of a push stream
curl -X POST "https://api.5centscdn.com/v2/streams/push/1001/platforms" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[ltc]": 0,
"platform[vprofiles]": 106257,
"platform[aprofiles]": 106257,
"platform[filters]": [
3,
4
],
"platform[schedule]": "instant",
"platform[scheduleontime]": "14:00",
"platform[scheduleondatetime]": "2026-01-01 00:00:00",
"platform[length]": 40
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/push/1001/platforms"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[ltc]": 0,
"platform[vprofiles]": 106257,
"platform[aprofiles]": 106257,
"platform[filters]": [
3,
4
],
"platform[schedule]": "instant",
"platform[scheduleontime]": "14:00",
"platform[scheduleondatetime]": "2026-01-01 00:00:00",
"platform[length]": 40
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/push/1001/platforms", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[ltc]": 0,
"platform[vprofiles]": 106257,
"platform[aprofiles]": 106257,
"platform[filters]": [
3,
4
],
"platform[schedule]": "instant",
"platform[scheduleontime]": "14:00",
"platform[scheduleondatetime]": "2026-01-01 00:00:00",
"platform[length]": 40
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[ltc]": 0,
"platform[vprofiles]": 106257,
"platform[aprofiles]": 106257,
"platform[filters]": [
3,
4
],
"platform[schedule]": "instant",
"platform[scheduleontime]": "14:00",
"platform[scheduleondatetime]": "2026-01-01 00:00:00",
"platform[length]": 40
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/push/1001/platforms", 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/platforms')
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 = '{
"platform[name]": "Custom RTMP",
"platform[rtmp]": "rtmp://rtmp.5centscdn.com:1935/",
"platform[key]": "password",
"platform[auth]": "Y",
"platform[username]": "admin",
"platform[password]": "password",
"platform[ltc]": 0,
"platform[vprofiles]": 106257,
"platform[aprofiles]": 106257,
"platform[filters]": [
3,
4
],
"platform[schedule]": "instant",
"platform[scheduleontime]": "14:00",
"platform[scheduleondatetime]": "2026-01-01 00:00:00",
"platform[length]": 40
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Platform Created",
"stream": {
"type": "push",
"id": 51605,
"serviceid": 103,
"name": "kola/deloa",
"codec": "h264",
"protocols": [
[
"HLS"
],
[
"HLS"
]
],
"parentid": null,
"server": "201",
"backup": "",
"draft": "0",
"disabled": "0",
"created_at": "2024-12-30 02:57:15",
"updated_at": "2024-12-30 03:36:27",
"lastseen_at": false,
"deleted": null,
"protocolsLock": 1,
"status": "Deploying",
"has": {
"rtmp": 0,
"rtsp": 0,
"hls": 1,
"dash": 0,
"rtmpauth": true
},
"fms": {
"server": {
"country": "Oceania",
"meta": {
"fmsUrl": "rtmp://fms-01-01.5centscdn.com"
}
}
},
"parts": {
"pp": "kola",
"sn": "deloa",
"full": "koladeloa"
},
"restream": {},
"playbackurls": {
"scheme": "http",
"url_prefix": "http://onetwo.5centscdndemo.ca",
"rtmp": "rtmp://rtmp.5centscdn.com:1935/",
"rtsp": "rtsp://rtsp.5centscdn.com:554/",
"hlsManifest": "playlist_dvr.m3u8",
"dashManifest": "manifest_dvr.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://hash-hls-live.5centscdn.com"
},
"videojs": {
"baseQ": "",
"base": "https://cdn.example.com/videojs/hls/",
"hls": "https://hash-hls-live.5centscdn.com"
},
"own": {
"hashes": {
"hash": "4vwupwi1g6ecej9r",
"hls": "https://hash-hls-live.5centscdn.com",
"dash": "https://hash-hls-live.5centscdn.com",
"base64": "aHR0cDovL2V4YW1wbGUuY29tL3BsYXlsaXN0Lm0zdTg=",
"base64dash": "aHR0cDovL2V4YW1wbGUuY29tL21hbmlmZXN0Lm1wZA=="
},
"baseQ": "?showcv=true&title=kola/deloa",
"base": "https://cdn.example.com/player/hls/skin1/example",
"hls": "https://hash-hls-live.5centscdn.com",
"dash": "https://hash-hls-live.5centscdn.com"
}
}
},
"platformsCount": 1,
"ssl_enabled": false,
"hash": "fa7d3f6b626222cd40d75e09ec026da1.sdp",
"ndvr": {
"enabled": "Y",
"retention": "33"
},
"securetoken": {
"enabled": "Y",
"policy": "F",
"keyip": "Y",
"list": "",
"timeout": 3600,
"session": "0",
"ips": "1.1.1.1,2.2.2.2",
"dirs": null,
"active": "N"
},
"record": {
"enabled": "Y",
"retention": "14",
"stream": null
},
"domainlock": {
"enabled": "Y",
"policy": "N",
"list": "",
"ips": "1.1.1.1,2.2.2.2",
"noreferer": "Y",
"active": "Y"
},
"geoblock": {
"enabled": "Y",
"policy": "N",
"list": [
"GB",
"US"
],
"ips": "1.1.1.1,2.2.2.2",
"active": "Y"
},
"ipaccess": {
"enabled": "Y",
"policy": "Y",
"list": "8.8.8.8,9.9.9.9",
"ips": "1.1.1.1",
"active": "Y"
},
"useragent": {
"enabled": "Y",
"policy": "Y",
"list": "Array",
"ips": "1.1.1.1",
"casesensitive": "Y",
"active": "Y",
"listArr": [
"Mozilla/5.0",
"Chrome/91.0"
]
},
"rtmpauth": {
"password": "passsword",
"active": "N"
},
"transcode": {
"id": 51605,
"type": "mixed",
"ltc": 2,
"vprofiles": [
"12345",
"12345"
],
"aprofiles": [
"12345"
],
"filters": [
"3",
"4"
],
"disabled": "0",
"warnings": [
"'source' profile cannot be enabled when filters are active."
],
"enabled": true,
"count": 2,
"countRaw": 2,
"codec": null,
"profiles": {
"count": {
"total": 0
}
},
"isEditable": true
},
"platforms": [
{
"id": 42086,
"relid": 51605,
"name": "Custom RTMP",
"rtmp": "rtmp://rtmp.5centscdn.com:1935/",
"key": "password",
"auth": "Y",
"username": "admin",
"password": "password",
"schedule": "instant",
"scheduletime": null,
"length": "00:00",
"platform_id": 1,
"provider_id": 0,
"video_id": "",
"disabled": "0",
"transcode": {
"type": "sd",
"enabled": false,
"isEditable": true
}
}
]
}
}
/streams/push/{streamid}/platformsTarget server for requests. Edit to use your own host.
API key (sent in header)
Stream ID
The media type of the request body
The name of the platform. Examples include Custom RTMP or YouTube.
The RTMP URL used for streaming to the platform.
The stream key required for authentication with the platform.
Indicates if authentication is required. Y means enabled, N means not required.
The username for platform authentication.
The password for platform authentication, paired with the username.
A configuration setting related to the platform. 1 means enabled, 0 means disabled.
The video profile identifier used by the platform. Specifies the quality or format of the video stream.
The audio profile identifier used by the platform. Specifies the quality or format of the audio stream.
A list of filter IDs applied to the platform stream.
The scheduling type for the platform stream. Values include instant or scheduled.
The specific time for a scheduled stream in hh:mm format. Used when schedule is scheduleontime.
The full date and time for a scheduled stream. Used when schedule is scheduleondatetime.
The duration of the stream in minutes.
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
The name of the platform. Examples include Custom RTMP or YouTube.
Custom RTMPThe RTMP URL used for streaming to the platform.
rtmp://rtmp.5centscdn.com:1935/Indicates if authentication is required. Y means enabled, N means not required.
YThe password for platform authentication, paired with the username.
passwordA configuration setting related to the platform. 1 means enabled, 0 means disabled.
0The video profile identifier used by the platform. Specifies the quality or format of the video stream.
106257The audio profile identifier used by the platform. Specifies the quality or format of the audio stream.
106257The scheduling type for the platform stream. Values include instant or scheduled.
instantThe specific time for a scheduled stream in hh:mm format. Used when schedule is scheduleontime.
14:00The full date and time for a scheduled stream. Used when schedule is scheduleondatetime.
2026-01-01 00:00:00Responses
Status of the API response.
Human-readable message describing the result.
Stream object containing configuration and status details.