Searching...

Webhooks

get /webhooks

List all webhooks

Retrieve a list of all webhooks configured for the current workspace.

events string

The webhook event that you wish to filter on.

currentPage int

Choose the number of search results to return per page. Minimum value: 1

Default
1
pageSize int

Results per page. Allowed values 1-100, default is 25.

Default
25

Responses

Success

Response body Headers
data array required
pagination object (Pagination) required
Example
{ "itemsTotal": 123, "pagesTotal": 7, "pageSize": 20, "currentPage": 3, "currentPageItems": 20, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" } } }
itemsTotal int

Total number of items that exist.

pagesTotal int

Number of items listed in the current page.

pageSize int

Maximum number of item per page.

currentPage int

The current page index.

currentPageItems int

The number of items on the current page.

links array required
X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#list

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class listExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var events = video.encoding.quality.completed;  // string | The webhook event that you wish to filter on. (optional) 
            var currentPage = 2;  // int? | Choose the number of search results to return per page. Minimum value: 1 (optional)  (default to 1)
            var pageSize = 30;  // int? | Results per page. Allowed values 1-100, default is 25. (optional)  (default to 25)
            var apiWebhooksInstance = apiInstance.Webhooks();
            try
            {
                // List all webhooks
                WebhooksListResponse result = apiWebhooksInstance.list(events, currentPage, pageSize);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhooksApi.list: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#list

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
    req := apivideosdk.WebhooksApiListRequest{}
    
    req.Events("video.encoding.quality.completed") // string | The webhook event that you wish to filter on.
    req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1)
    req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25)

    res, err := client.Webhooks.List(req)
    

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.List``: %v\
", err)
    }
    // response from `List`: WebhooksListResponse
    fmt.Fprintf(os.Stdout, "Response from `Webhooks.List`: %v\
", res)
}
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#list

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WebhooksApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    WebhooksApi apiInstance = client.webhooks();
    
    String events = "video.encoding.quality.completed"; // The webhook event that you wish to filter on.
    Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1
    Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25.

    try {
      Page<Webhook> result = apiInstance.list()
            .events(events)
            .currentPage(currentPage)
            .pageSize(pageSize)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhooksApi#list");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#list

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on.
const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.
 
const webhooks = await client.webhooks.list({ events, currentPage, pageSize }); 
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#list

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on.
const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.

// WebhooksListResponse
const webhooks = await client.webhooks.list({ events, currentPage, pageSize }); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#list

import apivideo
from apivideo.api import webhooks_api
from apivideo.model.webhooks_list_response import WebhooksListResponse
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = webhooks_api.WebhooksApi(api_client)
    events = "video.encoding.quality.completed" # str | The webhook event that you wish to filter on. (optional)
    current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1
    page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # List all webhooks
        api_response = api_instance.list(events=events, current_page=current_page, page_size=page_size)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling WebhooksApi->list: %s\n" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#list

Response examples

Success

{
  "data": [
    {
      "webhookId": "webhook_XXXXXXXXXXXXXXX",
      "createdAt": "2021-01-08T14:12:18+00:00",
      "events": [
        "video.encoding.quality.completed"
      ],
      "url": "http://clientnotificationserver.com/notif?myquery=query",
      "signatureSecret": "sig_sec_Abcd12348RLP7VPLi7nYVh"
    },
    {
      "webhookId": "webhook_XXXXXXXXXYYYYYY",
      "createdAt": "2021-01-12T12:12:12+00:00",
      "events": [
        "video.encoding.quality.completed"
      ],
      "url": "http://clientnotificationserver.com/notif?myquery=query2",
      "signatureSecret": "sig_sec_Abcd12358RLP7VPLi7nYVy"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageSize": 25,
    "pagesTotal": 1,
    "itemsTotal": 2,
    "currentPageItems": 2,
    "links": [
      {
        "rel": "self",
        "uri": "https://ws.api.video/webhooks?currentPage=1"
      },
      {
        "rel": "first",
        "uri": "https://ws.api.video/webhooks?currentPage=1"
      },
      {
        "rel": "last",
        "uri": "https://ws.api.video/webhooks?currentPage=1"
      }
    ]
  }
}

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
post /webhooks

Create Webhook

Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events:

  • video.encoding.quality.completed Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like { "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} . This request says that the 720p HLS encoding was completed.

  • live-stream.broadcast.started When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires.

  • live-stream.broadcast.ended This event fires when a live stream has finished broadcasting.

  • video.source.recorded This event occurs when a live stream is recorded and submitted for encoding.

  • video.caption.generated This event occurs when an automatic caption has been generated.

  • video.summary.generated This event occurs when an automatic summary has been generated.

events array required

An array of webhook events that you want to subscribe to.

Example
[ "video.encoding.quality.completed" ]
url string required

The the url to which HTTP notifications are sent. It could be any http or https URL.

Example
"https://example.com/webhooks"

Responses

Created

Response body Headers
webhookId string

A unique identifier of the webhook you subscribed to.

Example
"webhook_XXXXXXXXXXXXXXX"
createdAt string

The time and date when you created this webhook subscription, in ATOM UTC format.

Format
date-time
Example
"2019-06-24T11:45:01+00:00"
events array

A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.

Example
"[\"video.encoding.quality.completed\"]"
url string

The URL where the API sends the webhook.

Example
"http://clientnotificationserver.com/notif?myquery=query"
signatureSecret string

A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Bad Request

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

name string

The name of the parameter that caused the error.

status int

The HTTP status code.

problems array

Returns any additional problems in the request in an array of objects.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

{
  "events": [
    "video.encoding.quality.completed"
  ],
  "url": "http://clientnotificationserver.com/notif?myquery=query"
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#create

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class createExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var webhooksCreationPayload = new WebhooksCreationPayload(); // WebhooksCreationPayload | 
            var apiWebhooksInstance = apiInstance.Webhooks();
            try
            {
                // Create Webhook
                Webhook result = apiWebhooksInstance.create(webhooksCreationPayload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhooksApi.create: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#create

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    webhooksCreationPayload := *apivideosdk.NewWebhooksCreationPayload([]string{"Events_example"}, "https://example.com/webhooks") // WebhooksCreationPayload | 

    
    res, err := client.Webhooks.Create(webhooksCreationPayload)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Create``: %v\
", err)
    }
    // response from `Create`: Webhook
    fmt.Fprintf(os.Stdout, "Response from `Webhooks.Create`: %v\
", res)
}
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#create

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WebhooksApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    WebhooksApi apiInstance = client.webhooks();
    
    WebhooksCreationPayload webhooksCreationPayload = new WebhooksCreationPayload(); // 
    webhooksCreationPayload.setEvents(Arrays.asList("video.encoding.quality.completed")); 
    webhooksCreationPayload.setUrl("https://example.com/webhooks"); // The the url to which HTTP notifications are sent. It could be any http or https URL.


    try {
      Webhook result = apiInstance.create(webhooksCreationPayload);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhooksApi#create");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#create

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const webhooksCreationPayload = {
  events: ["video.encoding.quality.completed"], // A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed```  Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification.  It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started```  When a lives tream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended```  This event fires when the live stream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded```  Occurs when a live stream is recorded and submitted for encoding.
  url: "https://example.com/webhooks", // The url to which HTTP notifications are sent. It could be any http or https URL.
}; 

const webhook = await client.webhooks.create(webhooksCreationPayload); 
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#create

require __DIR__ . '/vendor/autoload.php';

$webhooksCreationPayload = (new \ApiVideo\Client\Model\WebhooksCreationPayload())
    ->setEvents(['video.encoding.quality.completed']) // A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed```  Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification.  It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started```  When a lives tream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended```  This event fires when the live stream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded```  Occurs when a live stream is recorded and submitted for encoding.)
    ->setUrl("https://example.com/webhooks"); // The url to which HTTP notifications are sent. It could be any http or https URL.)

$webhook = $client->webhooks()->create($webhooksCreationPayload); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#create

import apivideo
from apivideo.api import webhooks_api
from apivideo.model.bad_request import BadRequest
from apivideo.model.webhook import Webhook
from apivideo.model.webhooks_creation_payload import WebhooksCreationPayload
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = webhooks_api.WebhooksApi(api_client)
    webhooks_creation_payload = WebhooksCreationPayload(
        events=["video.encoding.quality.completed"],
        url="https://example.com/webhooks",
    ) # WebhooksCreationPayload | 

    # example passing only required values which don't have defaults set
    try:
        # Create Webhook
        api_response = api_instance.create(webhooks_creation_payload)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling WebhooksApi->create: %s\
" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#create

ApiVideoClient.apiKey = "YOUR_API_KEY"

let webhooksCreationPayload = webhooks-creation-payload(events: ["events_example"], url: "url_example")

WebhooksAPI.create(webhooksCreationPayload: webhooksCreationPayload) { (response, error) in
 
}

Response examples

Created

{
  "webhookId": "webhook_XXXXXXXXXXXXXXX",
  "createdAt": "2021-01-08T14:12:18+00:00",
  "events": [
    "video.encoding.quality.completed"
  ],
  "url": "http://clientnotificationserver.com/notif?myquery=query"
}

Bad Request

{
  "type": "https://docs.api.video/reference/attribute-required",
  "events": "This attribute is required.",
  "name": "events",
  "status": 400,
  "problems": [
    {
      "type": "https://docs.api.video/reference/attribute-required",
      "title": "This attribute is required.",
      "name": "events"
    },
    {
      "type": "https://docs.api.video/reference/attribute-required",
      "title": "This attribute is required.",
      "name": "url"
    },
    {
      "type": "https://docs.api.video/reference/invalid-attribute",
      "title": "This attribute must be an array.",
      "name": "events"
    }
  ]
}

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
get /webhooks/{webhookId}

Retrieve Webhook details

Retrieve webhook details by id.

webhookId string required

The unique webhook you wish to retreive details on.

Responses

Success

Response body Headers
webhookId string

A unique identifier of the webhook you subscribed to.

Example
"webhook_XXXXXXXXXXXXXXX"
createdAt string

The time and date when you created this webhook subscription, in ATOM UTC format.

Format
date-time
Example
"2019-06-24T11:45:01+00:00"
events array

A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.

Example
"[\"video.encoding.quality.completed\"]"
url string

The URL where the API sends the webhook.

Example
"http://clientnotificationserver.com/notif?myquery=query"
signatureSecret string

A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#get

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class getExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var webhookId = webhookId_example;  // string | The unique webhook you wish to retreive details on.
            var apiWebhooksInstance = apiInstance.Webhooks();
            try
            {
                // Show Webhook details
                Webhook result = apiWebhooksInstance.get(webhookId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhooksApi.get: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#get

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    webhookId := "webhookId_example" // string | The unique webhook you wish to retreive details on.

    
    res, err := client.Webhooks.Get(webhookId)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Get``: %v\
", err)
    }
    // response from `Get`: Webhook
    fmt.Fprintf(os.Stdout, "Response from `Webhooks.Get`: %v\
", res)
}
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#get

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WebhooksApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    WebhooksApi apiInstance = client.webhooks();
    
    String webhookId = "webhookId_example"; // The unique webhook you wish to retreive details on.

    try {
      Webhook result = apiInstance.get(webhookId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhooksApi#get");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#get

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on.

const webhook = await client.webhooks.get(webhookId); 
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#get

require __DIR__ . '/vendor/autoload.php';

$webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on.

$webhook = $client->webhooks()->get($webhookId);  
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#get

import apivideo
from apivideo.api import webhooks_api
from apivideo.model.webhook import Webhook
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = webhooks_api.WebhooksApi(api_client)
    webhook_id = "webhookId_example" # str | The unique webhook you wish to retreive details on.

    # example passing only required values which don't have defaults set
    try:
        # Show Webhook details
        api_response = api_instance.get(webhook_id)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling WebhooksApi->get: %s\n" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#get

Response examples

Success

{
  "webhookId": "webhook_XXXXXXXXXXXXXXX",
  "createdAt": "2021-01-08T14:12:18+00:00",
  "events": [
    "video.encoding.quality.completed"
  ],
  "url": "http://clientnotificationserver.com/notif?myquery=query"
}

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
delete /webhooks/{webhookId}

Delete a Webhook

This endpoint will delete the indicated webhook.

webhookId string required

The webhook you wish to delete.

Responses

No Content

Response body Headers

This response is empty

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Not Found

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

name string

The name of the parameter that caused the error.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Too Many Requests

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

status int

The HTTP status code.

X-RateLimit-Limit int

The request limit per minute.

X-RateLimit-Remaining int

The number of available requests left for the current time window.

X-RateLimit-Retry-After int

The number of seconds left until the current rate limit window resets.

Request examples

// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#delete

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class deleteExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var webhookId = webhookId_example;  // string | The webhook you wish to delete.
            var apiWebhooksInstance = apiInstance.Webhooks();
            try
            {
                // Delete a Webhook
                apiWebhooksInstance.delete(webhookId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhooksApi.delete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#delete

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    webhookId := "webhookId_example" // string | The webhook you wish to delete.

    
    err := client.Webhooks.Delete(webhookId)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Delete``: %v\
", err)
    }
}
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#delete

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WebhooksApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    WebhooksApi apiInstance = client.webhooks();
    
    String webhookId = "webhookId_example"; // The webhook you wish to delete.

    try {
      apiInstance.delete(webhookId);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhooksApi#delete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#delete

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const webhookId = 'webhookId_example'; // The webhook you wish to delete.
await client.webhooks.delete(webhookId); 
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#delete

require __DIR__ . '/vendor/autoload.php';

$webhookId = 'webhookId_example'; // The webhook you wish to delete.
$client->webhooks()->delete($webhookId);  
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#delete

import apivideo
from apivideo.api import webhooks_api
from apivideo.model.not_found import NotFound
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = webhooks_api.WebhooksApi(api_client)
    webhook_id = "webhookId_example" # str | The webhook you wish to delete.

    # example passing only required values which don't have defaults set
    try:
        # Delete a Webhook
        api_instance.delete(webhook_id)
    except apivideo.ApiException as e:
        print("Exception when calling WebhooksApi->delete: %s\n" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#delete

Response examples

Not Found

{
  "type": "https://docs.api.video/reference/resource-not-found",
  "title": "The requested resource was not found.",
  "name": "webhookId",
  "status": 404
}

Too Many Requests

{
  "type": "https://docs.api.video/reference/too-many-requests",
  "title": "Too many requests.",
  "status": 429
}
webhook

Live stream started

type string

The name of the webhook event that occurred.

Example
"live-stream.broadcast.started"
emittedAt string

Returns the date-time when the webhook event occurred.

Format
date-time
Example
"2024-08-151T10:18:47+00:00"
liveStreamId string

The ID of the live stream that started broadcasting.

Example
"li400mYKSgQ6xs7taUeSaEap"
X-Api-Video-WebhookID string required

The unique ID of your webhook.

X-Api-Video-Signature string required

The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.

Responses

Your webhook server may return this response to api.video to signal that the webhook is accepted.

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "type": "live-stream.broadcast.started",
  "emittedAt": "2024-08-151T10:18:47+00:00",
  "liveStreamId": "li400mYKSgQ6xs7taUeSaEap"
}

Response examples

webhook

Live stream ended

type string

The name of the webhook event that occurred.

Example
"live-stream.broadcast.ended"
emittedAt string

Returns the date-time when the webhook event occurred.

Format
date-time
Example
"2024-08-151T10:18:47+00:00"
liveStreamId string

The ID of the live stream that ended broadcasting.

Example
"li400mYKSgQ6xs7taUeSaEap"
X-Api-Video-WebhookID string required

The unique ID of your webhook.

X-Api-Video-Signature string required

The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.

Responses

Your webhook server may return this response to api.video to signal that the webhook is accepted.

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "type": "live-stream.broadcast.ended",
  "emittedAt": "2024-08-151T10:18:47+00:00",
  "liveStreamId": "li400mYKSgQ6xs7taUeSaEap"
}

Response examples

webhook

Video source recorded

type string

The name of the webhook event that occurred.

Example
"video.source.recorded"
emittedAt string

Returns the date-time when the webhook event occurred.

Format
date-time
Example
"2024-08-151T10:18:47+00:00"
liveStreamId string

The ID of the live stream that ended broadcasting.

Example
"li400mYKSgQ6xs7taUeSaEap"
videoId string

The video ID of the live stream recording.

Example
"vi4blUQJFrYWbaG44NChkH11"
X-Api-Video-WebhookID string required

The unique ID of your webhook.

X-Api-Video-Signature string required

The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.

Responses

Your webhook server may return this response to api.video to signal that the webhook is accepted.

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "type": "video.source.recorded",
  "emittedAt": "2024-08-151T10:18:47+00:00",
  "liveStreamId": "li400mYKSgQ6xs7taUeSaEap",
  "videoId": "vi4blUQJFrYWbaG44NChkH11"
}

Response examples

webhook

Video encoding completed

type string

The name of the webhook event that occurred.

Example
"video.encoding.quality.completed"
emittedAt string

Returns the date-time when the webhook event occurred.

Format
date-time
Example
"2024-08-151T10:18:47+00:00"
videoId string

The ID of the video where a certain quality version's encoding is finished.

Example
"vi4blUQJFrYWbaG44NChkH11"
encoding string

The type of encoding that is finished.

Enum
  • hls
  • mp4
Example
"hls"
quality string

The quality version of encoding that is finished.

Enum
  • 240p
  • 360p
  • 480p
  • 720p
  • 1080p
Example
"1080p"
X-Api-Video-WebhookID string required

The unique ID of your webhook.

X-Api-Video-Signature string required

The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.

Responses

Your webhook server may return this response to api.video to signal that the webhook is accepted.

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "type": "video.encoding.quality.completed",
  "emittedAt": "2024-08-151T10:18:47+00:00",
  "videoId": "vi4blUQJFrYWbaG44NChkH11",
  "encoding": "hls",
  "quality": "1080p"
}

Response examples

webhook

Video caption generated

type string

The name of the webhook event that occurred.

Example
"video.caption.generated"
emittedAt string

Returns the date-time when the webhook event occurred.

Format
date-time
Example
"2024-08-151T10:18:47+00:00"
videoId string

The ID of the video for which the caption was generated.

Example
"vi4blUQJFrYWbaG44NCh1234"
captionId string

The ID of the caption that was generated.

Example
"caption_1CHAfLFHT5B5EV4vzT1234"
generationMode string

Returns the method used to generate the caption. transcript means that the caption was generated based on the transcription of the video. Learn more about transcripts here .

Enum
  • transcript
Example
"transcript"
language string
Enum
  • ar
  • ca
  • cs
  • da
  • de
  • el
  • en
  • es
  • fa
  • fi
  • fr
  • he
  • hi
  • hr
  • hu
  • it
  • ja
  • ko
  • ml
  • nl
  • nn
  • no
  • pl
  • pt
  • ru
  • sk
  • sl
  • te
  • tr
  • uk
  • ur
  • vi
  • zh
Example
"en"
X-Api-Video-WebhookID string required

The unique ID of your webhook.

X-Api-Video-Signature string required

The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.

Responses

Your webhook server may return this response to api.video to signal that the webhook is accepted.

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "type": "video.caption.generated",
  "emittedAt": "2024-08-151T10:18:47+00:00",
  "videoId": "vi4blUQJFrYWbaG44NCh1234",
  "captionId": "caption_1CHAfLFHT5B5EV4vzT1234",
  "generationMode": "transcript",
  "language": "en"
}

Response examples

webhook

Video summary generated

type string

The name of the webhook event that occurred.

Example
"video.summary.generated"
emittedAt string

Returns the date-time when the webhook event occurred.

Format
date-time
Example
"2024-08-151T10:18:47+00:00"
videoId string

The ID of the video for which the summary was generated.

Example
"vi4blUQJFrYWbaG44NCh1234"
summaryId string

The ID of the summary that was generated.

Example
"summary_1CGyYoB9XCgBk4iQna8ocT"
X-Api-Video-WebhookID string required

The unique ID of your webhook.

X-Api-Video-Signature string required

The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.

Responses

Your webhook server may return this response to api.video to signal that the webhook is accepted.

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "type": "video.summary.generated",
  "emittedAt": "2024-08-151T10:18:47+00:00",
  "videoId": "vi4blUQJFrYWbaG44NCh1234",
  "summaryId": "summary_1CGyYoB9XCgBk4iQna8ocT"
}

Response examples