Delete a webhook endpoint
/v1/webhooks/endpoints/{endpointId} Deletes an endpoint, with its deliveries. Nothing more is sent to it. This can't be undone.
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
webhooks:write - Manage webhooks. Add, change and remove webhook endpoints.
Headers
| Field | Type and description |
|---|---|
Idempotency-Key | string 1 to 255 characters A key of your own for this request, like a UUID: letters, digits and |
Path parameters
| Field | Type and description |
|---|---|
endpointId Required | string The endpoint's id. |
Example request
curl -X DELETE "https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
await rf.webhooks.endpoints.delete({ endpointId: "3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b" }); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
} import os
import requests
response = requests.delete(
"https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
timeout=120,
)
response.raise_for_status() Response
204 No Content The answer has no body.
Example response
No content: the answer has no body.
Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |