Webhooks

    Receive real-time event notifications when videos are published and other events occur in your account.

    Setting Up Webhooks

    1. Log in to your StreamVault account.
    2. Navigate to Dashboard → Settings → Webhooks.
    3. Set the event type you want to listen for.
    4. Provide the webhook URL where you want to receive POST requests.
    5. 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
    ParameterTypeRequiredDescription
    videoPublishedeventOptionalFired 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
    ParameterTypeRequiredDescription
    eventstringRequiredAlways "videoPublished"
    video.IdstringRequiredUnique video identifier
    video.TitlestringRequiredVideo title
    video.DescriptionstringOptionalVideo description
    video.DurationstringRequiredVideo duration as TimeSpan string
    video.StatusintegerRequiredVideo status code (3 = published)
    video.KeystringRequiredVideo key for embed URLs
    video.ChannelKeystringOptionalAssociated channel key
    video.ProjectIdstringOptionalAssociated project ID
    video.IframeLinkstringRequiredEmbeddable iframe URL
    video.HLSLinkstringRequiredHLS playback URL
    video.PrivateLinkstringRequiredDirect private playback URL
    video.ImageobjectRequiredThumbnail URLs in multiple sizes (xs, sm, md, lg)
    video.CaptionsarrayRequiredArray of caption tracks
    video.Tagsstring[]RequiredVideo tags
    video.FormatsobjectRequiredAvailable formats (HLS, MP4) and options
    video.CreateddatetimeRequiredISO 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, ...).

    1. In Zapier create a Zap with the trigger Webhooks by Zapier → Catch Hook and copy the hook URL.
    2. Paste it as your Endpoint URL in Settings → Webhooks and select events.
    3. 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.