What do the different webhook request payloads look like? How many are there?
There are two responses you receive when using a webhook. These are:
Edit API Response
The Edit API sends one response to your webhook when the render is complete:
{
"type": "edit",
"action": "render",
"id": "6d7acbe6-e7c1-4cf8-b8ea-94e7522878cc",
"owner": "mwipwx4ds3",
"status": "done",
"url": "https://shotstack-api-v1-output.s3-ap-southeast-2.amazonaws.com/mwipwx4ds3/6d7acbe6-e7c1-4cf8-b8ea-94e7522878cc.mp4",
"error": null,
"completed": "2020-02-24T11:52:20.810Z"
}
Serve API Response
The second response is sent to your webhook when your render has been copied over to your distribution mechanism of choice. This would normally be the Shotstack Serve CDN, or otherwise S3 or Mux:
{
"type": "serve",
"action": "copy",
"id": "e4433cbf-e501-76a2-ac8b-715d26997540",
"render": "d2b46ed6-998a-4d6b-9d91-b8cf0193a655",
"owner": "jwolrq9ms0",
"status": "ready",
"url": "https://cdn.shotstack.io/au/v1/jwolrq9ms0/d4697b5a-4d73-4f33-822e-2f8d92db0576.mp4",
"error": null,
"completed": "2021-07-12T11:04:44.574Z"
}