Links
Advanced link management
As part of enhancing video objects within our REST API, it is now possible to incorporate complex objects of type "Link." The "ads" type specifies a feature tailored for the video player, enabling the customization of a link associated with the video. Below, you will find a detailed explanation of how these links function.
Creating a link
To create a link to a video, you can make a cURL POST request with the following Add link to the video
curl -X GET\
'<<SBX_SERVER>>/videos/{video_id}/links' \
-H 'accept: application/json' \
-H 'x-api-key: <<SBX_DEMO_KEY>>' \
-d '{
"type": "linkType",
"title": "Tiny Title",
"description": "string",
"label": "string",
"href": "https://test.me",
"position": "top",
"target": "_blank"
}'
Update a link
curl -X DELETE \
'<<SBX_SERVER>>/videos/{video_id}/links/{linkType}' \
-H 'accept: application/json' \
-H 'x-api-key: <<SBX_DEMO_KEY>>' \
-d '{
"type": "linkType",
"title": "New Title",
"description": "string",
"label": "string",
"href": "https://test.me",
"position": "top",
"target": "_blank"
}'
Deleting a link
curl -X DELETE \
'<<SBX_SERVER>>/videos/{video_id}/links/{linkType}' \
-H 'accept: application/json' \
-H 'x-api-key: <<SBX_DEMO_KEY>>'
Updated 11 months ago