Change a webhook endpoint
/v1/webhooks/endpoints/{endpointId} Changes an endpoint's URL, note, events or servers, or turns it off and on (status). Only the fields sent change.
Turning an endpoint on again (also one that was turned off because its deliveries kept failing) clears its failing streak; deliveries that already failed stay failed (send them again with POST /webhooks/deliveries/{deliveryId}/actions/redeliver).
An endpoint made or changed with a token can only be sent event types the token may read: each type needs its group's read scope (servers:read for server events, sites:read for site events, account:read for API events), otherwise 403 insufficient_scope. ["*"] needs the read scope of every group sent today (servers:read, sites:read, support:read and account:read); a type added later is sent to it only if its token may read it. A token limited to some servers can only make endpoints limited to those servers: send serverIds with only them (serverIds sent without allServers means allServers false).
An endpoint added through the API follows the token that added it until its URL is changed in the panel: it's sent only the events that token may read now, of the servers it reaches; only that token can change it, turn it on or rotate its secret (another token that reaches it may read it, send it a test event or a delivery again, turn it off or delete it, and gets 403 panel_only for anything else); and it's turned off when the token no longer covers it, expires, revokes itself or is revoked by support, and when you revoke the token in the panel unless you choose to keep it on (it's then still sent only what the token could read).
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. |
Request body
JSON, with these fields. Fields that aren't listed are refused.
| Field | Type and description |
|---|---|
url | string 1 to 2,000 characters Where to send events: an https URL on port 443 or 8443, with a domain name (not an IP address) that resolves to public addresses. |
description | string or null Up to 200 characters Your own note about the endpoint (up to 200 characters), or |
events | array of strings 1 to 200 items The event types to send (see |
allServers | boolean Send events of every server. False: only those of |
serverIds | array of strings Up to 500 items The servers whose events to send, when |
status | string
One of: |
Example request
curl -X PATCH "https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "enabled"
}' const res = await fetch("https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"status": "enabled"
}),
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
const data = await rf.webhooks.endpoints.update({
endpointId: "3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b",
status: "enabled",
});
console.log(data); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'status' => 'enabled',
]),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
print_r(json_decode($body, true)['data']); import os
import requests
response = requests.patch(
"https://api.rabbitflare.com/v1/webhooks/endpoints/3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
json={
"status": "enabled",
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
200 OK Returns the WebhookEndpoint object in data.
The WebhookEndpoint object's fields 13 fields
| Field | Type and description |
|---|---|
id | string The endpoint's id. |
url | string Where events are sent: an https URL on port 443 or 8443. |
description | string or null Your own note about the endpoint, or |
events | array of strings The event types sent to it (see |
allServers | boolean Whether it gets events of every server (and of account-wide things). False: only those in |
serverIds | array of strings The servers whose events it gets, when |
status | string
Known values: |
disabledReason | string or null Why it's off: Known values: |
failingSince | string or null An ISO 8601 time, in UTC Since when its deliveries have failed with no success in between. |
lastSuccessAt | string or null An ISO 8601 time, in UTC When a delivery to it last succeeded, or |
lastFailureAt | string or null An ISO 8601 time, in UTC When a delivery attempt to it last failed, or |
createdAt | string An ISO 8601 time, in UTC When it was added. |
updatedAt | string An ISO 8601 time, in UTC When its settings last changed. |
Example response
{
"data": {
"id": "3c6f9a1e-2b4d-4e8f-9a0b-1c2d3e4f5a6b",
"url": "https://hooks.example.com/rabbitflare",
"description": "Deploy notifications",
"events": [
"server.ready",
"site.ready",
"site.install_failed"
],
"allServers": true,
"serverIds": [],
"status": "enabled",
"disabledReason": null,
"failingSince": null,
"lastSuccessAt": "2026-11-18T09:12:03.000Z",
"lastFailureAt": null,
"createdAt": "2026-11-18T08:46:49.000Z",
"updatedAt": "2026-11-18T08:46:49.000Z"
}
} 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 |
|---|---|
403 insufficient_ | The token lacks a scope this operation needs ( Edit the token in the panel and add the scopes in |
403 panel_ | This can only be done in the control panel: for example, rotating the signing secret of a webhook endpoint added in the panel or with another API token. Do it in the control panel, signed in as the account's owner (for a signing secret: API, then Webhooks, then the endpoint). |
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. |
422 validation_ | One or more fields are missing or wrong. Correct the fields named in |