PlatformsAdd Platform

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
}'
{
  "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
        }
      }
    ]
  }
}
POST
/streams/push/{streamid}/platforms
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
platform[name]string

The name of the platform. Examples include Custom RTMP or YouTube.

platform[rtmp]string

The RTMP URL used for streaming to the platform.

platform[key]string

The stream key required for authentication with the platform.

platform[auth]string

Indicates if authentication is required. Y means enabled, N means not required.

platform[username]string

The username for platform authentication.

platform[password]string

The password for platform authentication, paired with the username.

platform[ltc]integer

A configuration setting related to the platform. 1 means enabled, 0 means disabled.

platform[vprofiles]integer

The video profile identifier used by the platform. Specifies the quality or format of the video stream.

platform[aprofiles]integer

The audio profile identifier used by the platform. Specifies the quality or format of the audio stream.

platform[filters]array

A list of filter IDs applied to the platform stream.

platform[schedule]string

The scheduling type for the platform stream. Values include instant or scheduled.

platform[scheduleontime]string

The specific time for a scheduled stream in hh:mm format. Used when schedule is scheduleontime.

platform[scheduleondatetime]string

The full date and time for a scheduled stream. Used when schedule is scheduleondatetime.

platform[length]integer

The duration of the stream in minutes.

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
platform[name]string

The name of the platform. Examples include Custom RTMP or YouTube.

Example:
Custom RTMP
platform[rtmp]string

The RTMP URL used for streaming to the platform.

Example:
rtmp://rtmp.5centscdn.com:1935/
platform[key]string

The stream key required for authentication with the platform.

Example:
password
platform[auth]string

Indicates if authentication is required. Y means enabled, N means not required.

Example:
Y
platform[username]string

The username for platform authentication.

Example:
admin
platform[password]string

The password for platform authentication, paired with the username.

Example:
password
platform[ltc]integer

A configuration setting related to the platform. 1 means enabled, 0 means disabled.

Example:
0
platform[vprofiles]integer

The video profile identifier used by the platform. Specifies the quality or format of the video stream.

Example:
106257
platform[aprofiles]integer

The audio profile identifier used by the platform. Specifies the quality or format of the audio stream.

Example:
106257
platform[filters]array

A list of filter IDs applied to the platform stream.

Example:
[3,4]
platform[schedule]string

The scheduling type for the platform stream. Values include instant or scheduled.

Example:
instant
platform[scheduleontime]string

The specific time for a scheduled stream in hh:mm format. Used when schedule is scheduleontime.

Example:
14:00
platform[scheduleondatetime]string

The full date and time for a scheduled stream. Used when schedule is scheduleondatetime.

Example:
2026-01-01 00:00:00
platform[length]integer

The duration of the stream in minutes.

Example:
40

Responses

resultstring

Status of the API response.

messagestring

Human-readable message describing the result.

streamobject

Stream object containing configuration and status details.