Delete Webhook
curl --request DELETE \
--url https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://webhooks.sbx.moduluslabs.io/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://webhooks.sbx.moduluslabs.io/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: Basic <encoded-value>"
],
]);
$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://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();using RestSharp;
var options = new RestClientOptions("https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Basic <encoded-value>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}Webhooks API
Delete Webhook
Delete a webhook endpoint
DELETE
/
v1
/
webhooks
/
{id}
Delete Webhook
curl --request DELETE \
--url https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://webhooks.sbx.moduluslabs.io/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://webhooks.sbx.moduluslabs.io/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: Basic <encoded-value>"
],
]);
$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://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();using RestSharp;
var options = new RestClientOptions("https://webhooks.sbx.moduluslabs.io/v1/webhooks/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Basic <encoded-value>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}Returns
200 with an encrypted { "response": { "Token": "<JWE>" } } envelope; the decrypted body is { "id": "<uuid>" }. {id} is the webhook’s UUID. Deletion is permanent.Authorizations
HTTP Basic Authentication using your Secret Key as the username and an empty password
Path Parameters
The unique identifier of the webhook
Response
Webhook deleted successfully
Id of the deleted webhook. Returned inside the encrypted response Token.
Was this page helpful?