Vonage Video

APIs relating to Vonage Video

Download OpenAPI Specification

Archives

APIs relating to working with archives

List all archives in an application

List all archives in an application

gethttps://video.api.vonage.com/v2/project/:application_id/archive

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Query Parameters

offset
integer

Set an offset query parameters to specify the index offset of the first archive. 0 is offset of the most recently started archive (excluding deleted archive). 1 is the offset of the archive that started prior to the most recent archive. The default value is 0.

count
integer

Set a count query parameter to limit the number of archives to be returned. The default number of archives returned is 50 (or fewer, if there are fewer than 50 archives). The maximum number of archives the call will return is 1000.

session_id
string

Set a sessionId query parameter to list archives for a specific session ID. (This is useful when listing multiple archives for an automatically archived session.)

Responses
Content Type
application/json

OK

count
integer
example1

The total number of archives for the API key.

items
array

An array of objects defining each archive retrieved. Archives are listed from the newest to the oldest in the return set.

createdAt
integer
example1384221730000

The timestamp for when the archive started recording, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

duration
integer
example5049

The duration of the archive in seconds. For archives that have are being recorded (with the status property set to "started"), this value is set to 0.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

id
string
exampleb40ef09b-3811-4726-b508-e41a0f96c68f

The unique archive ID.

multiArchiveTag
string
examplemy-multi-archive

Set this to support recording multiple archives for the same session simultaneously. Set this to a unique string for each simultaneous archive of an ongoing session. You must also set this option when manually starting an archive in a session that is automatically archived. If you do not specify a unique multiArchiveTag, you can only record one archive at a time for a given session.

name
string
exampleFoo

The name of the archive (for your own identification)

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

reason
string

For archives with the status "stopped", this can be set to "maximum duration exceeded", "maximum idle time exceeded", "session ended", "user initiated". For archives with the status "failed", this can be set to "failure".

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

size
integer
example247748791

The size of the archive file. For archives that have not been generated, this value is set to 0.

status
string
exampleavailable

The status of the archive:

  • "available" — The archive is available for download from the Vonage Video cloud.

  • "expired" — The archive is no longer available for download from the Vonage Video cloud.

  • "failed" — The archive recording failed.

  • "paused" — When an archive is paused, nothing is recorded. The archive is paused if any of the following conditions occur:

    • No clients are publishing streams to the session. In this case, there is a timeout of 60 minutes, after which the archive stops and the archive status changes to "stopped".
    • All clients disconnect the session. After 60 seconds the archive stops and the archive status changes to "stopped".

    If a client resumes publishing while the archive is in the "paused" state, the archive recording resumes and the status changes back to "started".

  • "started" — The archive started and is in the process of being recorded.

  • "stopped" — The archive stopped recording.

  • "uploaded" — The archive is available for download from the S3 bucket you specified in your Video API account.

Must be one of:availableexpiredfailedpausedstartedstoppeduploaded
streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
streams
array
streamId
string

The stream ID of the stream included in the archive.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

url
string
examplehttps://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4

The download URL of the available archive file. This is only set for an archive with the status set to "available"; for other archives, (including archives with the status "uploaded") this property is set to null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes.

maxBitrate
number
Min100000
Max6000000
example200000

The maximum video bitrate for the archive, in bits per second. This option is only valid for composed archives. Set the maximum video bitrate to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has audio, those bits will be excluded from the limit.

Example Response

{
   "count": 1,
   "items": [
      {
         "createdAt": 1384221730000,
         "duration": 5049,
         "hasAudio": true,
         "hasVideo": true,
         "id": "b40ef09b-3811-4726-b508-e41a0f96c68f",
         "multiArchiveTag": "my-multi-archive",
         "name": "Foo",
         "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
         "reason": "",
         "resolution": "640x480",
         "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
         "size": 247748791,
         "status": "available",
         "streamMode": "manual",
         "streams": [
            {
               "streamId": "string",
               "hasAudio": true,
               "hasVideo": true
            }
         ],
         "url": "https://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4",
         "maxBitrate": 200000
      }
   ]
}

Create a new archive

Create a new archive from existing video session

posthttps://video.api.vonage.com/v2/project/:application_id/archive

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Request Body
Content Type
application/json

sessionId
string
Required
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

layout
object
type
string
examplebestFit

Specify this to assign the initial layout type for the archive. This applies only to composed archives. This object has three properties: type, stylesheet, and screenshareType, which are each strings. Valid values for the layout property are "bestFit" (best fit), "custom" (custom), "horizontalPresentation" (horizontal presentation), "pip" (picture-in-picture), and "verticalPresentation" (vertical presentation)). If you specify a "custom" layout type, set the stylesheet property of the layout object to the stylesheet. (For other layout types, do not set a stylesheet property.) Set the screenshareType property to the layout type to use when there is a screen-sharing stream in the session. (This property is optional.) Note if you set the screenshareType property, you must set the type property to "bestFit" and leave the stylesheet property unset. If you do not specify an initial layout type, the archive uses the best fit layout type.

Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation
stylesheet
string
examplestream.instructor {position: absolute; width: 100%; height:50%;}

Used for the custom layout to define the visual layout

screenshareType
string
examplepip

Set the screenshareType property to the layout type to use when there is a screen-sharing stream in the session. (This property is optional.) Note if you set the screenshareType property, you must set the type property to "bestFit" and leave the stylesheet property unset.

Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation
multiArchiveTag
string
examplemy-multi-archive

Set this to support recording multiple archives for the same session simultaneously. Set this to a unique string for each simultaneous archive of an ongoing session. You must also set this option when manually starting an archive in a session that is automatically archived. If you do not specify a unique multiArchiveTag, you can only record one archive at a time for a given session.

name
string
exampleFoo

The name of the archive (for your own identification)

outputMode
string

Whether all streams in the archive are recorded to a single file ("composed", the default) or to individual files ("individual").

Must be one of:composedindividual
resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
maxBitrate
number
Min100000
Max6000000
example200000

The maximum video bitrate for the archive, in bits per second. This option is only valid for composed archives. Set the maximum video bitrate to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has audio, those bits will be excluded from the limit.

Example Request

{
   "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
   "hasAudio": true,
   "hasVideo": true,
   "layout": {
      "type": "bestFit",
      "stylesheet": "stream.instructor {position: absolute; width: 100%;  height:50%;}",
      "screenshareType": "pip"
   },
   "multiArchiveTag": "my-multi-archive",
   "name": "Foo",
   "outputMode": "composed",
   "resolution": "640x480",
   "streamMode": "manual",
   "maxBitrate": 200000
}

Responses
Content Type
application/json

Example response

createdAt
integer
example1384221730000

The timestamp for when the archive started recording, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

duration
integer
example5049

The duration of the archive in seconds. For archives that have are being recorded (with the status property set to "started"), this value is set to 0.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

id
string
exampleb40ef09b-3811-4726-b508-e41a0f96c68f

The unique archive ID.

multiArchiveTag
string
examplemy-multi-archive

Set this to support recording multiple archives for the same session simultaneously. Set this to a unique string for each simultaneous archive of an ongoing session. You must also set this option when manually starting an archive in a session that is automatically archived. If you do not specify a unique multiArchiveTag, you can only record one archive at a time for a given session.

name
string
exampleFoo

The name of the archive (for your own identification)

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

reason
string

For archives with the status "stopped", this can be set to "maximum duration exceeded", "maximum idle time exceeded", "session ended", "user initiated". For archives with the status "failed", this can be set to "failure".

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

size
integer
example247748791

The size of the archive file. For archives that have not been generated, this value is set to 0.

status
string
exampleavailable

The status of the archive:

  • "available" — The archive is available for download from the Vonage Video cloud.

  • "expired" — The archive is no longer available for download from the Vonage Video cloud.

  • "failed" — The archive recording failed.

  • "paused" — When an archive is paused, nothing is recorded. The archive is paused if any of the following conditions occur:

    • No clients are publishing streams to the session. In this case, there is a timeout of 60 minutes, after which the archive stops and the archive status changes to "stopped".
    • All clients disconnect the session. After 60 seconds the archive stops and the archive status changes to "stopped".

    If a client resumes publishing while the archive is in the "paused" state, the archive recording resumes and the status changes back to "started".

  • "started" — The archive started and is in the process of being recorded.

  • "stopped" — The archive stopped recording.

  • "uploaded" — The archive is available for download from the S3 bucket you specified in your Video API account.

Must be one of:availableexpiredfailedpausedstartedstoppeduploaded
streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
streams
array
streamId
string

The stream ID of the stream included in the archive.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

url
string
examplehttps://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4

The download URL of the available archive file. This is only set for an archive with the status set to "available"; for other archives, (including archives with the status "uploaded") this property is set to null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes.

maxBitrate
number
Min100000
Max6000000
example200000

The maximum video bitrate for the archive, in bits per second. This option is only valid for composed archives. Set the maximum video bitrate to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has audio, those bits will be excluded from the limit.

