Webhooks
On this page
How an event reaches you
A status changes
A video is ready, completed, failed or cancelled.
Kinema signs and sends
A POST to each endpoint of that mode that listens for the event.
- Kinema-Signature and Kinema-Event-Id headers
You check it
The signature, and that it was signed in the last five minutes.
- Turn away one that fails
You answer 2xx
Within 10 seconds, then do the work.
- Anything else counts as a failed attempt
Or it is sent again
Check Deliveries in Settings for the result.
The four events
| Event | In the app | Sent when | Next step |
|---|---|---|---|
video.ready | A video is ready to edit | The video is made. One made with "finish": "editor" waits here; any other goes on to render by itself. | Open editor_url, or render it |
video.completed | A finished video is rendered | The video is rendered. | Download it |
video.failed | A video could not be made | The video stopped. | Get the video, read its error, then resume or cancel it |
video.cancelled | A video was cancelled | The video stopped because you cancelled it. | Nothing more |
A video made with "finish": "render", the default, sends video.ready and then video.completed. Events are sent for videos made through the API; follow a video made in the app with Get a video. Each time a video reaches one of these statuses again, after a render or a resume, it sends that event again with a new event id. A deleted video sends nothing.
Add an endpoint
Open the API settings
In Settings, API, press Add endpoint under Webhooks. The owner and managers can; a workspace can have 10 endpoints.
Say where, which mode and which events
The address must start with
https://and reach the public internet: no user name or password in it, no#part, and no private or local network address. Choose Test or Live: an endpoint gets only the events of videos made with keys of its own mode. Then keep the events it wants; all four are ticked to start with.
One endpoint can listen for any of the four events, in one mode. Keep the signing secret
Press Add endpoint. The endpoint's signing secret, starting with
whsec_, appears once. Store it on your server, for example asKINEMA_WEBHOOK_SECRET: you need it to check that each request comes from Kinema.
The signing secret appears once. Keep it on your server.
Tip: One endpoint for each mode
Add a test endpoint for your test keys and a live one for production, each with its own secret. A test video then sends real events to your test endpoint within a minute.
What arrives
A POST with a small JSON body. It carries ids and the status only, never a script, a download link or an error message: get the video for the rest.
POST /kinema HTTP/1.1
Content-Type: application/json
User-Agent: Kinema-Webhooks/1.0
Kinema-Event-Id: evt_3f9a1c07be_7_completed
Kinema-Signature: t=1795001500,v1=5f0c2b7d9e41a3c8b6d0f2e19a7c4b3d8e6f1a2c5b9d0e3f7a4c1b8d2e6f9a0c{
"id": "evt_3f9a1c07be_7_completed",
"type": "video.completed",
"api_version": "v1",
"mode": "live",
"created_at": "2026-11-22T14:31:40Z",
"data": {
"id": "3f9a1c07be",
"status": "completed",
"credits_charged": 128,
"updated_at": "2026-11-22T14:31:39.871Z"
}
}| Field | What it is |
|---|---|
id | The event's id, the same as the Kinema-Event-Id header. It stays the same on every retry of this event. |
type | One of the four events. |
mode | test or live, the mode of the video and of the endpoint. |
created_at | When the event was made, in UTC, to the second. |
data.id, data.status | The video and the status it reached. |
data.credits_charged | What the video has cost so far, as its credits.charged. 0 with a test key. |
data.updated_at | When the video's status changed. Use it to put events in order. |
The body is sent compact, with no spaces; it is shown spread out here. Check the signature against the bytes as they arrive, before you parse them.
Check the signature
Read the header
Split
Kinema-Signatureon the comma:tis the time it was signed, in Unix seconds, andv1is the signature, in hex.Sign it yourself
Compute HMAC SHA-256 of
t, a full stop, and the raw body, with your whole signing secret,whsec_included, as the key.Compare, and check the time
Compare your result with
v1in constant time, and turn away a request signed more than five minutes ago. Every attempt is signed when it is sent, so a retry always carries a fresh time.
import crypto from "node:crypto";
// rawBody: the body exactly as received, as a string, before any JSON parsing
export function verify(rawBody, header, secret) {
const parts = Object.fromEntries((header || "").split(",").map((p) => p.split("=")));
if (!parts.t || !parts.v1) return false;
const expected = crypto
.createHmac("sha256", secret)
.update(`${parts.t}.${rawBody}`)
.digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
const a = Buffer.from(expected);
const b = Buffer.from(parts.v1);
return fresh && a.length === b.length && crypto.timingSafeEqual(a, b);
}import hashlib
import hmac
import time
# raw_body: the request body exactly as received, as bytes
def verify(raw_body: bytes, header: str, secret: str) -> bool:
try:
parts = dict(p.split("=", 1) for p in header.split(","))
signed_at = int(parts["t"])
except (KeyError, ValueError):
return False
signed = parts["t"].encode() + b"." + raw_body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
fresh = abs(time.time() - signed_at) < 300
return fresh and hmac.compare_digest(expected, parts.get("v1", ""))A whole receiver: it checks the signature on the raw body, skips repeats, stores the event and answers at once.
import express from "express";
import { verify } from "./verify.mjs";
const app = express();
// express.raw keeps the body as bytes, so the signature is checked on exactly what was sent
app.post("/kinema", express.raw({ type: "application/json" }), async (req, res) => {
const raw = req.body.toString("utf8");
if (!verify(raw, req.get("Kinema-Signature"), process.env.KINEMA_WEBHOOK_SECRET)) {
return res.sendStatus(400);
}
const event = JSON.parse(raw);
if (await alreadyHandled(event.id)) return res.sendStatus(200); // a repeat
await saveForLater(event); // your own store or queue
res.sendStatus(200); // answer first, do the work afterwards
});
app.listen(3000);import json
import os
from flask import Flask, request
from verify import verify
app = Flask(__name__)
@app.post("/kinema")
def kinema():
raw = request.get_data() # the bytes as sent, before any parsing
if not verify(raw, request.headers.get("Kinema-Signature", ""), os.environ["KINEMA_WEBHOOK_SECRET"]):
return "", 400
event = json.loads(raw)
if not already_handled(event["id"]): # a repeat is skipped
save_for_later(event) # your own store or queue
return "", 200 # answer first, do the work afterwardsWarning: Parse after you check
A framework that parses JSON first and hands you an object has already changed the bytes. Read the raw body, check it, then parse it.
Answer quickly, handle each event once
| Rule | Why |
|---|---|
Answer with any 2xx | That is all that counts as delivered. Kinema does not read what you send back, and does not follow redirects: a 3xx is a failed attempt. |
| Answer within 10 seconds | Store the event and answer promptly. Do the work after you send the response. |
| Expect repeats | An event can arrive more than once. Keep the ids of the events you handled and skip a repeat. |
| Expect any order | Retries can bring an older event after a newer one. When order matters, compare data.updated_at, or get the video and trust its status. |
Retries
If your endpoint misses an event, Kinema tries to deliver it again for up to 3 days. You can also get the video to check its current status.
An attempt fails when your server answers with anything but 2xx, cannot be reached, or takes too long. In Settings, API, the Deliveries button of an endpoint shows its latest 50 events with their result, your server's status code and the number of tries. A delivery that gave up has Retry, which sends it again.

Send a test
Send test sends one sample event to the endpoint, signed like any other. It uses one of the events you selected, with an id that starts evt_test_ and a body that names no real video:
{
"id": "evt_test_6b1e0d9c4a2f7e3b5c8d1a0f",
"type": "video.cancelled",
"api_version": "v1",
"mode": "test",
"created_at": "2026-11-22T09:12:05Z",
"data": { "id": "vid_test", "status": "cancelled", "test": true }
}To try the whole flow, add a test endpoint and make a video with a test key: it sends real events within a minute. See the quickstart.
Remove an endpoint
Remove stops an endpoint at once, along with any deliveries still waiting for it. Its secret cannot be shown again, so to change a secret, add a new endpoint, move your server to its secret, then remove the old one.
Need a hand?
Ask on Discord, or write to hello@kinema.cc.