Create Webhook

Creates a new webhook listener.

Body
application/json
  • secret_token
    Type: string
    required

    Authentication token to ensure legitimacy of Gumlet Webhook request on your application.

  • sources
    Type: array string[]
    required

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

  • triggers
    Type: array string[]
    required

    Triggers for the invocation of webhookos, supported option is status.

  • url
    Type: string
    required

    URL from the application you want to send data to.

Responses
  • 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 webhookAPI = await client.webhookAPIs.create({
  url: '',
  secret_token: '',
  triggers: [''],
  sources: [''],
});

console.log(webhookAPI);
{
  "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"
}