Example Response

{
   "createdAt": 1384221730000,
   "duration": 5049,
   "hasAudio": true,
   "hasVideo": true,
   "id": "b40ef09b-3811-4726-b508-e41a0f96c68f",
   "multiArchiveTag": "my-multi-archive",
   "name": "Foo",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "reason": "",
   "resolution": "640x480",
   "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
   "size": 247748791,
   "status": "available",
   "streamMode": "manual",
   "streams": [
      {
         "streamId": "string",
         "hasAudio": true,
         "hasVideo": true
      }
   ],
   "url": "https://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4",
   "maxBitrate": 200000
}

Return archive information for specific archive

Return archive information for specific archive

gethttps://video.api.vonage.com/v2/project/:application_id/archive/:archive_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

archive_id
string
Required

Archive UUID to use

Responses
Content Type
application/json

Example response

createdAt
integer
example1384221730000

The timestamp for when the archive started recording, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

duration
integer
example5049

The duration of the archive in seconds. For archives that have are being recorded (with the status property set to "started"), this value is set to 0.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

id
string
exampleb40ef09b-3811-4726-b508-e41a0f96c68f

The unique archive ID.

multiArchiveTag
string
examplemy-multi-archive

Set this to support recording multiple archives for the same session simultaneously. Set this to a unique string for each simultaneous archive of an ongoing session. You must also set this option when manually starting an archive in a session that is automatically archived. If you do not specify a unique multiArchiveTag, you can only record one archive at a time for a given session.

name
string
exampleFoo

The name of the archive (for your own identification)

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

reason
string

For archives with the status "stopped", this can be set to "maximum duration exceeded", "maximum idle time exceeded", "session ended", "user initiated". For archives with the status "failed", this can be set to "failure".

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

size
integer
example247748791

The size of the archive file. For archives that have not been generated, this value is set to 0.

status
string
exampleavailable

The status of the archive:

  • "available" — The archive is available for download from the Vonage Video cloud.

  • "expired" — The archive is no longer available for download from the Vonage Video cloud.

  • "failed" — The archive recording failed.

  • "paused" — When an archive is paused, nothing is recorded. The archive is paused if any of the following conditions occur:

    • No clients are publishing streams to the session. In this case, there is a timeout of 60 minutes, after which the archive stops and the archive status changes to "stopped".
    • All clients disconnect the session. After 60 seconds the archive stops and the archive status changes to "stopped".

    If a client resumes publishing while the archive is in the "paused" state, the archive recording resumes and the status changes back to "started".

  • "started" — The archive started and is in the process of being recorded.

  • "stopped" — The archive stopped recording.

  • "uploaded" — The archive is available for download from the S3 bucket you specified in your Video API account.

Must be one of:availableexpiredfailedpausedstartedstoppeduploaded
streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
streams
array
streamId
string

The stream ID of the stream included in the archive.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

url
string
examplehttps://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4

The download URL of the available archive file. This is only set for an archive with the status set to "available"; for other archives, (including archives with the status "uploaded") this property is set to null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes.

maxBitrate
number
Min100000
Max6000000
example200000

The maximum video bitrate for the archive, in bits per second. This option is only valid for composed archives. Set the maximum video bitrate to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has audio, those bits will be excluded from the limit.

Example Response

{
   "createdAt": 1384221730000,
   "duration": 5049,
   "hasAudio": true,
   "hasVideo": true,
   "id": "b40ef09b-3811-4726-b508-e41a0f96c68f",
   "multiArchiveTag": "my-multi-archive",
   "name": "Foo",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "reason": "",
   "resolution": "640x480",
   "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
   "size": 247748791,
   "status": "available",
   "streamMode": "manual",
   "streams": [
      {
         "streamId": "string",
         "hasAudio": true,
         "hasVideo": true
      }
   ],
   "url": "https://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4",
   "maxBitrate": 200000
}

Delete an archive

Delete an archive object from the Video Platform

deletehttps://video.api.vonage.com/v2/project/:application_id/archive/:archive_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

archive_id
string
Required

Archive UUID to use

Responses

No Content

Add or remove a stream from an archive

Use this method to change the streams included in a composed archive that was started with the streamMode set to "manual"

patchhttps://video.api.vonage.com/v2/project/:application_id/archive/:archive_id/streams

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

archive_id
string
Required

Archive UUID to use

Request Body
Content Type
application/json

One Of
removeStream
string
Required
example12312312-3811-4726-b508-e41a0f96c68f

Stream ID to remove from the archive

Example Request

{
   "removeStream": "12312312-3811-4726-b508-e41a0f96c68f"
}

Responses

No Content

Stop an archive

To stop recording an archive, submit an HTTP POST request.

Archives stop recording after 4 hours (14,400 seconds), or 60 seconds after the last client disconnects from the session, or 60 minutes after the last client stops publishing. However, automatic archives continue recording to multiple consecutive files of up to 4 hours in length each. For more information, see Archive duration

Calling this method for automatic archives has no effect. Automatic archives continue recording to multiple consecutive files of up to 4 hours (14,400 seconds) in length each, until 60 seconds after the last client disconnects from the session, or 60 minutes after the last client stops publishing a stream to the session.

posthttps://video.api.vonage.com/v2/project/:application_id/archive/:archive_id/stop

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

archive_id
string
Required

Archive UUID to use

Responses
Content Type
application/json

Example response

createdAt
integer
example1384221730000

The timestamp for when the archive started recording, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

duration
integer
example5049

The duration of the archive in seconds. For archives that have are being recorded (with the status property set to "started"), this value is set to 0.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

id
string
exampleb40ef09b-3811-4726-b508-e41a0f96c68f

The unique archive ID.

multiArchiveTag
string
examplemy-multi-archive

Set this to support recording multiple archives for the same session simultaneously. Set this to a unique string for each simultaneous archive of an ongoing session. You must also set this option when manually starting an archive in a session that is automatically archived. If you do not specify a unique multiArchiveTag, you can only record one archive at a time for a given session.

name
string
exampleFoo

The name of the archive (for your own identification)

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

reason
string

For archives with the status "stopped", this can be set to "maximum duration exceeded", "maximum idle time exceeded", "session ended", "user initiated". For archives with the status "failed", this can be set to "failure".

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

size
integer
example247748791

The size of the archive file. For archives that have not been generated, this value is set to 0.

status
string
exampleavailable

The status of the archive:

  • "available" — The archive is available for download from the Vonage Video cloud.

  • "expired" — The archive is no longer available for download from the Vonage Video cloud.

  • "failed" — The archive recording failed.

  • "paused" — When an archive is paused, nothing is recorded. The archive is paused if any of the following conditions occur:

    • No clients are publishing streams to the session. In this case, there is a timeout of 60 minutes, after which the archive stops and the archive status changes to "stopped".
    • All clients disconnect the session. After 60 seconds the archive stops and the archive status changes to "stopped".

    If a client resumes publishing while the archive is in the "paused" state, the archive recording resumes and the status changes back to "started".

  • "started" — The archive started and is in the process of being recorded.

  • "stopped" — The archive stopped recording.

  • "uploaded" — The archive is available for download from the S3 bucket you specified in your Video API account.

Must be one of:availableexpiredfailedpausedstartedstoppeduploaded
streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
streams
array
streamId
string

The stream ID of the stream included in the archive.

hasAudio
boolean
exampletrue

Whether the archive will record audio (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

hasVideo
boolean
exampletrue

Whether the archive will record video (true, the default) or not (false). If you set both hasAudio and hasVideo to false, the call to this method results in an error.

url
string
examplehttps://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4

The download URL of the available archive file. This is only set for an archive with the status set to "available"; for other archives, (including archives with the status "uploaded") this property is set to null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes.

maxBitrate
number
Min100000
Max6000000
example200000

The maximum video bitrate for the archive, in bits per second. This option is only valid for composed archives. Set the maximum video bitrate to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has audio, those bits will be excluded from the limit.

Example Response

{
   "createdAt": 1384221730000,
   "duration": 5049,
   "hasAudio": true,
   "hasVideo": true,
   "id": "b40ef09b-3811-4726-b508-e41a0f96c68f",
   "multiArchiveTag": "my-multi-archive",
   "name": "Foo",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "reason": "",
   "resolution": "640x480",
   "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
   "size": 247748791,
   "status": "available",
   "streamMode": "manual",
   "streams": [
      {
         "streamId": "string",
         "hasAudio": true,
         "hasVideo": true
      }
   ],
   "url": "https://tokbox.com.archive2.s3.amazonaws.com/123456/09141e29-8770-439b-b180-337d7e637545/archive.mp4",
   "maxBitrate": 200000
}

Change the layout of an archive

You can dynamically change the layout type of a composed archive while it is being recorded.

puthttps://video.api.vonage.com/v2/project/:application_id/archive/:archive_id/layout

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

archive_id
string
Required

Archive UUID to use

Request Body
Content Type
application/json

type
string
examplebestFit

Specify this to assign the initial layout type for the archive. This applies only to composed archives. This object has three properties: type, stylesheet, and screenshareType, which are each strings. Valid values for the layout property are "bestFit" (best fit), "custom" (custom), "horizontalPresentation" (horizontal presentation), "pip" (picture-in-picture), and "verticalPresentation" (vertical presentation)). If you specify a "custom" layout type, set the stylesheet property of the layout object to the stylesheet. (For other layout types, do not set a stylesheet property.) Set the screenshareType property to the layout type to use when there is a screen-sharing stream in the session. (This property is optional.) Note if you set the screenshareType property, you must set the type property to "bestFit" and leave the stylesheet property unset. If you do not specify an initial layout type, the archive uses the best fit layout type.

Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation
stylesheet
string
examplestream.instructor {position: absolute; width: 100%; height:50%;}

