---
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.

## Request body

- WebhooksCreationPayload
  - `events` string[], required — A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```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``` Occurs when a live stream is recorded and submitted for encoding.
  - `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 — Unique identifier of the webhook
  - `createdAt` string, date-time — When an webhook was created, presented in ISO-8601 format.
  - `events` string[] — A list of events that will trigger the webhook.
  - `url` string — URL of the webhook

## Other responses

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

## Changes

- **2024-04-16** `ec2b79bfdc8d` — 1 info
  - added the non-success response with the status `429`
- **2022-04-28** `f9532dd3578c` — 2 info
  - the endpoint scheme security `apiKey` was added to the API
  - the endpoint scheme security `bearerAuth` was removed from the API
- **2022-02-07** `2a4d90a64f88` — 6 breaking, 7 warning, 9 info
  - removed the enum value `live-stream.broadcast.ended` of the request property `events/items/`
  - removed the enum value `live-stream.broadcast.started` of the request property `events/items/`
  - removed the enum value `video.caption.generated` of the request property `events/items/`
  - removed the enum value `video.encoding.quality.completed` of the request property `events/items/`
  - …18 more

[Change history](https://skmtc.dev/apivideo/apis/api-video/changes/webhooks/post.md)

---

[API](https://skmtc.dev/apivideo/apis/api-video.md) · [All operations](https://skmtc.dev/apivideo/apis/api-video/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apivideo/api-video/revisions/ec2b79bfdc8d/schema)
