api.video
  1. Live
api.video
  • Account
    • Show account
      GET
  • Analytics
    • List live stream player sessions
      GET
    • List player session events
      GET
    • List video player sessions
      GET
  • Authentication
    • Authenticate
      POST
    • Refresh token
      POST
  • Live
    • List all live streams
      GET
    • Create live stream
      POST
    • Delete a live stream
      DELETE
    • Show live stream
      GET
    • Update a live stream
      PATCH
    • Delete a thumbnail
      DELETE
    • Upload a thumbnail
      POST
  • Players
    • List all players
      GET
    • Create a player
      POST
    • Delete a player
      DELETE
    • Show a player
      GET
    • Update a player
      PATCH
    • Delete logo
      DELETE
    • Upload a logo
      POST
  • Videos - Delegated upload
    • Upload with an upload token
      POST
    • List all active upload tokens.
      GET
    • Generate an upload token
      POST
    • Delete an upload token
      DELETE
    • Show upload token
      GET
  • Videos
    • List all videos
    • Create a video
    • Delete a video
    • Show a video
    • Update a video
    • Upload a video
    • Show video status
    • Pick a thumbnail
    • Upload a thumbnail
  • Captions
    • List video captions
    • Delete a caption
    • Show a caption
    • Update caption
    • Upload a caption
  • Chapters
    • List video chapters
    • Delete a chapter
    • Show a chapter
    • Upload a chapter
  • Webhooks
    • List all webhooks
    • Create Webhook
    • Delete a Webhook
    • Show Webhook details
  1. Live

Update a live stream

PATCH
/live-streams/{liveStreamId}
Live
Use this endpoint to update the player, or to turn recording on/off (saving a copy of the livestream). NOTE: If the livestream is actively streaming, changing the recording status will only affect the NEXT stream. The public=false 'private livestream' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://ws.api.video/live-streams/li400mYKSgQ6xs7taUeSaEKr' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My Live Stream Video",
    "playerId": "pl45KFKdlddgk654dspkze",
    "public": true,
    "record": true
}'
Response Response Example
200 - response
{
  "assets": {
    "hls": "https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8",
    "iframe": "<iframe src=\"https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
    "player": "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr",
    "thumbnail": "https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"
  },
  "broadcasting": false,
  "createdAt": "2020-01-31T10:17:47.000Z",
  "liveStreamId": "li400mYKSgQ6xs7taUeSaEKr",
  "name": "Live Stream From the browser",
  "public": true,
  "record": true,
  "streamKey": "30087931-229e-42cf-b5f9-e91bcc1f7332",
  "updatedAt": "2020-03-09T13:19:43.000Z"
}

Request

Path Params
liveStreamId
string 
required
The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off.
Example:
li400mYKSgQ6xs7taUeSaEKr
Body Params application/json
name
string 
optional
The name you want to use for your live stream.
Example:
My Live Stream Video
playerId
string 
optional
The unique ID for the player associated with a live stream that you want to update.
Example:
pl45KFKdlddgk654dspkze
public
boolean 
optional
BETA FEATURE Please limit all public = false ("private") livestreams to 3,000 users. Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
record
boolean 
optional
Use this to indicate whether you want the recording on or off. On is true, off is false.
Example:
true
Examples

Responses

🟢200Success
application/json
Body
assets
object (live_stream_assets) 
optional
hls
string <uri>
optional
The http live streaming (HLS) link for your live video stream.
Example:
https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8
iframe
string 
optional
The embed code for the iframe containing your live video stream.
Example:
<iframe src=\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>
player
string <uri>
optional
A link to the video player that is playing your live stream.
Example:
https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr
thumbnail
string <uri>
optional
A link to the thumbnail for your video.
Example:
https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg
broadcasting
boolean 
optional
Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.
Example:
true
liveStreamId
string 
optional
The unique identifier for the live stream. Live stream IDs begin with "li."
Example:
li400mYKSgQ6xs7taUeSaEKr
name
string 
optional
The name of your live stream.
Example:
My Live Stream
playerId
string 
optional
The unique identifier for the player.
Example:
pl45d5vFFGrfdsdsd156dGhh
public
boolean 
optional
BETA FEATURE Please limit all public = false ("private") livestreams to 3,000 users. Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
Example:
true
record
boolean 
optional
Whether you are recording or not.
Example:
true
streamKey
string 
optional
The unique, private stream key that you use to begin streaming.
Example:
cc1b4df0-d1c5-4064-a8f9-9f0368385135
🟠400Bad Request
Modified at 2023-08-15 05:52:15
Previous
Show live stream
Next
Delete a thumbnail
Built with