Webhooks
Receive real-time event notifications when videos are published and other events occur in your account.
Setting Up Webhooks
- Log in to your StreamVault account.
- Navigate to Dashboard → Settings → Webhooks.
- Set the event type you want to listen for.
- Provide the webhook URL where you want to receive POST requests.
- Configuration is saved automatically.
How it works: When a registered event occurs, StreamVault sends an HTTP POST request to your configured URL with a JSON payload containing event details. Your server should respond with a
200 status code to acknowledge receipt.Available Events
Supported Events
| Parameter | Type | Required | Description |
|---|---|---|---|
| videoPublished | event | Optional | Fired when a video finishes transcoding and is ready for playback (status = 3) |
videoPublished Payload
Sent when a video finishes processing and is published. Contains full video metadata including playback URLs, thumbnails, captions, and configuration.
Payload Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| event | string | Required | Always "videoPublished" |
| video.Id | string | Required | Unique video identifier |
| video.Title | string | Required | Video title |
| video.Description | string | Optional | Video description |
| video.Duration | string | Required | Video duration as TimeSpan string |
| video.Status | integer | Required | Video status code (3 = published) |
| video.Key | string | Required | Video key for embed URLs |
| video.ChannelKey | string | Optional | Associated channel key |
| video.ProjectId | string | Optional | Associated project ID |
| video.IframeLink | string | Required | Embeddable iframe URL |
| video.HLSLink | string | Required | HLS playback URL |
| video.PrivateLink | string | Required | Direct private playback URL |
| video.Image | object | Required | Thumbnail URLs in multiple sizes (xs, sm, md, lg) |
| video.Captions | array | Required | Array of caption tracks |
| video.Tags | string[] | Required | Video tags |
| video.Formats | object | Required | Available formats (HLS, MP4) and options |
| video.Created | datetime | Required | ISO 8601 creation timestamp |
json
{
"event": "videoPublished",
"video": {
"Id": "fFL56RU6PjvJPeE",
"Duration": "00:02:30.0000000",
"ProjectId": "proj_abc123",
"AccountKey": "acc_xyz789",
"Region": "use",
"Image": {
"xsUrl": "https://api.streamvault.one/v1/play/fFL56RU6PjvJPeE/poster.jpg",
"smUrl": "https://api.streamvault.one/v1/play/fFL56RU6PjvJPeE/poster.jpg",
"mdUrl": "https://api.streamvault.one/v1/play/fFL56RU6PjvJPeE/poster.jpg",
"lgUrl": "https://api.streamvault.one/v1/play/fFL56RU6PjvJPeE/poster.jpg"
},
"Captions": [
{ "id": "cap_1", "language": "en", "label": "English" }
],
"Key": "f8RMr2q4h6yNpv9",
"ChannelKey": "ch_abc123",
"PrivateLink": "https://streamvault.one/v/f8RMr2q4h6yNpv9",
"IframeLink": "https://player.streamvault.one/embed/fFL56RU6PjvJPeE",
"HLSLink": "https://api.streamvault.one/v1/play/fFL56RU6PjvJPeE/master.m3u8",
"PlanType": 1,
"Mp4Url": "",
"Mp4Urls": [],
"Formats": {
"Hls": true,
"Mp4": false,
"Options": { "SecureMp4": true }
},
"HLSUrl": "https://api.streamvault.one/v1/play/fFL56RU6PjvJPeE/master.m3u8",
"Title": "Product Demo",
"Description": "A walkthrough of our product features",
"Options": {
"autoplay": false,
"loop": false,
"muted": false
},
"Tags": ["demo", "product"],
"Version": 1,
"Status": 3,
"Created": "2024-01-15T10:30:00Z"
}
}Example Webhook Handler
Here's an example Express.js server that handles StreamVault webhook events:
javascript
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhooks/streamvault', (req, res) => {
const { event } = req.body;
switch (event) {
case 'videoPublished':
const video = req.body.video;
console.log(`Video published: ${video.Title}`);
console.log(`Embed: ${video.IframeLink}`);
// Update your database, send notifications, etc.
break;
default:
console.log(`Unknown event: ${event}`);
}
res.status(200).json({ received: true });
});
app.listen(3000, () => console.log('Webhook server running'));Connect anything via Zapier
No native integration needed: point your StreamVault webhook at a Zapier Catch Hook and route events to 6,000+ apps (Mailchimp, HubSpot, Slack, Google Sheets, ...).
- In Zapier create a Zap with the trigger Webhooks by Zapier → Catch Hook and copy the hook URL.
- Paste it as your Endpoint URL in Settings → Webhooks and select events.
- Publish a video (or wait for the next one to finish processing) — the event appears as the Zap's sample, then map fields to any action app.
Every delivery (status code, timestamp, target URL) is visible under Settings → Webhooks → Recent deliveries.