Used for the custom layout to define the visual layout

screenshareType
string
examplepip

Set the screenshareType property to the layout type to use when there is a screen-sharing stream in the session. (This property is optional.) Note if you set the screenshareType property, you must set the type property to "bestFit" and leave the stylesheet property unset.

Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation

Example Request

{
   "type": "bestFit",
   "stylesheet": "stream.instructor {position: absolute; width: 100%;  height:50%;}",
   "screenshareType": "pip"
}

Responses

OK

Moderation

APIs relating to moderating participants

Force a connection to disconnect

Force a client to disconnect from a session

deletehttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/connection/:connection_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

connection_id
string
Required

Specific publisher connection ID

Responses

No Content

Mute a specific stream

Force mute a specific publisher stream

posthttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/stream/:stream_id/mute

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

stream_id
string
Required

Stream ID

Responses

OK

Mute multiple participants in a session

You can use the Vonage Video REST API to force all streams (except for an optional list of streams) in a session to mute published audio. You can also use this method to disable the force mute state of a session (see below).

posthttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/mute

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

Request Body
Content Type
application/json

active
boolean
Required
exampletrue

Whether to mute streams in the session (true) and enable the mute state of the session, or to disable the mute state of the session (false). With the mute state enabled (true), all current and future streams published to the session (with the exception of streams in the excludedStreamIds array) are muted. When you call this method with the active property set to false, future streams published to the session are not muted (but any existing muted streams remain muted).

excludedStreamIds
array
Required

The stream IDs for streams that should not be muted. This is an optional property. If you omit this property, all streams in the session will be muted. This property only applies when the active property is set to true. When the active property is set to false, it is ignored.

The elements in the excludedStreamIds array are stream IDs (strings) for the streams you wish to exclude from being muted.

If you do not wish to include an array of excluded streams, do not include any body content.

Example Request

{
   "active": true,
   "excludedStreamIds": [
      "excludedStream1",
      "excludedStream2"
   ]
}

Responses
Content Type
application/json

Project Details

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

status
string
exampleACTIVE

Whether the project is active ("ACTIVE") or suspended ("SUSPENDED")

name
string
exampleJoe Montana

The name, if you specified one when creating the project; or an empty string if you did not specify a name

environment
string
examplestandard

This is set to "standard" or "enterprise", and it refers to the environment a project is running on. Enterprise package partners have access to the enterprise environment.

createdAt
integer
example1414642898000

The time at which the project was created (a UNIX timestamp, in milliseconds)

Example Response

{
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "status": "ACTIVE",
   "name": "Joe Montana",
   "environment": "standard",
   "createdAt": 1414642898000
}

Sessions

APIs relating to creating and working with Sessions

Create New Session

Generate a new Vonage Video session

posthttps://video.api.vonage.com/session/create

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Request Body
Content Type
application/x-www-form-urlencoded

archiveMode
string

Set to always to have the session archived automatically. With the archiveModeset to manual (the default), you can archive the session by calling the REST /archive POST method. If you set the archiveMode to always, you must also set the p2p.preference parameter to disabled (the default).

location
string

The IP address that the Vonage Video APi will use to situate the session in its global network. If no location hint is passed in (which is recommended), the session uses a media server based on the location of the first client connecting to the session. Pass a location hint in only if you know the general geographic region (and a representative IP address) and you think the first client connecting may not be in that region. Specify an IP address that is representative of the geographical location for the session.

p2p.preference
string

Set to enabled if you prefer clients to attempt to send audio-video streams directly to other clients; set to disabled for sessions that use the Vonage Video Media Router. (Optional; the default setting is disabled -- the session uses the Vonage Video Media Router.)

e2ee
boolean

Whether end-to-end encryption is enabled for the session (true) or not (false)

Example Request

Responses
Content Type
application/json

Sample Response when creating a new session

array
session_id
string
application_id
string
create_dt
string
media_server_url
string

Example Response

[
   {
      "session_id": "string",
      "application_id": "string",
      "create_dt": "string",
      "media_server_url": "string"
   }
]

Get layout information about a stream

Use this method to get information on an Vonage Video stream

For example, you can call this method to get information about layout classes used by an Vonage Video stream. The layout classes define how the stream is displayed in the layout of a broadcast stream.

gethttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/stream/:stream_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

stream_id
string
Required

Stream ID

Responses
Content Type
application/json

Information about a stream's layout

id
string
example8b732909-0a06-46a2-8ea8-074e64d43422

The Stream ID

videoType
string
examplecamera

Set to "camera", "screen", or "custom". A "screen" video uses screen sharing on the publisher as the video source; a "custom" video is published by a web client using an HTML VideoTrack element as the video source.

name
string

The stream name (if one was set when the client published the stream).

layoutClassList
array

An array of the layout classes for the stream.

Example Response

{
   "id": "8b732909-0a06-46a2-8ea8-074e64d43422",
   "videoType": "camera",
   "name": "",
   "layoutClassList": [
      "full"
   ]
}

Get information about all connected stream layouts

Use this method to get information on all Vonage Video streams in a session

For example, you can call this method to get information about layout classes used by an Vonage Video stream. The layout classes define how the stream is displayed in the layout of a broadcast stream.

gethttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/stream

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

Responses
Content Type
application/json

Information about multiple streams layout config

count
integer
example1

Number of items in the response

items
array

Stream layouts for requested session IDs

id
string
example8b732909-0a06-46a2-8ea8-074e64d43422

The Stream ID

videoType
string
examplecamera

Set to "camera", "screen", or "custom". A "screen" video uses screen sharing on the publisher as the video source; a "custom" video is published by a web client using an HTML VideoTrack element as the video source.

name
string

The stream name (if one was set when the client published the stream).

layoutClassList
array

An array of the layout classes for the stream.

Example Response

{
   "count": 1,
   "items": [
      {
         "id": "8b732909-0a06-46a2-8ea8-074e64d43422",
         "videoType": "camera",
         "name": "",
         "layoutClassList": [
            "full"
         ]
      }
   ]
}

Change the layout of a stream

Use this method to change layout classes for an Vonage Video stream. The layout classes define how the stream is displayed in the layout of a composed Vonage Video archive.

puthttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/stream

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

Request Body
Content Type
application/json

items
array
Required

Array of stream IDs and their new class lists

id
string
example8b732909-0a06-46a2-8ea8-074e64d43422
layoutClassList
array

Array of class names as strings

Example Request

{
   "items": [
      {
         "id": "8b732909-0a06-46a2-8ea8-074e64d43422",
         "layoutClassList": [
            "full"
         ]
      }
   ]
}

Responses

OK

Signaling

APIs relating to sending and recieving Signals

Send a signal to all participants

Use the Signal REST API to send signals to all participants in an active Vonage Video session or to a specific client connected to that session. Signals sent from the server have an empty from parameter in the signal received handlers on clients connected to the session. For a signal sent from a participant in the session, the from property is set the connection ID of the client that sent the signal, but in this case there is no associated connection.

posthttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/signal

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

Request Body
Content Type
application/json

type
string
Required
examplechat

Type of data that is being sent to the client. This cannot exceed 128 bytes.

data
string
Required
exampleText of the chat message

Payload that is being sent to the client. This cannot exceed 8kb.

Example Request

{
   "type": "chat",
   "data": "Text of the chat message"
}

Responses

No Content

Send signal to a specific participant

Send signals to a specific participant in an active Vonage Video session

posthttps://video.api.vonage.com/v2/project/:application_id/session/:session_id/connection/:connection_id/signal

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

connection_id
string
Required

Specific publisher connection ID

Request Body
Content Type
application/json

type
string
Required
examplechat

Type of data that is being sent to the client. This cannot exceed 128 bytes.

data
string
Required
exampleText of the chat message

Payload that is being sent to the client. This cannot exceed 8kb.

Example Request

{
   "type": "chat",
   "data": "Text of the chat message"
}

Responses

No Content

SIP

APIs relating to working with SIP calls in a video session

Initiate an outbound SIP call

