Create Pull Stream
Create a restream
curl -X POST "https://api.5centscdn.com/v2/streams/restream/new" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"_METHOD": "PUT",
"name": "otilor/dongooo",
"codec": "h264",
"protocols": [
"HLS"
],
"restreamtype": "mediaserver",
"server[mediaserver]": "11,211",
"mode[mediaserver]": "hls",
"url[mediaserver][]": "https://test.co",
"audiofix": "N",
"draft": 0,
"domainlock[enabled]": "Y",
"domainlock[policy]": "Y",
"domainlock[list]": "example.com,docs.example.com",
"domainlock[noreferer]": "N",
"domainlock[ips]": "",
"geoblock[enabled]": "Y",
"geoblock[policy]": "Y",
"geoblock[list][]": "",
"geoblock[ips]": "",
"ipaccess[enabled]": "Y",
"ipaccess[policy]": "N",
"ipaccess[list]": "",
"ipaccess[ips]": "",
"ndvr[enabled]": "Y",
"ndvr[retention]": 5,
"record[server]": 1,
"record[enabled]": "Y",
"record[retention]": 3,
"securetoken[enabled]": "Y",
"securetoken[policy]": "D",
"securetoken[list]": "32862cdb6276e19a",
"securetoken[ips]": "",
"securetoken[keyip]": "N",
"securetoken[session]": "0",
"securetoken[timeout]": 3600,
"securetoken[active]": "Y",
"useragent[enabled]": "Y",
"useragent[policy]": "Y",
"useragent[list]": "",
"useragent[casesensitive]": "N",
"useragent[ips]": "",
"vprofiles": [
14931,
14937
],
"aprofiles": [
14931
],
"filters": [
3,
4
]
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/restream/new"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"_METHOD": "PUT",
"name": "otilor/dongooo",
"codec": "h264",
"protocols": [
"HLS"
],
"restreamtype": "mediaserver",
"server[mediaserver]": "11,211",
"mode[mediaserver]": "hls",
"url[mediaserver][]": "https://test.co",
"audiofix": "N",
"draft": 0,
"domainlock[enabled]": "Y",
"domainlock[policy]": "Y",
"domainlock[list]": "example.com,docs.example.com",
"domainlock[noreferer]": "N",
"domainlock[ips]": "",
"geoblock[enabled]": "Y",
"geoblock[policy]": "Y",
"geoblock[list][]": "",
"geoblock[ips]": "",
"ipaccess[enabled]": "Y",
"ipaccess[policy]": "N",
"ipaccess[list]": "",
"ipaccess[ips]": "",
"ndvr[enabled]": "Y",
"ndvr[retention]": 5,
"record[server]": 1,
"record[enabled]": "Y",
"record[retention]": 3,
"securetoken[enabled]": "Y",
"securetoken[policy]": "D",
"securetoken[list]": "32862cdb6276e19a",
"securetoken[ips]": "",
"securetoken[keyip]": "N",
"securetoken[session]": "0",
"securetoken[timeout]": 3600,
"securetoken[active]": "Y",
"useragent[enabled]": "Y",
"useragent[policy]": "Y",
"useragent[list]": "",
"useragent[casesensitive]": "N",
"useragent[ips]": "",
"vprofiles": [
14931,
14937
],
"aprofiles": [
14931
],
"filters": [
3,
4
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/restream/new", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"_METHOD": "PUT",
"name": "otilor/dongooo",
"codec": "h264",
"protocols": [
"HLS"
],
"restreamtype": "mediaserver",
"server[mediaserver]": "11,211",
"mode[mediaserver]": "hls",
"url[mediaserver][]": "https://test.co",
"audiofix": "N",
"draft": 0,
"domainlock[enabled]": "Y",
"domainlock[policy]": "Y",
"domainlock[list]": "example.com,docs.example.com",
"domainlock[noreferer]": "N",
"domainlock[ips]": "",
"geoblock[enabled]": "Y",
"geoblock[policy]": "Y",
"geoblock[list][]": "",
"geoblock[ips]": "",
"ipaccess[enabled]": "Y",
"ipaccess[policy]": "N",
"ipaccess[list]": "",
"ipaccess[ips]": "",
"ndvr[enabled]": "Y",
"ndvr[retention]": 5,
"record[server]": 1,
"record[enabled]": "Y",
"record[retention]": 3,
"securetoken[enabled]": "Y",
"securetoken[policy]": "D",
"securetoken[list]": "32862cdb6276e19a",
"securetoken[ips]": "",
"securetoken[keyip]": "N",
"securetoken[session]": "0",
"securetoken[timeout]": 3600,
"securetoken[active]": "Y",
"useragent[enabled]": "Y",
"useragent[policy]": "Y",
"useragent[list]": "",
"useragent[casesensitive]": "N",
"useragent[ips]": "",
"vprofiles": [
14931,
14937
],
"aprofiles": [
14931
],
"filters": [
3,
4
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"_METHOD": "PUT",
"name": "otilor/dongooo",
"codec": "h264",
"protocols": [
"HLS"
],
"restreamtype": "mediaserver",
"server[mediaserver]": "11,211",
"mode[mediaserver]": "hls",
"url[mediaserver][]": "https://test.co",
"audiofix": "N",
"draft": 0,
"domainlock[enabled]": "Y",
"domainlock[policy]": "Y",
"domainlock[list]": "example.com,docs.example.com",
"domainlock[noreferer]": "N",
"domainlock[ips]": "",
"geoblock[enabled]": "Y",
"geoblock[policy]": "Y",
"geoblock[list][]": "",
"geoblock[ips]": "",
"ipaccess[enabled]": "Y",
"ipaccess[policy]": "N",
"ipaccess[list]": "",
"ipaccess[ips]": "",
"ndvr[enabled]": "Y",
"ndvr[retention]": 5,
"record[server]": 1,
"record[enabled]": "Y",
"record[retention]": 3,
"securetoken[enabled]": "Y",
"securetoken[policy]": "D",
"securetoken[list]": "32862cdb6276e19a",
"securetoken[ips]": "",
"securetoken[keyip]": "N",
"securetoken[session]": "0",
"securetoken[timeout]": 3600,
"securetoken[active]": "Y",
"useragent[enabled]": "Y",
"useragent[policy]": "Y",
"useragent[list]": "",
"useragent[casesensitive]": "N",
"useragent[ips]": "",
"vprofiles": [
14931,
14937
],
"aprofiles": [
14931
],
"filters": [
3,
4
]
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/restream/new", 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/restream/new')
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 = '{
"_METHOD": "PUT",
"name": "otilor/dongooo",
"codec": "h264",
"protocols": [
"HLS"
],
"restreamtype": "mediaserver",
"server[mediaserver]": "11,211",
"mode[mediaserver]": "hls",
"url[mediaserver][]": "https://test.co",
"audiofix": "N",
"draft": 0,
"domainlock[enabled]": "Y",
"domainlock[policy]": "Y",
"domainlock[list]": "example.com,docs.example.com",
"domainlock[noreferer]": "N",
"domainlock[ips]": "",
"geoblock[enabled]": "Y",
"geoblock[policy]": "Y",
"geoblock[list][]": "",
"geoblock[ips]": "",
"ipaccess[enabled]": "Y",
"ipaccess[policy]": "N",
"ipaccess[list]": "",
"ipaccess[ips]": "",
"ndvr[enabled]": "Y",
"ndvr[retention]": 5,
"record[server]": 1,
"record[enabled]": "Y",
"record[retention]": 3,
"securetoken[enabled]": "Y",
"securetoken[policy]": "D",
"securetoken[list]": "32862cdb6276e19a",
"securetoken[ips]": "",
"securetoken[keyip]": "N",
"securetoken[session]": "0",
"securetoken[timeout]": 3600,
"securetoken[active]": "Y",
"useragent[enabled]": "Y",
"useragent[policy]": "Y",
"useragent[list]": "",
"useragent[casesensitive]": "N",
"useragent[ips]": "",
"vprofiles": [
14931,
14937
],
"aprofiles": [
14931
],
"filters": [
3,
4
]
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Stream Created",
"stream": {
"monitoring_id": null,
"type": "restream",
"id": 72224,
"serviceid": 103,
"name": "otilor/dongooo",
"codec": "h264",
"ingests": [
[],
null
],
"protocols": [
[
"HLS"
],
[
"HLS"
]
],
"parentid": null,
"server": "201",
"backup": "",
"dedicatedLTC": "0",
"hasAdvancedFeatures": "0",
"monitoring_triggers": null,
"draft": "0",
"disabled": "0",
"created_at": "2026-04-30 12:07:41",
"updated_at": "2026-04-30 12:07:41",
"lastseen_at": false,
"deleted": null,
"ingestsLock": 0,
"protocolsLock": 1,
"status": "Deploying",
"has": {
"rtmp": 0,
"rtsp": 0,
"hls": 1,
"dash": 0,
"rtmpauth": false
},
"parts": {
"pp": "otilor",
"sn": "dongooo",
"full": "otilordongooo"
},
"restream": {
"type": "mediaserver",
"mode": "hls",
"urls": [
"https://test.co"
],
"staticip": "N",
"audiofix": "N",
"server": {
"country": "North America"
}
},
"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_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://cdn.example.com/flowplayer/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"videojs": {
"baseQ": "",
"base": "https://cdn.example.com/videojs/hls/",
"hls": "https://cdn.example.com/videojs/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"own": {
"baseQ": "?showcv=true&title=otilor/dongooo",
"base": "https://cdn.example.com/player/hls/skin1//",
"hls": "https://cdn.example.com/player/hls/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=otilor/dongooo",
"dash": "https://cdn.example.com/player/dash/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=otilor/dongooo"
}
},
"tokenized": {
"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_dvr.m3u8",
"dashManifest": "manifest_dvr.mpd",
"hls": "https://hash-hls-live.5centscdn.com",
"dash": "https://hash-hls-live.5centscdn.com",
"players": {
"hostname": "cdn.example.com",
"flowplayer": {
"baseQ": "",
"base": "https://cdn.example.com/flowplayer/hls/",
"hls": "https://cdn.example.com/flowplayer/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
"dash": "https://cdn.example.com/flowplayer/dash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"videojs": {
"baseQ": "",
"base": "https://cdn.example.com/videojs/hls/",
"hls": "https://cdn.example.com/videojs/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
"dash": "https://cdn.example.com/videojs/dash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"own": {
"baseQ": "?showcv=true&title=otilor/dongooo",
"base": "https://cdn.example.com/player/hls/skin1//",
"hls": "https://cdn.example.com/player/hls/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=otilor/dongooo",
"dash": "https://cdn.example.com/player/dash/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=otilor/dongooo"
}
},
"path": {
"hls": "/otilor/dongooo.stream/playlist_dvr.m3u8",
"dash": "/otilor/dongooo.stream/manifest_dvr.mpd"
},
"token": {
"hls": "md5=OhWNamlkGVM10fMHSRFrPw&path=%2Fotilor%2Fdongooo.stream&expires=1777554474",
"dash": "md5=OhWNamlkGVM10fMHSRFrPw&path=%2Fotilor%2Fdongooo.stream&expires=1777554474"
}
}
},
"platformsCount": 0,
"ssl_enabled": true,
"hash": "dongooo.stream",
"ndvr": {
"enabled": "Y",
"retention": "5"
},
"securetoken": {
"enabled": "Y",
"policy": "D",
"keyip": "N",
"list": "32862cdb6276e19a",
"timeout": 3600,
"session": "0",
"ips": "",
"dirs": null,
"active": "Y"
},
"transcode": {
"ltc": 0,
"type": "mixed",
"enabled": false,
"isEditable": true
},
"domainlock": {
"enabled": "Y",
"policy": "Y",
"list": "example.com,docs.example.com",
"ips": "",
"noreferer": "N",
"active": "Y"
},
"geoblock": {
"enabled": "Y",
"policy": "Y",
"list": [
""
],
"ips": "",
"active": "Y"
},
"ipaccess": {
"enabled": "Y",
"policy": "N",
"list": "",
"ips": "",
"active": "N"
},
"useragent": {
"enabled": "Y",
"policy": "Y",
"list": "",
"ips": "",
"casesensitive": "N",
"active": "N",
"listArr": [
""
]
},
"adInsertion": null,
"record": {
"enabled": "Y",
"retention": "3",
"stream": {
"id": 72225,
"type": "record"
}
},
"rtmpauth": {
"password": "",
"active": "N"
},
"platforms": [],
"messages": {}
},
"warnings": null,
"errors": null
}
/streams/restream/new
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
HTTP method override for this request. This endpoint accepts POST, but set this to PUT to perform an update operation.
Friendly name for this resource.
Video codec for the stream. Use h264 or h265.
List of output protocols. Values include HLS, RTMP, DASH, RTSP.
The type of restreaming being applied. mediaserver indicates the stream is relayed through a media server.
The unique identifier for the media server. Examples include 209 for Oceania or 11,211 for North America.
The type of media server mode being used. hls indicates HTTP Live Streaming mode.
A URL associated with the media server where the stream can be accessed.
Fix audio sync issues in pull streams. Y means enabled, N means disabled.
Set to 0 to publish the stream, or 1 to save it as a draft.
Whether domain locking is enabled. Y means enabled, N means disabled.
The domain locking policy. Y means a specific policy applies, N means no policy.
A comma-separated list of allowed domains.
Block requests with no referrer header. Y means blocked (requests with empty referer are blocked); N means allowed.
A list of IP addresses allowed for domain access.
Whether Geo-blocking is enabled. Y means enabled, N means disabled.
The Geo-blocking policy. Y means a specific policy applies, N means no policy.
Country codes to block or allow access from. Examples include AF, GB, US.
A list of IP addresses involved in the geographic access control.
Whether IP access control is enabled. Y means enabled, N means disabled.
The IP access policy. Y means a policy applies, N means no specific policy.
A list of allowed or denied IP addresses.
A list of specific IP addresses involved in the access control.
Whether NDVR is enabled. Y means enabled, N means disabled.
The number of days to retain the NDVR recorded data.
The DVR server identifier.
Whether recording is enabled. Y means enabled, N means disabled.
The number of days to keep the recordings.
Whether secure token authentication is enabled. Y means enabled, N means disabled.
The security policy for the tokens.
A token identifier used for access control.
A list of IP addresses allowed for token access.
Whether the token is restricted to a specific IP address. Y means restricted, N means not restricted.
Indicates whether a session is required for token validation. 0 means no session.
The timeout duration in seconds for token validity.
Whether the secure token is currently active. Y means active, N means inactive.
Whether user-agent access control is enabled. Y means enabled, N means disabled.
The user-agent policy. Y means a policy applies, N means no policy.
A list of acceptable or denied user-agent strings.
Whether user-agent matching is case-sensitive. Y means case-sensitive, N means case-insensitive.
A list of IP addresses associated with user-agent control.
List of video transcoding profile IDs to apply.
List of audio transcoding profile IDs to apply.
List of transcoding filter IDs to apply.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
HTTP method override for this request. This endpoint accepts POST, but set this to PUT to perform an update operation.
PUTThe type of restreaming being applied. mediaserver indicates the stream is relayed through a media server.
mediaserverThe unique identifier for the media server. Examples include 209 for Oceania or 11,211 for North America.
11,211The type of media server mode being used. hls indicates HTTP Live Streaming mode.
hlsA URL associated with the media server where the stream can be accessed.
https://test.coWhether domain locking is enabled. Y means enabled, N means disabled.
YThe domain locking policy. Y means a specific policy applies, N means no policy.
YA comma-separated list of allowed domains.
example.com,docs.example.comBlock requests with no referrer header. Y means blocked (requests with empty referer are blocked); N means allowed.
NThe Geo-blocking policy. Y means a specific policy applies, N means no policy.
YCountry codes to block or allow access from. Examples include AF, GB, US.
Whether IP access control is enabled. Y means enabled, N means disabled.
YThe IP access policy. Y means a policy applies, N means no specific policy.
NWhether secure token authentication is enabled. Y means enabled, N means disabled.
YWhether the token is restricted to a specific IP address. Y means restricted, N means not restricted.
NIndicates whether a session is required for token validation. 0 means no session.
0Whether the secure token is currently active. Y means active, N means inactive.
YWhether user-agent access control is enabled. Y means enabled, N means disabled.
YWhether user-agent matching is case-sensitive. Y means case-sensitive, N means case-insensitive.
NResponses
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.