---
title: "Create Webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Create Webhook

`POST /webhooks`

Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: 
* `video.encoding.quality.completed` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification.  It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed.
* `live-stream.broadcast.started`  When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires.
* `live-stream.broadcast.ended`  This event fires when a live stream has finished broadcasting.
* `video.source.recorded`  This event occurs when a live stream is recorded and submitted for encoding.
* `video.caption.generated`  This event occurs when an automatic caption has been generated.
* `video.summary.generated`  This event occurs when an automatic summary has been generated.

## Request body

- WebhooksCreationPayload
  - `events` string[], required — An array of webhook events that you want to subscribe to.
  - `url` string, required — The the url to which HTTP notifications are sent. It could be any http or https URL.

## Response `201`

Created

- Webhook
  - `webhookId` string — A unique identifier of the webhook you subscribed to.
  - `createdAt` string, date-time — The time and date when you created this webhook subscription, in ATOM UTC format.
  - `events` string[] — A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.
  - `url` string — The URL where the API sends the webhook.
  - `signatureSecret` string — A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.

## Other responses

- `400` — Bad Request
- `429` — Too Many Requests

---

[API](https://skmtc.net/apivideo/apis/api-video.md) · [All operations](https://skmtc.net/apivideo/apis/api-video/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apivideo/api-video/versions/45ec26f342b6/schema)
