Livepush Developers

Stream Embed

Set embed offline text

PUT https://octopus.livepush.io/streams/{stream_id}/embed/offline_text

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

Sets the message shown in the player while the stream is offline.

Pass alternateText=1 to set the secondary offline message instead of the primary one.

Requires a token with write access to the stream (CanWriteStreams).

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}/embed/offline_text — This call changes live data on your account.

Parameters

Path parameters

  • stream_id string required
    Unique identifier of the stream.
    example: st_xxxxxxxxxxxxx

Query parameters

  • alternateText integer
    Set to 1 to write the alternate offline message instead of the primary one.
    1

Request body

application/json required

  • offlineText string required
Example request body response.json
{
  "offlineText": "We are back on Sunday at 10am."
}

Code samples

request.sh
curl -X PUT 'https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/embed/offline_text' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "offlineText": "We are back on Sunday at 10am."
  }'
const response = await fetch('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/embed/offline_text', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "offlineText": "We are back on Sunday at 10am."
  }),
});

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 = {
    "offlineText": "We are back on Sunday at 10am."
}

response = requests.put('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/embed/offline_text', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()

Responses

Setting applied.

application/json

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

No response body.

No response body.