To connect your SIP platform to an Vonage Video session, submit an HTTP POST request to the dial method. The audio from your end of the SIP call is added to the Vonage Video session as an audio-only stream. The Vonage Video Media Router mixes audio from other streams in the session and sends the mixed audio to your SIP endpoint.

The call ends when your SIP server sends a BYE message (to terminate the call). You can also end a call using the Vonage Video REST API method to disconnect a client from a session. The Vonage Video SIP gateway automatically ends a call after 5 minutes of inactivity (5 minutes without media received). Also, as a security measure, the Vonage Video SIP gateway closes any SIP call that lasts longer than 6 hours.

The SIP interconnect feature requires that you use an Vonage Video session that uses the Vonage Video Media Router (a session with the media mode set to routed).

For more information, including technical details and security considerations, see the Vonage Video SIP interconnect developer guide.

posthttps://video.api.vonage.com/v2/project/:application_id/dial

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Header Parameters

Content-Type
string

application/json

Request Body
Content Type
application/json

sessionId
string
Required
exampleb40ef09b-3811-4726-b508-e41a0f96c68f

The Vonage Video session ID for the SIP call to join.

token
string
Required
example78d335fa-323d-0114-9c3d-d6f0d48968cf

The Vonage Video token to be used for the participant being called. You can add token data to identify that the participant is on a SIP endpoint or for other identifying data, such as phone numbers. (The Vonage Video client libraries include properties for inspecting the connection data for a client connected to a session.) See the Token Creation developer guide.

sip
object
Required
uri
string
Required
examplesip:user@sip.partner.com;transport=tls

The SIP URI to be used as destination of the SIP call initiated from Vonage Video to your SIP platform. If the SIP ​uri​ contains a ​transport=tls​ header, the negotiation between Vonage and the SIP endpoint will be done securely. Note that this will only apply to the negotiation itself, and not to the transmission of audio. If you also audio transmission to be encrypted, set the ​secure​ property to ​true​.

from
string
examplefrom@example.com

The number or string that will be sent to the final SIP number as the caller. It must be a string in the form of from@example.com, where from can be a string or a number. If from is set to a number (for example, "14155550101@example.com"), it will show up as the incoming number on PSTN phones. If from is undefined or set to a string (for example, "joe@example.com"), +00000000 will show up as the incoming number on PSTN phones.

headers
object

This object defines custom headers to be added to the SIP ​INVITE​ request initiated from Vonage Video to your SIP platform.

headerKey
string
examplesome-value
auth
object

This object contains the username and password to be used in the the SIP INVITE​ request for HTTP digest authentication, if it is required by your SIP platform.

username
string
exampleusername
password
string
examplep@ssw0rd
secure
boolean

A Boolean flag that indicates whether the media must be transmitted encrypted (​true​) or not (​false​, the default)

video
boolean

A Boolean flag that indicates whether the SIP call will include video (​true​) or not (​false​, the default). With video included, the SIP client's video is included in the Vonage Video stream that is sent to the Vonage Video session. The SIP client will receive a single composed video of the published streams in the Vonage Video session.

observeForceMute
boolean

A boolean flag that indicates whether the SIP end point observes force mute moderation (true) or not (false, the default). Also, with observeForceMute set to true, the caller can press "*6" to unmute and mute the published audio. For the "*6" mute toggle to work, the SIP caller must negotiate RFC2833 DTMFs (RFC2833/RFC4733 digits). The mute toggle is not supported with SIP INFO or in-band DTMFs. A message (in English) is played to the caller when the caller mutes and unmutes, or when the SIP client is muted through a force mute action.

Example Request

{
   "sessionId": "b40ef09b-3811-4726-b508-e41a0f96c68f",
   "token": "78d335fa-323d-0114-9c3d-d6f0d48968cf",
   "sip": {
      "uri": "sip:user@sip.partner.com;transport=tls",
      "from": "from@example.com",
      "headers": {
         "headerKey": "some-value"
      },
      "auth": {
         "username": "username",
         "password": "p@ssw0rd"
      },
      "secure": false,
      "video": false,
      "observeForceMute": false
   }
}

Responses
Content Type
application/json

OK

id
string
exampleb0a5a8c7-dc38-459f-a48d-a7f2008da853

A unique ID for the SIP call.

connectionId
string
examplee9f8c166-6c67-440d-994a-04fb6dfed007

The Vonage Video connection ID for the SIP call's connection in the Vonage Video session. You can use this connection ID to terminate the SIP call, using the Vonage Video REST API.

streamId
string
example482bce73-f882-40fd-8ca5-cb74ff416036

The Vonage Video stream ID for the SIP call's stream in the Vonage Video session.

Example Response

{
   "id": "b0a5a8c7-dc38-459f-a48d-a7f2008da853",
   "connectionId": "e9f8c166-6c67-440d-994a-04fb6dfed007",
   "streamId": "482bce73-f882-40fd-8ca5-cb74ff416036"
}

Play DTMF tones into a SIP call

Use the play-dtmf REST API to send DTMF digits to all participants in an active Vonage Video session.

Telephony events are negotiated over SDP and transmitted as RFC4733/RFC2833 digits to the remote endpoint.

posthttps://video.api.vonage.com/v2/projects/:application_id/session/:session_id/play-dtmf

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

Header Parameters

Content-Type
string

application/json

Request Body
Content Type
application/json

digits
string
Required
example1713

The string of DTMF digits to send. This can include 0-9, '*', '#', and 'p'. A p indicates a pause of 500ms (if you need to add a delay in sending the digits).

Example Request

{
   "digits": "1713"
}

Responses

OK

Play DMTF tones into a specific connection

Use the play-dtmf REST API to send DTMF digits to a single participant in an Vonage Video call

Telephony events are negotiated over SDP and transmitted as RFC4733/RFC2833 digits to the remote endpoint.

posthttps://video.api.vonage.com/v2/projects/:application_id/session/:session_id/connection/:connection_id/play-dtmf

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

session_id
string
Required

Video session ID

connection_id
string
Required

Specific publisher connection ID

Header Parameters

Content-Type
string

application/json

Request Body
Content Type
application/json

digits
string
Required
example1713

The string of DTMF digits to send. This can include 0-9, '*', '#', and 'p'. A p indicates a pause of 500ms (if you need to add a delay in sending the digits).

Example Request

{
   "digits": "1713"
}

Responses

OK

Broadcast

APIs relating to live streaming and broadcasting

List Live Streaming Broadcasts

List Live Streaming Broadcasts

gethttps://video.api.vonage.com/v2/project/:application_id/broadcast

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Query Parameters

offset
integer

The start offset in the list of existing broadcasts

count
integer

The number of broadcasts to retrieve starting at offset. Default of 50, max of 1000

sessionId
string

Retrive only broadcasts for a given session ID

Responses
Content Type
application/json

Example response

count
integer
items
array
id
string
example1748b7070a81464c9759c46ad10d3734

The unique ID for the broadcast

sessionId
string
example2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4

The Vonage Video session ID

multiBroadcastTag
string
examplebroadcast_tag_provided

The unique tag for simultaneous broadcasts (if one was set).

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

createdAt
integer
example1437676551000

The time the broadcast started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC)

updatedAt
integer
example1437676551000

For this start method, this timestamp matches the createdAt timestamp.

maxDuration
integer
example5400

The maximum duration for the broadcast (if one was set), in seconds.

maxBitrate
integer
example2000000

The maximum bitrate for the stream.

broadcastUrls
object

An object containing details about the HLS and RTMP broadcasts.

hls
string
examplehlsurl

If you specified an HLS endpoint, the object includes an hls property, which is set to the URL for the HLS broadcast. Note this HLS broadcast URL points to an index file, an .M3U8-formatted playlist that contains a list of URLs to .ts media segment files (MPEG-2 transport stream files). While the URLs of both the playlist index file and media segment files are provided as soon as the HTTP response is returned, these URLs should not be accessed until 15 – 20 seconds later, after the initiation of the HLS broadcast, due to the delay between the HLS broadcast and the live streams in the Vonage Video session. See https://developer.apple.com/library/ios/technotes/tn2288/_index.html for more information about the playlist index file and media segment files for HLS.

rtmp
array

If you specified RTMP stream endpoints, the object includes an rtmp property. This is an array of objects that include information on each of the RTMP streams. Each of these objects has the following properties: id (the ID you assigned to the RTMP stream), serverUrl (the server URL), streamName (the stream name), and status property (which is set to "connecting"). You can call the Vonage Video REST method to check for status updates for the broadcast.

id
string

The ID you assigned to the RTMP stream

status
string

The current status of the RTMP stream

serverUrl
string

The Server URL

streamName
string

The stream name

settings
object
hls
object
lowLatency
boolean

Whether to enable low-latency mode for the HLSstream. Some HLS players do not support low-latency mode. This feature is incompatible with DVR mode HLS broadcasts.

dvr
boolean

