Skip to main contentIBM Video Streaming Developers

Live CTA

Get a list of CTAs for a user

Returns all CTAs for a user

GET https://api.video.ibm.com/users/{userId}/ctas.json

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value pairs under a ctas key.

KEYTYPEDESCRIPTION
idintegerCTA ID
titlestringTitle of CTA
textstringText for CTA
button_textstringText on CTA button
button_urlstringTarget of the CTA
created_atintegerTimestamp of CTA creation
is_activebooleanTrue if the the CTA is active
channel_ididID of channel where the CTA is active
activated_atintegerTimestamp of CTA activation

Example of a success response:

{
"ctas": [
{
"id": 12345,
"title": "hey",
"text": "support our foundation!",
"button_text": "Donate",
"button_url": "https://paypal.com/donate?to=ourfoundation&amount=5",
"created_at": 1606982795,

Get information about a CTA

Returns all CTAs for a user

GET https://api.video.ibm.com/users/{userId}/ctas/{ctaId}.json

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value pairs under a cta key.

KEYTYPEDESCRIPTION
idintegerCTA ID
titlestringTitle of CTA
textstringText for CTA
button_textstringText on CTA button
button_urlstringTarget of the CTA
created_atintegerTimestamp of CTA creation
is_activebooleanTrue if the the CTA is active
channel_ididID of channel where the CTA is active
activated_atintegerTimestamp of CTA activation

Example of a success response:

{
"cta": [
{
"id": 12345,
"title": "hey",
"text": "support our foundation!",
"button_text": "Donate",
"button_url": "https://paypal.com/donate?to=ourfoundation&amount=5",
"created_at": 1606982795,

Creating CTA

POST https://api.video.ibm.com/users/{userId}/ctas.json
PARAMETERTYPEIMPORTANCEDESCRIPTION
titlestringREQUIREDCTA title
textstringREQUIREDCTA text
button_textstringREQUIREDCTA button text
button_urlstringREQUIREDCTA button link url

Success response

HTTP/1.1 201 Created
Location: https://api.video.ibm.com/users/{userId}/ctas/{ctaId}.json

Uploading (adding/updating) CTA image

PUT https://api.video.ibm.com/users/{userId}/ctas/{ctaId}/image.json

Request

  • The logo must be passed in the HTTP body.
  • Supported image type:
    • image/jpeg
    • image/png
    • image/gif
  • Image ratio must be 1:1
  • Minimum image dimensions: 200 x 200 pixels

CTA activation

PUT https://api.video.ibm.com/users/{userId}/ctas/{ctaId}/live.json
PARAMETERTYPEIMPORTANCEDESCRIPTION
channel_idintREQUIREDThe channel id where the CTA is activated

Success

200 OK HTTP status code

Errors

HTTP STATUS CODEDESCRIPTION
403Resource ownership mismatch
404Resource not found
409Conflicting status. e.g.: CTA is active on a different channel

CTA deactivation

DELETE https://api.video.ibm.com/users/{userId}/ctas/{ctaId}/live.json

Success

200 OK HTTP status code

Errors

HTTP STATUS CODEDESCRIPTION
403Resource ownership mismatch
404Resource not found

CTA deletion

DELETE https://api.video.ibm.com/users/{userId}/ctas/{ctaId}.json

Success

200 OK HTTP status code

Errors

HTTP STATUS CODEDESCRIPTION
403Resource ownership mismatch
404Resource not found
409Conflicting status. e.g.: CTA is active on a channel

Updating a CTA

PUT https://api.video.ibm.com/users/{userId}/ctas/{ctaId}.json
PARAMETERTYPEIMPORTANCEDESCRIPTION
titlestringREQUIREDCTA title
textstringREQUIREDCTA text
button_textstringREQUIREDCTA button text
button_urlstringREQUIREDCTA button link url

Success

200 OK HTTP status code

Errors

HTTP STATUS CODEDESCRIPTION
400Field validation failed
403Resource ownership mismatch
404Resource not found