Cookies on Kinema

We use cookies only to keep you signed in, keep Kinema secure and remember this choice. Visits and page speed are counted in aggregate, without cookies or ads. You can turn that off in Preferences.

Kinema Studio 2 is here!

Read more

Webhooks

Updated Nov 26, 2026

On this page

How an event reaches you

  1. A status changes

    A video is ready, completed, failed or cancelled.

  2. Kinema signs and sends

    A POST to each endpoint of that mode that listens for the event.

    • Kinema-Signature and Kinema-Event-Id headers
  3. You check it

    The signature, and that it was signed in the last five minutes.

    • Turn away one that fails
  4. You answer 2xx

    Within 10 seconds, then do the work.

    • Anything else counts as a failed attempt
  5. Or it is sent again

    Check Deliveries in Settings for the result.

The four events

EventIn the appSent whenNext step
video.readyA video is ready to editThe 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.completedA finished video is renderedThe video is rendered.Download it
video.failedA video could not be madeThe video stopped.Get the video, read its error, then resume or cancel it
video.cancelledA video was cancelledThe 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

  1. Open the API settings

    In Settings, API, press Add endpoint under Webhooks. The owner and managers can; a workspace can have 10 endpoints.

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

    The Add a webhook endpoint dialog in Settings, API: the URL https://example.com/kinema, the description Publishing queue, Live mode selected with the note that it gets the events of live keys, all four events ticked (a video is ready to edit, a finished video is rendered, a video could not be made, a video was cancelled), and Cancel and Add endpoint.
    One endpoint can listen for any of the four events, in one mode.
  3. Keep the signing secret

    Press Add endpoint. The endpoint's signing secret, starting with whsec_, appears once. Store it on your server, for example as KINEMA_WEBHOOK_SECRET: you need it to check that each request comes from Kinema.

    The Endpoint added dialog: Use this signing secret to check that each event comes from Kinema. The Signing secret box holds the whole secret, a sample that starts whsec_ExampleOnly, with a Copy button beside it. Under it the line This is the only time it is shown. Keep it somewhere safe, and the Done button.
    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.

Headers
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
Body
{
  "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"
  }
}
FieldWhat it is
idThe event's id, the same as the Kinema-Event-Id header. It stays the same on every retry of this event.
typeOne of the four events.
modetest or live, the mode of the video and of the endpoint.
created_atWhen the event was made, in UTC, to the second.
data.id, data.statusThe video and the status it reached.
data.credits_chargedWhat the video has cost so far, as its credits.charged. 0 with a test key.
data.updated_atWhen 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

  1. Read the header

    Split Kinema-Signature on the comma: t is the time it was signed, in Unix seconds, and v1 is the signature, in hex.

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

  3. Compare, and check the time

    Compare your result with v1 in 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);
}

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);

Warning: 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

RuleWhy
Answer with any 2xxThat 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 secondsStore the event and answer promptly. Do the work after you send the response.
Expect repeatsAn event can arrive more than once. Keep the ids of the events you handled and skip a repeat.
Expect any orderRetries 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.

The Event, Result and When columns in Deliveries. A completed video was delivered with 200, a ready video failed with 500, and a sample cancellation was delivered with 200.
Open Deliveries to see which events reached your endpoint.

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:

Body
{
  "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.

On this page

Cookie preferences

Choose what Kinema may use on this site. You can change this at any time from Cookie preferences at the bottom of every page.

Strictly necessary

Sign-in, security and remembering this choice.

Always on

Visit counting

Counts visits and page speed in aggregate, without cookies. No ads, and no tracking across other sites.

More in the Privacy Policy.