Create Webhook

​

Creates a new webhook listener. Gumlet POSTs JSON to url for each matching event and sends secret_token in the x-gumlet-token header. Payload schemas are documented in the webhooks section.

Body

application/json
  • Secret sent back in the x-gumlet-token header of each webhook POST so you can confirm the request came from Gumlet.

  • List of video collection identifiers for which webhooks are needed to be invoked.

  • Events that invoke this webhook. status subscribes to every video asset status event. live-video-status subscribes to every live video status event. Any other value subscribes to that event only.

    values
    • status
    • live-video-status
    • video.status.created
    • video.status.downloaded
    • video.status.optimized
    • video.status.ready
    • video.status.errored
    • video.status.deleted
  • URL from the application you want to send data to.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/org/webhooks
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});

const webhookEndpoint = await client.webhookEndpoints.create({
  url: '',
  secret_token: '',
  triggers: ['status'],
  sources: [''],
});

console.log(webhookEndpoint);
{
  "id": "65eed75eadeea8478f14ebd4",
  "url": "https://webhook.site/16df065a-b398-48bc-b825-b0804979c5f1",
  "triggers": [
    "status"
  ],
  "created_at": "2024-03-11T10:05:18.316Z",
  "updated_at": "2024-03-11T10:05:18.316Z",
  "sources": [
    "5f462c1561cf8a766464ffc4"
  ],
  "secret_token": "rnVNfIKgnH"
}