Delete webhook event
curl --request DELETE \
--url https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}', 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.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}",
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: Bearer <token>"
],
]);
$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.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Events
Delete webhook event
Permanently unsubscribes the webhook from this event. This cannot be undone, and deliveries for this event stop immediately.
DELETE
/
webhooks
/
{webhookId}
/
events
/
{eventId}
Delete webhook event
curl --request DELETE \
--url https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}', 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.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}",
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: Bearer <token>"
],
]);
$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.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/webhooks/{webhookId}/events/{eventId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Authorizations
Authenticate with an API access token in the Authorization header: Authorization: Bearer <token>. Create a token from the API Access Tokens page in Contractors Cloud, under Integrations.
Path Parameters
The id of the webhook.
The id of the webhook event subscription.
Response
The webhook event was deleted. No content is returned.