Webhooks
Get real time notifications about your assets without using the API or logging into the CMS.
Webhooks allow you to receive real time notifications about the events that happen in Targetvideo video library.
Webhooks are designed in a way that will allow you to get real time information when video encoding process is finished, once the video is ready to be used/embedded, if the video is added/removed within a playlist and many more events. Using webhooks you will be able to perform custom actions based on the events that our system will provide.
Premium plans only
Please note that webhooks feature is available only within our premium plans only. If you are not on a premium plan make sure to contact us to get this feature enabled.
Once webhooks are enabled for your account, you will be able to set them up under your websites settings inside Targetvideo.
Name | Description |
---|---|
Endpoint URL | URL to the file that our system should ping once a webhook is fired. |
Secret key | A secret key which is set by yourself and which your script should check before processing the response so it can prevent any spam. |
Timeout | Set this if you want to have specific timeout before our system makes a call to your script. |
Here are a couple of major webhooks that our system provides:
Webhook name | Description |
---|---|
add_video | Fired whenever a new video is added to your website. |
edit_video | Fired whenever a video is edited |
delete_video | Fired whenever the video is deleted from the system |
video_encoded | Fired whenever a video encoding process is fully completed and all video renditions are created. |
sd_encoded | Fired whenever SD rendition is created. SD rendition is mandatory. |
add_playlist | Fired whenever a playlist is created. |
edit_playlist | Fired whenever playlist is edited. |
add_videos_to_playlist | Fired as soon as the video is added to the playlist |
delete_video_from_playlist | Fired whenever a video is deleted from the playlist |
sort_videos_in_playlist | Fired whenever the video is added to the playlist and the playlist gets new order or once videos in a playlist are re-ordered. |
edit_snapshot | Fired whenever the snapshot for the video is edited. |
Example response for one of the webhooks:
{
"response":{
"Video":{
"id":"734392"
},
"EncodingStatus":{
"track_all":"1",
"sd":"1",
"ld":"0",
"hsd":"0",
"hd":"1",
"fhd":"1",
"streaming":"1",
"snapshot":"1",
"thumb":"1",
"vtt":"1",
"webp":"1",
"ogg":"1",
"mp3":"1"
},
"invoked_by":"MediaConvert"
},
"event":"sd_encoded",
"scope":"Controller.Encodings",
"method":"sd_encoded",
"data":{
"Video":{
"id":"734392",
"encoded":{
"track_all":"1",
"sd":"1",
"ld":"0",
"hsd":"0",
"hd":"1",
"fhd":"1",
"streaming":"1",
"snapshot":"1",
"thumb":"1",
"vtt":"1",
"webp":"1",
"ogg":"1",
"mp3":"1"
}
},
"invoked_by":"MediaConvert"
},
"api":false,
"timestamp":1614908944,
"secret":"your_secret_key"
}
Updated over 2 years ago