Skip to main content
All CollectionsAPI
Understanding Webhooks
Understanding Webhooks

Understanding and setting up webhooks

Derk Zomer avatar
Written by Derk Zomer
Updated over 3 months ago

Webhooks let your application receive real-time notifications when events occur, like when a video render finishes or fails. Instead of constantly checking the API for updates (polling), webhooks send the information directly to you, making the process more efficient.

How to Set Up Webhooks

You can configure webhooks in the Automate tab. Simply provide the URL where you want to receive the notifications, and you're all set!

What you will receive

Depending on whether you have set up a destination you will receive one or two sets of requests to your callback URL:

  1. Edit Payload

  2. Destinations Payload

Edit Payload

You will receive this payload once the rendering of your video completes:

{
"type": "edit",
"action": "render",
"id": "6d7acbe6-e7c1-4cf8-b8ea-94e7522878cc",
"owner": "5ca6hu7s9k",
"status": "done",
"url": "https://shotstack-api-v1-output.s3-ap-southeast-2.amazonaws.com/5ca6hu7s9k/6d7acbe6-e7c1-4cf8-b8ea-94e7522878cc.mp4",
"error": null,
"completed": "2020-02-24T11:52:20.810Z"
}

Destinations Payload

If you have connected any destinations you will also receive a payload for each of the destinations you've connected:

{
"type": "serve",
"action": "copy",
"id": "e4433cbf-e501-76a2-ac8b-715d26997540",
"render": "d2b46ed6-998a-4d6b-9d91-b8cf0193a655",
"owner": "5ca6hu7s9k",
"status": "ready",
"url": "https://cdn.shotstack.io/au/v1/5ca6hu7s9k/d2b46ed6-998a-4d6b-9d91-b8cf0193a655.mp4",
"error": null,
"completed": "2021-07-12T11:04:44.574Z"
}

Note: You can differentiate between Edit and Destinations payloads by using the type property.

For a detailed guide on using webhooks, please visit the docs.

Did this answer your question?