Delete Webhook Endpoint
curl --request DELETE \
--url https://api.example.com/v1/webhooks/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/v1/webhooks/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true
}
Webhooks
Delete Webhook Endpoint
Permanently delete a webhook configuration
DELETE
/
v1
/
webhooks
/
{id}
Delete Webhook Endpoint
curl --request DELETE \
--url https://api.example.com/v1/webhooks/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/v1/webhooks/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true
}
Delete Webhook Endpoint
DELETE https://api.baanx.com/v1/webhooks/{id} Permanently deletes a webhook configuration.Overview
Removes a webhook endpoint and stops all future event deliveries to it. This action cannot be undone. If you want to temporarily stop deliveries, consider disabling the webhook withis_active: false instead.
This action is permanent and irreversible. All configuration, including the signing key, will be lost. Event delivery to this endpoint will stop immediately.
Authentication
This endpoint requires authentication via Bearer token:Authorization: Bearer YOUR_ACCESS_TOKEN
Request
Headers
string
required
Bearer token for authentication
Path Parameters
string (UUID)
required
Unique identifier of the webhook configuration to delete
Request Example
curl -X DELETE https://api.baanx.com/v1/webhooks/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const webhookId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
console.log(data);
import requests
webhook_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.baanx.com/v1/webhooks/{webhook_id}"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
response = requests.delete(url, headers=headers)
print(response.json())
const deleteWebhook = async (webhookId: string): Promise<{ success: boolean }> => {
const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
};
Response
200 Success
boolean
Indicates the webhook was deleted successfully
{
"success": true
}
Error Responses
{
"message": "Not authenticated"
}
{
"message": "Not authorized"
}
{
"message": "Webhook config not found"
}
{
"message": "Notification service is not configured for this environment"
}
Related Endpoints
GET /v1/webhooks- List all remaining webhook endpointsPOST /v1/webhooks- Create a new webhook endpointPUT /v1/webhooks/{id}- Disable a webhook temporarily (is_active: false)
Was this page helpful?