Skip to content

Add a webhook endpoint

POST /v1/webhooks/endpoints

Adds a URL of yours that events are sent to as they happen. The answer carries the endpoint's signing secret, this once: keep it where your receiver can read it, and check every call's Rabbitflare-Signature header with it.

The URL must be https on port 443 or 8443, with a domain name (not an IP address) whose addresses are on the public internet; it's checked now and again before every call. Events that happen from now on are sent; earlier ones are not. Test it with POST /webhooks/endpoints/{endpointId}/actions/send-test.

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).

Limits. 10 endpoints per account.

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

FieldType and description
Idempotency-Key

string 1 to 255 characters

A key of your own for this request, like a UUID: letters, digits and _ - : . Send the request again with the same key (after a timeout, say) and it's done only once. Keys are kept for 24 hours (see Idempotency).

Request body

JSON, with these fields. Fields that aren't listed are refused.

FieldType and description
url Required

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 null.

events Required

array of strings 1 to 200 items

The event types to send (see GET /webhooks/event-types), or ["*"] for every type this token may read, including types added later.

allServers

boolean

Send events of every server (default true, or false when serverIds is sent). False: only those of serverIds, and account-wide events.

serverIds

array of strings Up to 500 items

The servers whose events to send, when allServers is false.

Example request

curl -X POST "https://api.rabbitflare.com/v1/webhooks/endpoints" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://hooks.example.com/rabbitflare",
  "description": "Deploy notifications",
  "events": [
    "server.ready",
    "site.ready",
    "site.install_failed"
  ]
}'

Response

201 Created Returns the WebhookEndpointWithSecret object in data.

The WebhookEndpointWithSecret object's fields 14 fields
FieldType 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 null.

events

array of strings

The event types sent to it (see GET /webhooks/event-types), or ["*"] for every type, including types added later. An endpoint added through the API is sent only the types its token may read now.

allServers

boolean

Whether it gets events of every server (and of account-wide things). False: only those in serverIds, and account-wide events.

serverIds

array of strings

The servers whose events it gets, when allServers is false. Empty when allServers is true.

status

string

enabled: events are sent to it. disabled: nothing is sent until it's turned on again.

Known values: enableddisabled More can appear.

disabledReason

string or null

Why it's off: user, token, failing or admin. null while it's on.

Known values: usertokenfailingadmin More can appear.

failingSince

string or null An ISO 8601 time, in UTC

Since when its deliveries have failed with no success in between. null: it isn't failing. After 5 days of failures it's turned off.

lastSuccessAt

string or null An ISO 8601 time, in UTC

When a delivery to it last succeeded, or null.

lastFailureAt

string or null An ISO 8601 time, in UTC

When a delivery attempt to it last failed, or null.

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.

secret

string

The endpoint's signing secret (rfwhsec_ and 32 characters). Shown this once: keep it where your receiver can read it. Each delivery's Rabbitflare-Signature header is made with it.

Example response

201 Created
{
  "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": null,
    "lastFailureAt": null,
    "createdAt": "2026-11-18T08:46:49.000Z",
    "updatedAt": "2026-11-18T08:46:49.000Z",
    "secret": "rfwhsec_7Kq2mPq4Xc7Lw9Tn0Bv3YsA1b2C3d4E5"
  }
}

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 codeWhen, and what to do
403 insufficient_scope

The token lacks a scope this operation needs (missingScopes).

Edit the token in the panel and add the scopes in missingScopes.

403 · 409 limit_reached

A limit is reached: message says which (servers per account, snapshots per server, domains per site, …).

Delete something first, or contact support to raise the limit.

422 validation_failed

One or more fields are missing or wrong. fields names each one with what's wrong.

Correct the fields named in fields. Unknown fields are refused too.

Rate limit

Write requests: 30 a minute per token, 60 per account. More in Rate limits.

Added on .

Popular

API docs