Whether to enable DVR functionality — rewinding, pausing, and resuming — in players that support it (true), or not (false, the default). With DVR enabled, the HLS URL will include a ?DVR query string appended to the end.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
hasAudio
boolean

Whether the broadcast has audio

hasVideo
boolean

Whether the broadcast has video

streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
status
string

Current status of the broadcast

streams
array

An array of objects corresponding to streams currently being broadcast. This is only set for a broadcast with the status set to "started" and the streamMode set to "manual"

streamId
string

The stream ID of the stream included in the broadcast.

hasAudio
string

Whether the stream's audio is included in the broadcast.

hasVideo
string

Whether the stream's video is included in the broadcast.

Example Response

{
   "count": 0,
   "items": [
      {
         "id": "1748b7070a81464c9759c46ad10d3734",
         "sessionId": "2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4",
         "multiBroadcastTag": "broadcast_tag_provided",
         "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
         "createdAt": 1437676551000,
         "updatedAt": 1437676551000,
         "maxDuration": 5400,
         "maxBitrate": 2000000,
         "broadcastUrls": {
            "hls": "hlsurl",
            "rtmp": [
               {
                  "id": "string",
                  "status": "string",
                  "serverUrl": "string",
                  "streamName": "string"
               }
            ]
         },
         "settings": {
            "hls": {
               "lowLatency": true,
               "dvr": true
            }
         },
         "resolution": "640x480",
         "hasAudio": true,
         "hasVideo": true,
         "streamMode": "manual",
         "status": "string",
         "streams": [
            {
               "streamId": "string",
               "hasAudio": "string",
               "hasVideo": "string"
            }
         ]
      }
   ]
}

Start a Live Streaming Broadcast

Use this method to start a live streaming broadcast for an Vonage Video session. This broadcasts the session to an HLS (HTTP live streaming) or to RTMP streams.

To successfully start broadcasting a session, at least one client must be connected to the session.

The live streaming broadcast can target one HLS endpoint and up to five RTMP servers simultaneously for a session. You can only start live streaming for sessions that use the Vonage Video Media Router (with the media mode set to routed); you cannot use live streaming with sessions that have the media mode set to relayed. (See The Vonage Video Media Router and media modes.)

For more information about Vonage Video live streaming, see the Broadcast developer guide.

posthttps://video.api.vonage.com/v2/project/:application_id/broadcast

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Header Parameters

Content-Type
string

application/json

Request Body
Content Type
application/json

sessionId
string
Required
example2_MX40NTMyODc3Mn5-fg

Set this to the session ID of the Vonage Video session you want to broadcast.

layout
object

Specify this to assign the initial layout type for the broadcast.

If you do not specify an initial layout type, the broadcast stream uses the Best Fit layout type. For more information, see Configuring Video Layout for the Vonage Video live streaming feature.

type
string
Required
examplecustom
Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation
stylesheet
string
examplethe layout stylesheet (only used with type == custom)

If you specify a "custom" layout type, set the stylesheet property of the layout object to the stylesheet. (For other layout types, do not set a stylesheet property.)

screenshareType
string
examplehorizontalPresentation

Set the screenshareType property to the layout type to use when there is a screen-sharing stream in the session. (This property is optional.) Note if you set the screenshareType property, you must set the type property to "bestFit" and leave the stylesheet property unset.

Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation
maxDuration
integer
example5400

The maximum duration for the broadcast, in seconds. The broadcast will automatically stop when the maximum duration is reached. You can set the maximum duration to a value from 60 (60 seconds) to 36000 (10 hours). The default maximum duration is 4 hours (14,400 seconds)

outputs
object
Required
This object defines the types of broadcast streams you want to start (both HLS and RTMP). You can include HLS, RTMP, or both as broadcast streams. If you include RTMP streaming, you can specify up to five target RTMP streams (or just one). Vonage streams the session to each RTMP URL you specify. Note that Vonage Video live streaming supports RTMP and RTMPS.
Any Of
hls
object
Required
dvr
boolean

Whether to enable DVR functionality — rewinding, pausing, and resuming — in players that support it (true), or not (false, the default). With DVR enabled, the HLS URL will include a ?DVR query string appended to the end.

lowLatency
boolean

Whether to enable low-latency mode for the HLSstream. Some HLS players do not support low-latency mode. This feature is incompatible with DVR mode HLS broadcasts.

rtmp
array
id
string
examplefoo

a unique ID for the stream

serverUrl
string
Required
examplertmps://myfooserver/myfooapp

the RTMP server URL

streamName
string
Required
examplemyfoostream

the stream name, such as the YouTube Live stream name or the Facebook stream key

resolution
string
example1920x1080
Must be one of:640x4801280x7201920x1080480x640720x12801080x1920
streamMode
string
Defaultauto
examplemanual
Must be one of:automanual
multiBroadcastTag
string
examplefoo

Set this to support multiple broadcasts for the same session simultaneously. Set this to a unique string for each simultaneous broadcast of an ongoing session. See Simultaneous broadcasts.

maxBitrate
number
Min100000
Max6000000
example200000

The maximum video bitrate for the archive, in bits per second. This option is only valid for composed archives. Set the maximum video bitrate to control the size of the composed archive. This maximum bitrate applies to the video bitrate only. If the output archive has audio, those bits will be excluded from the limit.

Example Request

{
   "sessionId": "2_MX40NTMyODc3Mn5-fg",
   "layout": {
      "type": "custom",
      "stylesheet": "the layout stylesheet (only used with type == custom)",
      "screenshareType": "horizontalPresentation"
   },
   "maxDuration": 5400,
   "outputs": {
      "hls": {
         "dvr": true,
         "lowLatency": true
      },
      "rtmp": [
         {
            "id": "foo",
            "serverUrl": "rtmps://myfooserver/myfooapp",
            "streamName": "myfoostream"
         }
      ]
   },
   "resolution": "1920x1080",
   "streamMode": "manual",
   "multiBroadcastTag": "foo",
   "maxBitrate": 200000
}

Responses
Content Type
application/json

Example response

id
string
example1748b7070a81464c9759c46ad10d3734

The unique ID for the broadcast

sessionId
string
example2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4

The Vonage Video session ID

multiBroadcastTag
string
examplebroadcast_tag_provided

The unique tag for simultaneous broadcasts (if one was set).

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

createdAt
integer
example1437676551000

The time the broadcast started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC)

updatedAt
integer
example1437676551000

For this start method, this timestamp matches the createdAt timestamp.

maxDuration
integer
example5400

The maximum duration for the broadcast (if one was set), in seconds.

maxBitrate
integer
example2000000

The maximum bitrate for the stream.

broadcastUrls
object

An object containing details about the HLS and RTMP broadcasts.

hls
string
examplehlsurl

If you specified an HLS endpoint, the object includes an hls property, which is set to the URL for the HLS broadcast. Note this HLS broadcast URL points to an index file, an .M3U8-formatted playlist that contains a list of URLs to .ts media segment files (MPEG-2 transport stream files). While the URLs of both the playlist index file and media segment files are provided as soon as the HTTP response is returned, these URLs should not be accessed until 15 – 20 seconds later, after the initiation of the HLS broadcast, due to the delay between the HLS broadcast and the live streams in the Vonage Video session. See https://developer.apple.com/library/ios/technotes/tn2288/_index.html for more information about the playlist index file and media segment files for HLS.

rtmp
array

If you specified RTMP stream endpoints, the object includes an rtmp property. This is an array of objects that include information on each of the RTMP streams. Each of these objects has the following properties: id (the ID you assigned to the RTMP stream), serverUrl (the server URL), streamName (the stream name), and status property (which is set to "connecting"). You can call the Vonage Video REST method to check for status updates for the broadcast.

id
string

The ID you assigned to the RTMP stream

status
string

The current status of the RTMP stream

serverUrl
string

The Server URL

streamName
string

The stream name

settings
object
hls
object
lowLatency
boolean

Whether to enable low-latency mode for the HLSstream. Some HLS players do not support low-latency mode. This feature is incompatible with DVR mode HLS broadcasts.

dvr
boolean

Whether to enable DVR functionality — rewinding, pausing, and resuming — in players that support it (true), or not (false, the default). With DVR enabled, the HLS URL will include a ?DVR query string appended to the end.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
hasAudio
boolean

Whether the broadcast has audio

hasVideo
boolean

Whether the broadcast has video

streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
status
string

Current status of the broadcast

streams
array

An array of objects corresponding to streams currently being broadcast. This is only set for a broadcast with the status set to "started" and the streamMode set to "manual"

streamId
string

The stream ID of the stream included in the broadcast.

hasAudio
string

Whether the stream's audio is included in the broadcast.

hasVideo
string

Whether the stream's video is included in the broadcast.

Example Response

{
   "id": "1748b7070a81464c9759c46ad10d3734",
   "sessionId": "2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4",
   "multiBroadcastTag": "broadcast_tag_provided",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "createdAt": 1437676551000,
   "updatedAt": 1437676551000,
   "maxDuration": 5400,
   "maxBitrate": 2000000,
   "broadcastUrls": {
      "hls": "hlsurl",
      "rtmp": [
         {
            "id": "string",
            "status": "string",
            "serverUrl": "string",
            "streamName": "string"
         }
      ]
   },
   "settings": {
      "hls": {
         "lowLatency": true,
         "dvr": true
      }
   },
   "resolution": "640x480",
   "hasAudio": true,
   "hasVideo": true,
   "streamMode": "manual",
   "status": "string",
   "streams": [
      {
         "streamId": "string",
         "hasAudio": "string",
         "hasVideo": "string"
      }
   ]
}

Get Information about Broadcast

Use this method to get details on a broadcast that is in-progress.

gethttps://video.api.vonage.com/v2/project/:application_id/broadcast/:broadcast_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

broadcast_id
string
Required

ID of the broadcast

Responses
Content Type
application/json

Example response

id
string
example1748b7070a81464c9759c46ad10d3734

The unique ID for the broadcast

sessionId
string
example2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4

The Vonage Video session ID

multiBroadcastTag
string
examplebroadcast_tag_provided

The unique tag for simultaneous broadcasts (if one was set).

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

createdAt
integer
example1437676551000

The time the broadcast started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC)

updatedAt
integer
example1437676551000

For this start method, this timestamp matches the createdAt timestamp.

maxDuration
integer
example5400

The maximum duration for the broadcast (if one was set), in seconds.

maxBitrate
integer
example2000000

The maximum bitrate for the stream.

broadcastUrls
object

An object containing details about the HLS and RTMP broadcasts.

hls
string
examplehlsurl

If you specified an HLS endpoint, the object includes an hls property, which is set to the URL for the HLS broadcast. Note this HLS broadcast URL points to an index file, an .M3U8-formatted playlist that contains a list of URLs to .ts media segment files (MPEG-2 transport stream files). While the URLs of both the playlist index file and media segment files are provided as soon as the HTTP response is returned, these URLs should not be accessed until 15 – 20 seconds later, after the initiation of the HLS broadcast, due to the delay between the HLS broadcast and the live streams in the Vonage Video session. See https://developer.apple.com/library/ios/technotes/tn2288/_index.html for more information about the playlist index file and media segment files for HLS.

rtmp
array

If you specified RTMP stream endpoints, the object includes an rtmp property. This is an array of objects that include information on each of the RTMP streams. Each of these objects has the following properties: id (the ID you assigned to the RTMP stream), serverUrl (the server URL), streamName (the stream name), and status property (which is set to "connecting"). You can call the Vonage Video REST method to check for status updates for the broadcast.

id
string

The ID you assigned to the RTMP stream

status
string

The current status of the RTMP stream

serverUrl
string

The Server URL

streamName
string

The stream name

settings
object
hls
object
lowLatency
boolean

Whether to enable low-latency mode for the HLSstream. Some HLS players do not support low-latency mode. This feature is incompatible with DVR mode HLS broadcasts.

dvr
boolean

Whether to enable DVR functionality — rewinding, pausing, and resuming — in players that support it (true), or not (false, the default). With DVR enabled, the HLS URL will include a ?DVR query string appended to the end.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
hasAudio
boolean

Whether the broadcast has audio

hasVideo
boolean

Whether the broadcast has video

streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
status
string

Current status of the broadcast

streams
array

An array of objects corresponding to streams currently being broadcast. This is only set for a broadcast with the status set to "started" and the streamMode set to "manual"

streamId
string

The stream ID of the stream included in the broadcast.

hasAudio
string

Whether the stream's audio is included in the broadcast.

hasVideo
string

Whether the stream's video is included in the broadcast.

Example Response

{
   "id": "1748b7070a81464c9759c46ad10d3734",
   "sessionId": "2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4",
   "multiBroadcastTag": "broadcast_tag_provided",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "createdAt": 1437676551000,
   "updatedAt": 1437676551000,
   "maxDuration": 5400,
   "maxBitrate": 2000000,
   "broadcastUrls": {
      "hls": "hlsurl",
      "rtmp": [
         {
            "id": "string",
            "status": "string",
            "serverUrl": "string",
            "streamName": "string"
         }
      ]
   },
   "settings": {
      "hls": {
         "lowLatency": true,
         "dvr": true
      }
   },
   "resolution": "640x480",
   "hasAudio": true,
   "hasVideo": true,
   "streamMode": "manual",
   "status": "string",
   "streams": [
      {
         "streamId": "string",
         "hasAudio": "string",
         "hasVideo": "string"
      }
   ]
}

Stop Broadcast

Use this method to stop a live broadcast of an Vonage Video session.

Note that a broadcast stops automatically 60 seconds after the last client disconnects from the session. Also there is a default maximum duration of 4 hours (14,400 seconds) for each HLS and RTMP stream (the live stream broadcast automatically stops when this duration is reached). You can change the maximum duration for the broadcast by setting the maxDuration property when you start the broadcast REST method.

posthttps://video.api.vonage.com/v2/project/:application_id/broadcast/:broadcast_id/stop

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

broadcast_id
string
Required

ID of the broadcast

Responses
Content Type
application/json

Example response

id
string
example1748b7070a81464c9759c46ad10d3734

The unique ID for the broadcast

sessionId
string
example2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4

The Vonage Video session ID

multiBroadcastTag
string
examplebroadcast_tag_provided

The unique tag for simultaneous broadcasts (if one was set).

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

createdAt
integer
example1437676551000

The time the broadcast started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC)

updatedAt
integer
example1437676551000

For this start method, this timestamp matches the createdAt timestamp.

maxDuration
integer
example5400

The maximum duration for the broadcast (if one was set), in seconds.

maxBitrate
integer
example2000000

The maximum bitrate for the stream.

broadcastUrls
object

An object containing details about the HLS and RTMP broadcasts.

hls
string
examplehlsurl

If you specified an HLS endpoint, the object includes an hls property, which is set to the URL for the HLS broadcast. Note this HLS broadcast URL points to an index file, an .M3U8-formatted playlist that contains a list of URLs to .ts media segment files (MPEG-2 transport stream files). While the URLs of both the playlist index file and media segment files are provided as soon as the HTTP response is returned, these URLs should not be accessed until 15 – 20 seconds later, after the initiation of the HLS broadcast, due to the delay between the HLS broadcast and the live streams in the Vonage Video session. See https://developer.apple.com/library/ios/technotes/tn2288/_index.html for more information about the playlist index file and media segment files for HLS.

rtmp
array

If you specified RTMP stream endpoints, the object includes an rtmp property. This is an array of objects that include information on each of the RTMP streams. Each of these objects has the following properties: id (the ID you assigned to the RTMP stream), serverUrl (the server URL), streamName (the stream name), and status property (which is set to "connecting"). You can call the Vonage Video REST method to check for status updates for the broadcast.

id
string

The ID you assigned to the RTMP stream

status
string

The current status of the RTMP stream

serverUrl
string

The Server URL

streamName
string

The stream name

settings
object
hls
object
lowLatency
boolean

Whether to enable low-latency mode for the HLSstream. Some HLS players do not support low-latency mode. This feature is incompatible with DVR mode HLS broadcasts.

dvr
boolean

Whether to enable DVR functionality — rewinding, pausing, and resuming — in players that support it (true), or not (false, the default). With DVR enabled, the HLS URL will include a ?DVR query string appended to the end.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
hasAudio
boolean

Whether the broadcast has audio

hasVideo
boolean

Whether the broadcast has video

streamMode
string
examplemanual

Whether streams included in the archive are selected automatically ("auto", the default) or manually ("manual"). When streams are selected automatically ("auto"), all streams in the session can be included in the archive. When streams are selected manually ("manual"), you specify streams to be included based on calls to this REST method. You can specify whether a stream's audio, video, or both are included in the archive. In composed archives, in both automatic and manual modes, the archive composer includes streams based on stream prioritization rules.

Must be one of:automanual
status
string

Current status of the broadcast

streams
array

An array of objects corresponding to streams currently being broadcast. This is only set for a broadcast with the status set to "started" and the streamMode set to "manual"

streamId
string

The stream ID of the stream included in the broadcast.

hasAudio
string

Whether the stream's audio is included in the broadcast.

hasVideo
string

Whether the stream's video is included in the broadcast.

Example Response

{
   "id": "1748b7070a81464c9759c46ad10d3734",
   "sessionId": "2_MX4xMDBfjE0Mzc2NzY1NDgwMTJ-TjMzfn4",
   "multiBroadcastTag": "broadcast_tag_provided",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "createdAt": 1437676551000,
   "updatedAt": 1437676551000,
   "maxDuration": 5400,
   "maxBitrate": 2000000,
   "broadcastUrls": {
      "hls": "hlsurl",
      "rtmp": [
         {
            "id": "string",
            "status": "string",
            "serverUrl": "string",
            "streamName": "string"
         }
      ]
   },
   "settings": {
      "hls": {
         "lowLatency": true,
         "dvr": true
      }
   },
   "resolution": "640x480",
   "hasAudio": true,
   "hasVideo": true,
   "streamMode": "manual",
   "status": "string",
   "streams": [
      {
         "streamId": "string",
         "hasAudio": "string",
         "hasVideo": "string"
      }
   ]
}

Dynamically change layout of a broadcast

You can dynamically change the layout type of a live streaming broadcast.

For more information about Vonage Video live streaming broadcasts, see the Broadcast developer guide.

puthttps://video.api.vonage.com/v2/project/:application_id/broadcast/:broadcast_id/layout

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

broadcast_id
string
Required
application_id
string
Required

Vonage Application UUID

Request Body
Content Type
application/json

type
string
examplebestFit

Specify this to assign the initial layout type for the archive. This applies only to composed archives. This object has three properties: type, stylesheet, and screenshareType, which are each strings. Valid values for the layout property are "bestFit" (best fit), "custom" (custom), "horizontalPresentation" (horizontal presentation), "pip" (picture-in-picture), and "verticalPresentation" (vertical presentation)). If you specify a "custom" layout type, set the stylesheet property of the layout object to the stylesheet. (For other layout types, do not set a stylesheet property.) Set the screenshareType property to the layout type to use when there is a screen-sharing stream in the session. (This property is optional.) Note if you set the screenshareType property, you must set the type property to "bestFit" and leave the stylesheet property unset. If you do not specify an initial layout type, the archive uses the best fit layout type.

Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation
stylesheet
string
examplestream.instructor {position: absolute; width: 100%; height:50%;}

Used for the custom layout to define the visual layout

screenshareType
string
examplepip

Set the screenshareType property to the layout type to use when there is a screen-sharing stream in the session. (This property is optional.) Note if you set the screenshareType property, you must set the type property to "bestFit" and leave the stylesheet property unset.

Must be one of:bestFitcustomhorizontalPresentationpipverticalPresentation

Example Request

{
   "type": "bestFit",
   "stylesheet": "stream.instructor {position: absolute; width: 100%;  height:50%;}",
   "screenshareType": "pip"
}

Responses

OK

Selecting streams to be included in a live streaming broadcast

Use this method to change the streams included in a live streaming broadcast that was started with the streamMode set to "manual" (see Starting a live streaming broadcast).

The broadcast composer includes added streams based on stream prioritization rules.

patchhttps://video.api.vonage.com/v2/project/:application_id/broadcast/:broadcast_id/streams

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

broadcast_id
string
Required
application_id
string
Required

Vonage Application UUID

Request Body
Content Type
application/json

One Of
addStream
string
example12312312-3811-4726-b508-e41a0f96c68f

The stream ID to add

hasAudio
boolean
Defaulttrue

Whether to include the stream's audio

hasVideo
boolean
Defaulttrue

Whether to include the stream's video

Example Request

{
   "addStream": "12312312-3811-4726-b508-e41a0f96c68f",
   "hasAudio": true,
   "hasVideo": true
}

Responses

No Content

Live Captions

APIs relating to live captioning

Start Live Captions for a Vonage Video stream

Use this method to start real-time Live Captions for an Vonage Video Session.

The maximum allowed duration is 4 hours, after which the audio captioning will stop without any effect on the ongoing Vonage Video Session. An event will be posted to your callback URL if provided when starting the captions.

Each Vonage Video Session supports only one audio captioning session.

posthttps://video.api.vonage.com/v2/project/:application_id/captions

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Request Body
Content Type
application/json

sessionId
string
Required
example12312312-3811-4726-b508-e41a0f96c68f

The session ID of the Vonage Video session. The audio from Publishers publishing into this session will be used to generate the captions.

token
string
Required
exampleeyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2OTkwNDMxMTEsImV4cCI6MTY5OTA2NDcxMSwianRpIjoiMW1pODlqRk9meVpRIiwiYXBwbGljYXRpb25faWQiOiIxMjMxMjMxMi0zODExLTQ3MjYtYjUwOC1lNDFhMGY5NmM2OGYiLCJzdWIiOiJ2aWRlbyIsImFjbCI6IiJ9.o3U506EejsS8D5Tob90FG1NC1cR69fh3pFOpxnyTHVFfgqI6NWuuN8lEwrS3Zb8bGxE_A9LyyUZ2y4uqLpyXRw

A valid Vonage Video token with role set to Moderator.

languageCode
string
Defaulten-US
exampleen-US

The BCP-47 code for a spoken language used on this call. The default value is "en-US".

Must be one of:en-USen-AUen-GBzh-CNfr-FRfr-CAde-DEhi-INit-ITja-JPko-KRpt-BRth-TH
maxDuration
number
Min300
Default14400
example1800

The maximum duration for the audio captioning, in seconds. The default value is 14,400 seconds (4 hours), the maximum duration allowed. The minimum value for maxDuration is 300 (300 seconds, or 5 minutes).

partialCaptions
boolean
Defaulttrue
exampletrue

Whether to enable this to faster captioning at the cost of some degree of inaccuracies.

statusCallbackUrl
string
Min15
Max2048
examplehttps://send-status-to.me

A publicly reachable URL controlled by the customer and capable of generating the content to be rendered without user intervention

Example Request

{
   "sessionId": "12312312-3811-4726-b508-e41a0f96c68f",
   "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2OTkwNDMxMTEsImV4cCI6MTY5OTA2NDcxMSwianRpIjoiMW1pODlqRk9meVpRIiwiYXBwbGljYXRpb25faWQiOiIxMjMxMjMxMi0zODExLTQ3MjYtYjUwOC1lNDFhMGY5NmM2OGYiLCJzdWIiOiJ2aWRlbyIsImFjbCI6IiJ9.o3U506EejsS8D5Tob90FG1NC1cR69fh3pFOpxnyTHVFfgqI6NWuuN8lEwrS3Zb8bGxE_A9LyyUZ2y4uqLpyXRw",
   "languageCode": "en-US",
   "maxDuration": 1800,
   "partialCaptions": true,
   "statusCallbackUrl": "https://send-status-to.me"
}

Responses
Content Type
application/json

ID of the Captions stream that was started

captionsId
string
Required
example7c0680fc-6274-4de5-a66f-d0648e8d3ac2

Unique ID of the audio captioning session

Example Response

{
   "captionsId": "7c0680fc-6274-4de5-a66f-d0648e8d3ac2"
}

Stop live captions for a session

Stop live captions for a session

posthttps://video.api.vonage.com/v2/project/:application_id/captions/:captions_id/stop

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

captions_id
string
Required

ID of the connection used for captions

Responses

Accepted

Audio Connector

APIs relating to audio connector

Start an audio connector connection

Use this method to send audio from a Vonage Video API session to a WebSocket.

posthttps://video.api.vonage.com/v2/project/:application_id/connect

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Request Body
Content Type
application/json

sessionId
string
Required
example12312312-3811-4726-b508-e41a0f96c68f

The Vonage Video session ID that includes the Vonage Video streams you want to include in the WebSocket stream. The Audio Connector feature is only supported in routed sessions

token
string
Required
exampleeyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2OTkwNDMxMTEsImV4cCI6MTY5OTA2NDcxMSwianRpIjoiMW1pODlqRk9meVpRIiwiYXBwbGljYXRpb25faWQiOiIxMjMxMjMxMi0zODExLTQ3MjYtYjUwOC1lNDFhMGY5NmM2OGYiLCJzdWIiOiJ2aWRlbyIsImFjbCI6IiJ9.o3U506EejsS8D5Tob90FG1NC1cR69fh3pFOpxnyTHVFfgqI6NWuuN8lEwrS3Zb8bGxE_A9LyyUZ2y4uqLpyXRw

A valid Vonage Video token for the Audio Connector connection to the Vonage Video Session. You can add additional data to the JWT to identify that the connection is the Audio Connector endpoint or for any other identifying data.

websocket
object
Required
uri
string
Required
examplewss://example.com/ws-endpoint

A publicly reachable WebSocket URI to be used for the destination of the audio stream

streams
array

An array of stream IDs for the Vonage Video streams you want to include in the WebSocket audio. If you omit this property, all streams in the session will be included.

headers
object

An object of key-value pairs of headers to be sent to your WebSocket server with each message, with a maximum length of 512 bytes.

audioRate
number
example8000

A number representing the audio sampling rate in Hz.

Must be one of:800016000

Example Request

{
   "sessionId": "12312312-3811-4726-b508-e41a0f96c68f",
   "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2OTkwNDMxMTEsImV4cCI6MTY5OTA2NDcxMSwianRpIjoiMW1pODlqRk9meVpRIiwiYXBwbGljYXRpb25faWQiOiIxMjMxMjMxMi0zODExLTQ3MjYtYjUwOC1lNDFhMGY5NmM2OGYiLCJzdWIiOiJ2aWRlbyIsImFjbCI6IiJ9.o3U506EejsS8D5Tob90FG1NC1cR69fh3pFOpxnyTHVFfgqI6NWuuN8lEwrS3Zb8bGxE_A9LyyUZ2y4uqLpyXRw",
   "websocket": {
      "uri": "wss://example.com/ws-endpoint",
      "streams": [
         "streamId-1",
         "streamId-2"
      ],
      "headers": {
         "property1": "string",
         "property2": "string"
      },
      "audioRate": 8000
   }
}

