Webhooks
Update Webhook
Change URL, events, or enable/disable.
PATCH
/webhooks/{webhook_id}Path Parameters
webhook_idstringrequiredWebhook ID.
Body Parameters
endpointstringNew URL.
eventsstring[]New event list.
status'enabled' | 'disabled'On or off.
import { Resend } from 'resend';
const client = new Resend('pw_xxxxxxxxx');
const { data, error } = await client.webhooks.update('{webhook_id}', { status: 'disabled' });import requests
res = requests.patch(
"https://postwaves.online/webhooks/{webhook_id}",
headers={"Authorization": "Bearer pw_xxxxxxxxx"},
json={
"status": "disabled"
},
)
print(res.json())<?php
$ch = curl_init('https://postwaves.online/webhooks/{webhook_id}');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer pw_xxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'status' => 'disabled',
]),
]);
$response = json_decode(curl_exec($ch), true);require "net/http"
require "json"
uri = URI("https://postwaves.online/webhooks/{webhook_id}")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer pw_xxxxxxxxx"
req["Content-Type"] = "application/json"
req.body = {
status: "disabled"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
puts JSON.parse(res.body)package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"status":"disabled"}`)
req, _ := http.NewRequest("PATCH", "https://postwaves.online/webhooks/{webhook_id}", body)
req.Header.Set("Authorization", "Bearer pw_xxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}curl -X PATCH 'https://postwaves.online/webhooks/{webhook_id}' \
-H 'Authorization: Bearer pw_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{"status":"disabled"}'Try itPATCH
/webhooks/%7Bwebhook_id%7DNo key yet? Create one in the dashboard.