Skip to main content

POST New Live Video

Overview


The table below provides key details about the POST method to create a new Live Video.

POST New Live Video
MethodPOST
URL or Endpoint/api/v1/projectId/live-videos
HeadersAuthorization
Content Typeapplication/json
ParametersprojectId
Request BodyCheck the request body below

The description of the URL parameter is as follows:

projectId URL Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionUnique Id of the project.

Request Body

{
"title": "string",
"description": "string",
"channelId": "string",
"dvrEnabled": true,
"rewindTypeId": 0,
"rewindDuration": 0,
"author": "string",
"publishDate": "2024-11-11T09:12:46.112Z",
"publishEndDate": "2024-11-11T09:12:46.112Z"
}

The description of the body parameters is as follows:

Parameter NameMandatoryTypeDescription
titleYesstringTitle of the live video.
descriptionNostringDescription of the live video.
channelIdYesstringUnique identifier of the channel.
dvrEnabledNobooleanEnables DVR (Digital Video Recording) for the live video.
rewindTypeIdNointegerType of rewind feature for the live video.
rewindDurationNointegerDuration in seconds for which rewind is allowed.
AuthorNostringThe name of the author of the live video.
publishDateNostring (ISO 8601 datetime)Date and time when the live video is published in UTC.
publishEndDateNostring (ISO 8601 datetime)Date and time when the live video publishing ends in UTC.
Rewind Type

You can set the rewindTypeId parameter to define how far users can rewind during a live video. For more information visit Rewind Types API

Response

{
"success": true,
"errors": [
"string"
],
"messages": [
"string"
],
"result": {
"publicId": "string",
"id": "string",
"name": "string",
"title": "string",
"description": "string",
"playbackUrl": "string",
"thumbnail": "string",
"channelPublicId": "string",
"channelName": "string",
"channelTitle": "string",
"liveStatus": "string",
"author": "string",
"publishDate": "2024-11-11T09:22:05.928Z",
"publishEndDate": "2024-11-11T09:22:05.928Z",
"dvrEnabled": true,
"canCutAndPublish": true,
"canStopAndCut": true,
"canStopWithoutSaving": true
},
"resultInfo": "string",
"statusCode": 0
}
Possible Live Status
  • Live: The live video is currently streaming.
  • Offline: The live video is not active or streaming.
  • Processing: The live video is being processed, such as for playback or storage.
  • Interrupted: The live video stream was disrupted due to a technical issue or connection problem.

Information about the fields that appear when you receive the response are displayed in the table below.

Field NameTypeDescription
successbooleanIf the response is successful, this returns true; otherwise, false.
errorsarray[string]List of error messages, if any.
messagesarray[string]List of informational or status messages.
resultobjectContains the main response data for the live video.
publicIdstringPublic identifier for the live video.
idstringUnique identifier of the live video.
namestringRandomly generated GUID for the live video.
titlestringTitle of the live video.
descriptionstringDescription of the live video.
playbackUrlstringURL where the livestream can be accessed for playback.
thumbnailstringURL of the live video's thumbnail image.
channelPublicIdstringUnique identifier of the channel related to the live video.
channelNamestringName of the channel.
channelTitlestringTitle of the channel.
liveStatusstringCurrent status of the live video.(Live, Offline, Processing, Interrupted)
authorstringAuthor of the live video.
publishDatestring (ISO 8601 datetime)Date and time when the video was published.
publishEndDatestring (ISO 8601 datetime)End date and time for the publication of the video.
dvrEnabledbooleanIndicates if DVR is enabled for the live video.
canCutAndPublishbooleanIndicates if the video can be cut and published.
canStopAndCutbooleanIndicates if the video can be stopped and cut.
canStopWithoutSavingbooleanIndicates if the video can be stopped without saving.
resultInfostringAdditional information about the result.
statusCodeintegerHTTP status code returned by the response.

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed