Stream ManagementUpdate Pull Stream

Update Pull Stream

Update information of a restream

curl -X POST "https://api.5centscdn.com/v2/streams/restream/1001" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "restreamtype": "mediaserver",
  "codec": "h265",
  "server[mediaserver]": "11,211",
  "protocols": [
    "RTSP",
    "HLS"
  ],
  "url[mediaserver][]": "rtmp://fms-01-01.5centscdn.com",
  "mode[mediaserver]": "rtmp",
  "audiofix": "Y",
  "draft": "0",
  "platformtype": ""
}'
{
  "result": "success",
  "message": "Stream Updated",
  "stream": {
    "monitoring_id": null,
    "type": "restream",
    "id": 69971,
    "serviceid": 103,
    "name": "logotest/james",
    "codec": "h265",
    "ingests": [
      [],
      null
    ],
    "protocols": [
      [
        "HLS",
        "RTSP"
      ],
      [
        "HLS",
        "RTSP"
      ]
    ],
    "parentid": null,
    "server": "201",
    "backup": "",
    "dedicatedLTC": "1",
    "hasAdvancedFeatures": "1",
    "monitoring_triggers": null,
    "draft": "0",
    "disabled": "0",
    "created_at": "2026-03-11 13:05:31",
    "updated_at": "2026-04-30 13:29:14",
    "lastseen_at": "2026-04-30 13:29:11",
    "deleted": null,
    "ingestsLock": 0,
    "protocolsLock": 0,
    "status": "Deploying",
    "has": {
      "rtmp": 0,
      "rtsp": 1,
      "hls": 1,
      "dash": 0,
      "rtmpauth": false
    },
    "parts": {
      "pp": "logotest",
      "sn": "james",
      "full": "logotestjames"
    },
    "restream": {
      "type": "mediaserver",
      "mode": "rtmp",
      "urls": [
        "rtmp://fms-01-01.5centscdn.com"
      ],
      "staticip": "N",
      "audiofix": "Y",
      "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.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": "48nujrim2v7hzm6y",
              "hls": "https://hash-hls-live.5centscdn.com",
              "base64": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
              "dash": "https://hash-hls-live.5centscdn.com",
              "base64dash": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
            }
          },
          "baseQ": "?showcv=true&title=logotest/james",
          "base": "https://cdn.example.com/player/hls/skin1/48nujrim2v7hzm6y/",
          "hls": "https://cdn.example.com/player/hls/skin1/48nujrim2v7hzm6y/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=logotest/james",
          "dash": "https://cdn.example.com/player/dash/skin1/48nujrim2v7hzm6y/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=logotest/james"
        }
      },
      "tokenized": null
    },
    "platformsCount": 1,
    "ssl_enabled": true,
    "hash": "james.stream",
    "ndvr": {
      "enabled": "N",
      "retention": "18"
    },
    "securetoken": {
      "enabled": "N",
      "policy": "D",
      "keyip": "Y",
      "list": "e4c2c4ed2d921dbe",
      "timeout": 7113,
      "session": "0",
      "ips": "",
      "dirs": null,
      "active": "N"
    },
    "record": null,
    "domainlock": {
      "enabled": "N",
      "policy": "N",
      "list": "example.com,docs.example.com",
      "ips": "",
      "noreferer": "Y",
      "active": "N"
    },
    "geoblock": {
      "enabled": "N",
      "policy": "N",
      "list": [
        "AF"
      ],
      "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": [
      {
        "id": 46770,
        "rtmp": "rtmp://live.us.picarto.tv/golive",
        "auth": "N",
        "username": "",
        "password": "",
        "isSRT": false,
        "key": "lll",
        "schedule": "instant",
        "scheduletime": null,
        "codec": null,
        "length": "00:00",
        "relid": 69971,
        "dedicatedLTC": "0",
        "transcode": {
          "ltc": 0,
          "type": "mixed",
          "enabled": false,
          "isEditable": true
        },
        "disabled": "0",
        "name": "h",
        "platform_id": 1,
        "provider_id": 0,
        "video_id": ""
      }
    ],
    "messages": {},
    "adInsertion": {
      "id": 9,
      "relid": 69971,
      "type": "stream",
      "enabled": "Y",
      "policy": "1",
      "provider": "FreeWheel",
      "meta": {
        "adpreroll": {
          "maxDuration": 30,
          "offset": 0
        },
        "adreplacement": {
          "scte35": {
            "adBreakTriggers": [
              "0x22",
              "0x30",
              "0x32",
              "0x34",
              "0x36",
              "splice_insert"
            ],
            "markersToRemove": [
              "ALL"
            ]
          },
          "onStartWithinAdBreak": "replace"
        }
      },
      "defaultDuration": 30,
      "created_at": "2026-04-01 14:04:46",
      "schedules": [],
      "active": "N"
    }
  },
  "warnings": null,
  "errors": null
}
POST
/streams/restream/{streamid}
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
restreamtypestring

The type of restream being used. mediaserver indicates the stream is relayed through a media server.

codecstring

Video codec for the stream. Use h264 or h265.

server[mediaserver]string

The unique identifier for the media server. Examples include 209 for Oceania or 11,211 for North America.

protocolsarray

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 (HLS_FMP4 is reserved for future use and is not currently selectable in the UI). Read-only when the stream's protocolsLock is 1; enabling a new output protocol requires review and activation by the support team.

url[mediaserver][]string

A URL pointing to the media server endpoint for accessing the stream.

mode[mediaserver]string

The streaming mode used by the media server. Examples include rtmp, hls, http.

audiofixstring

Fix audio sync issues in pull streams. Y means enabled, N means disabled.

draftstring

Set to 0 to publish the stream, or 1 to save it as a draft.

platformtypestring

Specifies the platform type for the stream. Examples include rtmp or hls.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

streamidstring
Required

Stream ID

Example:
1001

Body

application/json
restreamtypestring

The type of restream being used. mediaserver indicates the stream is relayed through a media server.

Example:
mediaserver
codecstring

Video codec for the stream. Use h264 or h265.

Example:
h265
server[mediaserver]string

The unique identifier for the media server. Examples include 209 for Oceania or 11,211 for North America.

Example:
11,211
protocolsarray

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 (HLS_FMP4 is reserved for future use and is not currently selectable in the UI). Read-only when the stream's protocolsLock is 1; enabling a new output protocol requires review and activation by the support team.

Example:
["RTSP","HLS"]
url[mediaserver][]string

A URL pointing to the media server endpoint for accessing the stream.

Example:
rtmp://fms-01-01.5centscdn.com
mode[mediaserver]string

The streaming mode used by the media server. Examples include rtmp, hls, http.

Example:
rtmp
audiofixstring

Fix audio sync issues in pull streams. Y means enabled, N means disabled.

Example:
Y
draftstring

Set to 0 to publish the stream, or 1 to save it as a draft.

Example:
0
platformtypestring

Specifies the platform type for the stream. Examples include rtmp or hls.

Example:

Responses

resultstring

Status of the API response.

messagestring

Human-readable message describing the result.

streamobject

Stream object containing configuration and status details.

warningsstring

Non-fatal warnings returned with the response.

errorsstring

Errors returned with the response.