Skip to content

Webhooks ​

NukeVideo tells your application that a video changed. Configured per project, authenticated with a secret you choose.

Nothing has to tell NukeVideo that an upload finished: completing a multipart upload goes through the API, which creates the video at once, and a sweep finds any other finished upload within a minute (see Upload Flow).

Outbound: Video Events ​

Set a Webhook URL on the project (and optionally a Webhook secret) in the admin panel — or through the API, as settings.webhookUrl and settings.webhookSecret on the project — and NukeVideo will POST to it as videos move through the pipeline. A project with no webhook URL sends nothing.

Authentication ​

The secret, when set, is sent as a bearer token:

Authorization: Bearer <your webhook secret>

There is no signature over the body. Anyone who can reach your URL can post to it, so treat the bearer token as the whole check, and ignore requests without it.

Event Payload ​

Every event has the same envelope, and every event carries the complete video in data — the same object GET /api/videos/{ulid} returns. No event sends a reduced payload, so a receiver can store data without branching on the event name and let event decide only the side effects.

json
{
  "event": "video.completed",
  "timestamp": 1757000000,
  "data": { "ulid": "01HX...", "status": "completed", "outputs": ["..."], "streams": ["..."] }
}
FieldTypeNotes
eventstringSee the table below. Treat an unknown value as "store data and carry on" — new events are additive.
timestampintegerUnix seconds, taken when the delivery was queued. Second precision, so it is a rough ordering hint, not a sequence number.
dataobjectThe full video, as documented for GET /api/videos/{ulid}.
tracksstring[]Only on video.track_ready and video.track_failed: the ULIDs of the streams the upload became.

Events ​

EventWhen
video.createdThe upload was ingested and the video row exists. Fires before the source is probed: duration is 0, aspectRatio is empty, outputs is empty and streams holds only the original.
video.updatedThe video's own fields (name, priority, externalUserId, externalResourceId through PUT|PATCH /api/videos/{ulid}) changed — at any point — or one of its tracks (PUT|PATCH /api/streams/{ulid}, DELETE /api/streams/{ulid}) changed after the run finished (completed or failed), including the original being reclaimed. A track change sends the whole video, like every other event. Never sent for the writes a run performs on its own — those end in video.completed or video.error.
video.completedEvery output reached a terminal state and at least one succeeded.
video.errorThe video failed — either every output failed, or a pipeline failure (a stalled worker, an unreachable source) ended the run.
video.track_readyA track added to the processed video was published: it is in the manifests now. tracks lists its streams (more than one when the audio ladder split it).
video.track_failedAdding a track failed; the manifests are untouched. The reason is in that stream's errorLog.
video.deletedThe video was deleted. Only sent for videos that carry an externalResourceId. The payload is the video as it was just before deletion.

Delivery ​

Deliveries are queued, not sent inline. Each one is attempted at most 3 times, waiting 60s after the first failure and 300s after the second — so a delivery is abandoned about 6 minutes after it was first queued, then logged and dropped. There is no replay endpoint.

Your endpoint has 5 seconds to respond. Anything at or above 400, and any timeout, counts as a failure. Acknowledge first and do your own work asynchronously.

Two consequences worth designing around:

  • A retry can arrive out of order, carrying stale data. The payload is built when the delivery is queued, not when it is sent, so a delivery that only succeeds on its last attempt can land ~6 minutes late and overwrite a newer one that already got through. If you mirror the video, ignore a payload whose status is behind the one you already stored.
  • Deliveries are at-least-once. Make your receiver idempotent on data.ulid. One edit can also legitimately produce more than one video.updated: the original reclaimed right after video.completed is the common case, and the last payload is the current one.

What is not covered ​

These change a video without emitting any event. If you keep a local copy, refresh it from GET /api/videos/{ulid} after them:

ChangeHow to stay in sync
Intermediate pipeline states (downloading, running, uploading) and the probe that fills in duration, aspectRatio, outputs and streamsPoll while the status is not terminal.
A re-probe (videos:retry --reprobe), which mints new stream ULIDsRefetch the video; any stored stream ULID is stale.

outputs[].progress is live encoding progress read from a short-lived store. It is never worth mirroring — poll it only while a video is in a non-terminal status.

Released under the MIT License.