Livepush Developers

Destinations

Update destination RTMP ingest

PUT https://octopus.livepush.io/streams/{stream_id}/destinations/{destination_id}/rtmp

Base URL https://octopus.livepush.io — Core Streams & Media APIs

Replaces a destination's RTMP ingest URL and stream key, keeping its other settings. Use it to point one custom RTMP destination at a new platform event before each broadcast.

The change is applied to the stream's live configuration right away, so a broadcast running on this destination moves to the new ingest. Change it between broadcasts.

Requires a token with the streams.destinations.write scope.

Authorization

Send a valid access token in the Authorization header.

  • bearerAuth — Bearer token (JWT)
headers.txt
Authorization: Bearer YOUR_API_TOKEN

Try it

PUT https://octopus.livepush.io/streams/{stream_id}/destinations/{destination_id}/rtmp — This call changes live data on your account.

Parameters

Path parameters

  • stream_id string required
    Unique identifier of the live stream
  • destination_id string required
    Unique identifier of the destination

Request body

application/json required

  • rtmpBase string required
    Base RTMP ingest URL
  • rtmpKey string required
    RTMP stream key
Example request body response.json
{
  "rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
  "rtmpKey": "xxxx-xxxx-xxxx-xxxx"
}

Code samples

request.sh
curl -X PUT 'https://octopus.livepush.io/streams/<stream_id>/destinations/<destination_id>/rtmp' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
    "rtmpKey": "xxxx-xxxx-xxxx-xxxx"
  }'
const response = await fetch('https://octopus.livepush.io/streams/<stream_id>/destinations/<destination_id>/rtmp', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
    "rtmpKey": "xxxx-xxxx-xxxx-xxxx"
  }),
});

if (!response.ok) {
  throw new Error(`Livepush API error ${response.status}`);
}

const data = await response.json();
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
    "rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
    "rtmpKey": "xxxx-xxxx-xxxx-xxxx"
}

response = requests.put('https://octopus.livepush.io/streams/<stream_id>/destinations/<destination_id>/rtmp', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()

Responses

Ingest updated

application/json

  • success boolean
Example 200 response response.json
{
  "success": true
}

Unauthorized