Delete a webhook endpoint
Stops all deliveries to this URL. Deliveries already queued are dropped.
Authentication
Bearer tokenbearerAuth
Create a key under Settings › API keys and send it as Authorization: Bearer YOUR_KEY.
Parameters
Responses
204Deleted.
No content.
404The id doesn't exist in this workspace.application/json
DELETE/webhook-endpoints/{endpoint_id}
curl https://api.relaypoint.example/v1/webhook-endpoints/whe_7c1n4r \
--request DELETE \
--header 'Authorization: Bearer YOUR_TOKEN'const response = await fetch('https://api.relaypoint.example/v1/webhook-endpoints/whe_7c1n4r', {
method: 'DELETE',
headers: {
Authorization: 'Bearer YOUR_TOKEN'
}
})
console.log(response.status, await response.text());import requests
response = requests.delete(
"https://api.relaypoint.example/v1/webhook-endpoints/whe_7c1n4r",
headers={
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(response.status_code)
print(response.text)<?php
$ch = curl_init('https://api.relaypoint.example/v1/webhook-endpoints/whe_7c1n4r');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_TOKEN',
],
]);
$response = curl_exec($ch);
if ($response === false) {
exit('Request failed: ' . curl_error($ch) . PHP_EOL);
}
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;
curl_close($ch);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
requestUrl := "https://api.relaypoint.example/v1/webhook-endpoints/whe_7c1n4r"
req, _ := http.NewRequest("DELETE", requestUrl, nil)
req.Header.Add("Authorization", "Bearer YOUR_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}Response
{
"error": {
"code": "not_found",
"message": "No conversation conv_000000"
}
}Was this page helpful?