Responses
Content Type
application/json

Information about the audio connector session that was started

id
string
Required
exampleb0a5a8c7-dc38-459f-a48d-a7f2008da853

A unique ID identifying the Audio Connector WebSocket connection.

captionsId
string
Required
example7c0680fc-6274-4de5-a66f-d0648e8d3ac2

Unique ID of the audio captioning session

Example Response

{
   "id": "b0a5a8c7-dc38-459f-a48d-a7f2008da853",
   "captionsId": "7c0680fc-6274-4de5-a66f-d0648e8d3ac2"
}

Experience Composer

APIs relating to Experience Composer

Start an Experience Composer Session

Use this method to create an Experience Composer for an OpenTok session.

posthttps://video.api.vonage.com/v2/project/:application_id/render

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Request Body
Content Type
application/json

sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

token
string
example830c9c9d-d09e-4513-9cc8-29c90a760248

A valid OpenTok JWT token with a Publisher role and (optionally) connection data to be associated with the output stream.

url
string
Min15
Max2048
examplehttps://example.com/

A publicly reachable URL controlled by the customer and capable of generating the content to be rendered without user intervention.

maxDuration
number
Min60
Max36000
Default7200
example1800

The maximum time allowed for the Experience Composer, in seconds. After this time, it is stopped automatically, if it is still running. The maximum value is 36000 (10 hours), the minimum value is 60 (1 minute), and the default value is 7200 (2 hours). When the Experience Composer ends, its stream is unpublished and an event is posted to the callback URL, if configured in the Application Config.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
properties
object

The initial configuration of Publisher properties for the composed output stream.

name
string
Required
Min1
Max200
exampleComposed stream for Live event #1

The name of the composed output stream which is published to the session.

Example Request

{
   "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
   "token": "830c9c9d-d09e-4513-9cc8-29c90a760248",
   "url": "https://example.com/",
   "maxDuration": 1800,
   "resolution": "640x480",
   "properties": {
      "name": "Composed stream for Live event #1"
   }
}

Responses
Content Type
application/json

Experience Composer information after starting

id
string
example1248e7070b81464c9789f46ad10e7764

The unique ID for the Experience Composer.

sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

createdAt
number
example1437676551000

The time the Experience Composer started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

callbackUrl
string
examplehttps://example.com/video/events

The callback URL for Experience Composer events (if one was set).

updatedAt
number
example1437676551000

This is the UNIX timestamp when the Experience Composer status was last updated. For this start method, this timestamp matches the createdAt timestamp.

name
string
Min1
Max200
exampleComposed stream for Live event #1

The name of the composed output stream which is published to the session.

url
string
Min15
Max2048
examplehttps://example.com/

A publicly reachable URL controlled by the customer and capable of generating the content to be rendered without user intervention.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
status
string
examplestarting
Must be one of:startingstartedstoppedfailed
streamId
string
examplee32445b743678c98230f238

The ID of the composed stream being published.

Example Response

{
   "id": "1248e7070b81464c9789f46ad10e7764",
   "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "createdAt": 1437676551000,
   "callbackUrl": "https://example.com/video/events",
   "updatedAt": 1437676551000,
   "name": "Composed stream for Live event #1",
   "url": "https://example.com/",
   "resolution": "640x480",
   "status": "starting",
   "streamId": "e32445b743678c98230f238"
}

List all experience composers in an application

List all experience composer in an application

gethttps://video.api.vonage.com/v2/project/:application_id/render

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

Query Parameters

offset
integer

Set an offset query parameters to specify the index offset of the first experience composer. 0 is offset of the most recently started archive (excluding deleted archive). 1 is the offset of the experience composer that started prior to the most recent composer. The default value is 0.

count
integer

Set a count query parameter to limit the number of experience composers to be returned. The default number of archives returned is 50 (or fewer, if there are fewer than 50 archives). The default is 50 and the maximum is 1000

Responses
Content Type
application/json

OK

count
integer
example1

The total number of experience composers for the Application ID key.

items
array

An array of objects defining each experience composer retrieved. Experience Composers are listed from the newest to the oldest in the return set.

id
string
example1248e7070b81464c9789f46ad10e7764

The unique ID for the Experience Composer.

sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

createdAt
number
example1437676551000

The time the Experience Composer started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

callbackUrl
string
examplehttps://example.com/video/events

The callback URL for Experience Composer events (if one was set).

updatedAt
number
example1437676551000

This is the UNIX timestamp when the Experience Composer status was last updated. For this start method, this timestamp matches the createdAt timestamp.

name
string
Min1
Max200
exampleComposed stream for Live event #1

The name of the composed output stream which is published to the session.

url
string
Min15
Max2048
examplehttps://example.com/

A publicly reachable URL controlled by the customer and capable of generating the content to be rendered without user intervention.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
status
string
examplestarting
Must be one of:startingstartedstoppedfailed
streamId
string
examplee32445b743678c98230f238

The ID of the composed stream being published.

reason
string
exampleCould not load URL

The reason field is only available when the status is either "stopped" or "failed". If the status is stopped, the reason field will contain either "Max Duration Exceeded" or "Stop Requested." If the status is failed, the reason will contain a more specific error message.

Example Response

{
   "count": 1,
   "items": [
      {
         "id": "1248e7070b81464c9789f46ad10e7764",
         "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
         "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
         "createdAt": 1437676551000,
         "callbackUrl": "https://example.com/video/events",
         "updatedAt": 1437676551000,
         "name": "Composed stream for Live event #1",
         "url": "https://example.com/",
         "resolution": "640x480",
         "status": "starting",
         "streamId": "e32445b743678c98230f238",
         "reason": "Could not load URL"
      }
   ]
}

Get an Experience Composer Session

Use this method to get details on an Experience Composer.

gethttps://video.api.vonage.com/v2/project/:application_id/render/:experience_composer_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

experience_composer_id
string
Required

ID of the Experience Composer instance

Responses
Content Type
application/json

Experience Composer information after starting

id
string
example1248e7070b81464c9789f46ad10e7764

The unique ID for the Experience Composer.

sessionId
string
exampleflR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN

The session ID of the Vonage Video session you are working with

applicationId
string
example93e36bb9-b72c-45b6-a9ea-5c37dbc49906

A Vonage Application ID

createdAt
number
example1437676551000

The time the Experience Composer started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

callbackUrl
string
examplehttps://example.com/video/events

The callback URL for Experience Composer events (if one was set).

updatedAt
number
example1437676551000

This is the UNIX timestamp when the Experience Composer status was last updated. For this start method, this timestamp matches the createdAt timestamp.

name
string
Min1
Max200
exampleComposed stream for Live event #1

The name of the composed output stream which is published to the session.

url
string
Min15
Max2048
examplehttps://example.com/

A publicly reachable URL controlled by the customer and capable of generating the content to be rendered without user intervention.

resolution
string

The resolution of the archive, either "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). You may want to use a portrait aspect ratio for archives that include video streams from mobile devices (which often use the portrait aspect ratio). This property only applies to composed archives. If you set this property and set the outputMode property to "individual", the call to the REST method results in an error.

Must be one of:640x480480x6401280x720720x12801080x19201920x1080
status
string
examplestarting
Must be one of:startingstartedstoppedfailed
streamId
string
examplee32445b743678c98230f238

The ID of the composed stream being published.

reason
string
exampleCould not load URL

The reason field is only available when the status is either "stopped" or "failed". If the status is stopped, the reason field will contain either "Max Duration Exceeded" or "Stop Requested." If the status is failed, the reason will contain a more specific error message.

Example Response

{
   "id": "1248e7070b81464c9789f46ad10e7764",
   "sessionId": "flR1ZSBPY3QgMjkgMTI6MTM6MjMgUERUIDIwMTN",
   "applicationId": "93e36bb9-b72c-45b6-a9ea-5c37dbc49906",
   "createdAt": 1437676551000,
   "callbackUrl": "https://example.com/video/events",
   "updatedAt": 1437676551000,
   "name": "Composed stream for Live event #1",
   "url": "https://example.com/",
   "resolution": "640x480",
   "status": "starting",
   "streamId": "e32445b743678c98230f238",
   "reason": "Could not load URL"
}

Stop an Experience Composer

Use this method to stop an Experience Composer of an OpenTok session.

deletehttps://video.api.vonage.com/v2/project/:application_id/render/:experience_composer_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

application_id
string
Required

Vonage Application UUID

experience_composer_id
string
Required

ID of the Experience Composer instance

Responses

No Content