Delete Webhook Endpoint
curl --request DELETE \
--url https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_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.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_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 => [
"X-API-Key: <api-key>"
],
]);
$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.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"deleted": true
}Webhook Endpoints
Delete Webhook Endpoint
Delete a webhook endpoint
DELETE
/
v1
/
customers
/
{customer_id}
/
webhook-endpoints
/
{endpoint_id}
Delete Webhook Endpoint
curl --request DELETE \
--url https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_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.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_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 => [
"X-API-Key: <api-key>"
],
]);
$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.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/customers/{customer_id}/webhook-endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"deleted": true
}Stops an endpoint from receiving further events. Requires
write access on the webhooks scope.
Deletion is a soft delete, and it only affects event selection going forward: the endpoint is no longer picked for events that occur after the call, but any delivery already queued or in its retry cycle is still attempted against the old URL. Keep the receiver able to accept, or at least acknowledge, those deliveries for as long as retries can run, up to roughly two days.
The endpoint stays visible in List Webhook Endpoints with deleted_at set, but Get, Update and a second Delete all return 404. Deletion cannot be undone; to start receiving events again, create a new endpoint, which gets a new secret.
Path Parameters
string
required
The customer’s external ID (starts with
cus_)string
required
The webhook endpoint’s external ID (starts with
wh_)Response
string
The deleted webhook endpoint ID
string
Always returns
"webhook_endpoint"boolean
Always returns
trueErrors
| Status | code | When |
|---|---|---|
404 | RESOURCE_NOT_FOUND | No endpoint with this ID belongs to the customer, or it was already deleted |
Response Example
{
"id": "wh_g738im3ueie9s9zexmf9cl87",
"object": "webhook_endpoint",
"deleted": true
}