API reference / Webhooks

Update a webhook endpoint

PATCH/v1/webhooks/{webhookId}

Changes url, events, enabled or description; a field you leave out is kept. Send description as an empty string to clear it. A new url follows the same rules as when the endpoint was added, counts toward the 20 adds or repoints a workspace makes an hour (429 rate_limited), and is emailed to the workspace's owners and admins. Send allEvents: true instead of events to receive every event type again, including ones added later. Disabling stops queued retries; enabling again clears disabledReason.

Request

curl -s -X PATCH $BLITFRAME/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101 \
  -H "Authorization: Bearer $BLITFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"events": ["render.succeeded", "download_archive.ready"], "enabled": true}'
import os, requests

response = requests.patch(
    f"{os.environ['BLITFRAME']}/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101",
    headers={"Authorization": f"Bearer {os.environ['BLITFRAME_API_KEY']}"},
    json={"events": ["render.succeeded", "download_archive.ready"], "enabled": True},
)
print(response.json())
const response = await fetch(`${process.env.BLITFRAME}/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101`, {
  method: "PATCH",
  headers: { Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ events: ["render.succeeded", "download_archive.ready"], enabled: true }),
});
console.log(await response.json());
<?php
$request = curl_init(getenv("BLITFRAME") . "/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101");
curl_setopt_array($request, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "PATCH",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("BLITFRAME_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => '{"events": ["render.succeeded", "download_archive.ready"], "enabled": true}',
]);
$response = curl_exec($request);
echo $response;
require "net/http"

uri = URI(ENV["BLITFRAME"] + '/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101')
request = Net::HTTP::Patch.new(uri)
request["Authorization"] = "Bearer " + ENV["BLITFRAME_API_KEY"]
request["Content-Type"] = "application/json"
request.body = '{"events": ["render.succeeded", "download_archive.ready"], "enabled": true}'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
puts response.body
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{"events": ["render.succeeded", "download_archive.ready"], "enabled": true}`)
	request, err := http.NewRequest("PATCH", os.Getenv("BLITFRAME")+"/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101", body)
	if err != nil {
		panic(err)
	}
	request.Header.Set("Authorization", "Bearer "+os.Getenv("BLITFRAME_API_KEY"))
	request.Header.Set("Content-Type", "application/json")
	response, err := http.DefaultClient.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()
	text, _ := io.ReadAll(response.Body)
	fmt.Println(string(text))
}
using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Patch,
    Environment.GetEnvironmentVariable("BLITFRAME") + "/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("BLITFRAME_API_KEY"));
request.Content = new StringContent(
    """
    {"events": ["render.succeeded", "download_archive.ready"], "enabled": true}
    """, Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        var request = HttpRequest.newBuilder(URI.create(System.getenv("BLITFRAME") + "/webhooks/ce9bfd3d-fceb-4655-8821-2e3f7ce0b101"))
            .header("Authorization", "Bearer " + System.getenv("BLITFRAME_API_KEY"))
            .header("Content-Type", "application/json")
            .method("PATCH", HttpRequest.BodyPublishers.ofString("""
                {"events": ["render.succeeded", "download_archive.ready"], "enabled": true}
                """))
            .build();
        var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Path parameters

  • webhookIdstring (uuid)required

Headers

  • AuthorizationBearer Blitframe API keyrequired

    API key from the developer console.

Body

application/json · required · UpdateWebhookRequest

  • urlstring or null
  • eventsarray of WebhookEventType or null

    Each one of render.succeeded render.failed render.cancelled download_archive.ready download_archive.failed version_export.ready version_export.failed balance.low webhook.test

  • enabledboolean or null
  • descriptionstring or null
  • allEventsboolean or null

Try it

PATCH/v1/webhooks/{webhookId}

Used for the requests you send from this page only. It is not saved.

This sends a real request to your workspace: a render spends render seconds, and a delete is final.

Response

Send the request to see the answer here.

Responses

  • 200 OK

application/json · WebhookDto

  • idstring (uuid)
  • urlstring
  • descriptionstring or null
  • allEventsboolean
  • eventsarray of WebhookEventType

    Each one of render.succeeded render.failed render.cancelled download_archive.ready download_archive.failed version_export.ready version_export.failed balance.low webhook.test

  • enabledboolean
  • disabledReasonstring or null
  • disabledAtstring (date-time) or null
  • previousSecretExpiresAtstring (date-time) or null
  • createdAtstring (date-time)
  • secretstring or null

Errors

  • 400 Bad Request
  • 401 Unauthorized
  • 404 Not Found
  • 429 Too Many Requests

application/json · ErrorResponse

  • ApiError fields
    • codestring
    • messagestring

Errors lists the error codes and says when to retry.