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 keyrequiredAPI key from the developer console.
Body
application/json · required · UpdateWebhookRequest
urlstring or nulleventsarray of WebhookEventType or nullEach one of
render.succeededrender.failedrender.cancelleddownload_archive.readydownload_archive.failedversion_export.readyversion_export.failedbalance.lowwebhook.testenabledboolean or nulldescriptionstring or nullallEventsboolean or null
Responses
- 200 OK
application/json · WebhookDto
idstring (uuid)urlstringdescriptionstring or nullallEventsbooleaneventsarray of WebhookEventTypeEach one of
render.succeededrender.failedrender.cancelleddownload_archive.readydownload_archive.failedversion_export.readyversion_export.failedbalance.lowwebhook.testenabledbooleandisabledReasonstring or nulldisabledAtstring (date-time) or nullpreviousSecretExpiresAtstring (date-time) or nullcreatedAtstring (date-time)secretstring or null
Errors
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
- 429 Too Many Requests
application/json · ErrorResponse
errorApiErrorApiError fields
codestringmessagestring
Errors lists the error codes and says when to retry.