New
Version 1 of the API has just opened up for your own scripts, with API keys per workspace. What is between [brackets] we have yet to fill in.
Setting up a webhook
You create a webhook in the dashboard, under Developer, on the Webhooks tab. For that you need the Manage API keys permission. You enter an https address and choose the events it should receive. After creating it you see, once, the secret every event is signed with; with New secret you replace it later.
Send test sends an event of the type webhook.ping to the address, to try out your receiver.
An event
Every event is a POST with JSON. It only contains ids: read the rest with an API key through the API. That way an event never contains more than your key may see, and what you read is always up to date.
POST /servur HTTP/1.1
Content-Type: application/json
Servur-Event: dns-zone.changed
Servur-Event-Id: 9f2c4f63-1e2b-4c33-9c8e-0d7f2b6a1c55
Servur-Delivery-Id: 019a6b00-0000-7000-8000-000000000001
Servur-Signature: t=1762963200,v1=5f0e...c2a1
{
"id": "9f2c4f63-1e2b-4c33-9c8e-0d7f2b6a1c55",
"type": "dns-zone.changed",
"createdAt": "2026-11-12T16:00:00.000Z",
"workspaceId": "019a6b00-0000-7000-8000-000000002205",
"data": { "zoneId": "019a6a00-0000-7000-8000-000000007500", "versionId": "019a..." }
}id is the same for every webhook that receives the event and for every attempt. An event can arrive more than once, and the order is not guaranteed: do not process an id you have already seen a second time.
Checking the signature
Servur-Signature contains a timestamp t and v1, the HMAC-SHA256 of t, a full stop and the body as it arrived, with the webhook's secret. Calculate it yourself, compare in constant time, and refuse an event whose t is more than five minutes old.
import { createHmac, timingSafeEqual } from 'node:crypto';
// `body` is the request body as it arrived, before any JSON parsing.
export const isFromServur = (secret, header, body) => {
const parts = Object.fromEntries(header.split(',').map((part) => part.split('=')));
const age = Math.abs(Date.now() / 1000 - Number(parts.t));
const expected = createHmac('sha256', secret).update(`${parts.t}.${body}`).digest('hex');
return age < 300 && expected.length === parts.v1?.length && timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
};<?php
$body = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_SERVUR_SIGNATURE'] ?? ''), $parts);
$expected = hash_hmac('sha256', ($parts['t'] ?? '') . '.' . $body, getenv('SERVUR_WEBHOOK_SECRET'));
if (abs(time() - (int) ($parts['t'] ?? 0)) > 300 || !hash_equals($expected, $parts['v1'] ?? '')) {
http_response_code(400);
exit;
}Retrying and switching off
Respond within ten seconds with a 2xx status. Any other response, a timeout or a redirect counts as failed: we try again, a little later each time, for about a day. If every event fails for three days, we switch the webhook off and the people who manage the API keys get an email. In the dashboard you see the events of the last thirty days for each webhook, with what your receiver answered, and you can send one again.
All events
Services
| Type | When |
|---|---|
service.activated | A service has been set up and is running. |
service.renewal-due | A service's next period is on the next invoice. |
service.renewed | A service runs for another period. |
service.suspended | A service has been put on hold. |
service.unsuspended | A service that was on hold is running again. |
service.cancelled | A service has been cancelled and stopped. |
service.expired | A service ran out without renewal. |
Billing
| Type | When |
|---|---|
order.paid | An order has been paid or started by direct debit. |
invoice.issued | An invoice or credit note has been sent. |
invoice.paid | An invoice has been paid. |
DNS and domain names
| Type | When |
|---|---|
dns-zone.changed | The records of a zone have changed. |
domain.transferred | A transferred domain name has arrived. |
domain.nameservers-changed | A domain name's nameservers have changed. |
| Type | When |
|---|---|
mailbox.created | A mailbox has been added. |
mailbox.deleted | A mailbox has been deleted. |
