Black Friday: add funds and get 2x credit, up to $50 free ($25 → $50, $50 → $100). Use it for anything: domains, hosting, email. Code: BLACKFRIDAY2026 Get 2x credit →

Developers → Webhooks

Webhooks

NameOcean posts a signed JSON event to your HTTPS endpoint when something happens on your account, so your code can react instead of polling.

Add an endpoint

In Dashboard → Webhooks, with the API, or by asking your AI over MCP (create_webhook). Choose event types, groups such as dns.*, or all events. The answer includes the signing secret (whsec_…).

curl
$ curl -X POST https://nameocean.net/api/v1/webhooks \
    -H "Authorization: Bearer $NAMEOCEAN_API_KEY" -H "Content-Type: application/json" \
    -d '{"url": "https://example.com/hooks/nameocean", "events": ["dns.*", "ssl.issued", "domain.expiring"]}'

The URL must be https on a public server. Answer with any 2xx within 10 seconds; do slow work after answering.

What you receive

POST https://example.com/hooks/nameocean
Content-Type: application/json
X-NameOcean-Event: dns.record.created
X-NameOcean-Delivery: whd_7c1e0f9a2b3d4e5f6a7b8c9d
X-NameOcean-Signature: t=1794300000,v1=5f2b…

{
  "id": "evt_3a9f1c2e4b5d6a7c8e9f0a1b",
  "type": "dns.record.created",
  "created": "2026-11-10T09:20:00+00:00",
  "data": {
    "zone": "example.com",
    "record": {"id": 4211, "type": "A", "hostname": "www", "ip": "203.0.113.10", "ttl": "1h"}
  }
}

The event id stays the same when a delivery is retried or resent: use it to skip events you have already handled. Events can arrive out of order.

Verify the signature

t is the Unix time of the request, v1 the hex HMAC-SHA256 of t, a dot and the raw body, keyed with your secret. Compute it over the raw bytes, before parsing the JSON, compare in constant time, and refuse timestamps older than five minutes.

X-NameOcean-Signature
t=1794300000,v1=hex(HMAC_SHA256(secret, "1794300000." + raw_body))
Python
import hashlib, hmac, time

def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    fields = dict(part.split("=", 1) for part in header.split(","))
    ts = int(fields["t"])
    if abs(time.time() - ts) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{ts}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, fields.get("v1", ""))
Node.js
import crypto from "node:crypto";

export function verify(secret, header, rawBody, tolerance = 300) {
  const fields = Object.fromEntries(header.split(",").map((p) => p.split("=", 2)));
  const ts = Number(fields.t);
  if (Math.abs(Date.now() / 1000 - ts) > tolerance) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${ts}.`).update(rawBody).digest("hex");
  const got = Buffer.from(fields.v1 || "", "hex");
  return got.length === 32 && crypto.timingSafeEqual(Buffer.from(expected, "hex"), got);
}
Go
func Verify(secret, header string, body []byte) bool {
	var ts int64
	var v1 string
	for _, part := range strings.Split(header, ",") {
		k, v, _ := strings.Cut(part, "=")
		switch k {
		case "t":
			ts, _ = strconv.ParseInt(v, 10, 64)
		case "v1":
			v1 = v
		}
	}
	if d := time.Now().Unix() - ts; d > 300 || d < -300 {
		return false
	}
	mac := hmac.New(sha256.New, []byte(secret))
	fmt.Fprintf(mac, "%d.", ts)
	mac.Write(body)
	return hmac.Equal([]byte(hex.EncodeToString(mac.Sum(nil))), []byte(v1))
}

Retries and turning off

A delivery that gets no answer, a timeout, a 5xx, 408 or 429 is retried after 1m, 5m, 30m, 2h, 5h, 10h, 10h: 8 attempts over about a day. Any other 4xx fails at once. After 5 deliveries in a row fail for good, the endpoint is turned off and you get an email; turn it back on in the dashboard or with PATCH active: true. Every delivery, with the status code and the start of your answer, is listed in the dashboard and at GET /api/v1/webhooks/{id}/deliveries, where you can resend one.

Events

domain.registeredA domain was registered in your account.
domain.renewedA domain's expiry date moved forward (renewal).
domain.expiringA domain expires in 30, 7 or 1 days.
domain.expiredA domain expired yesterday.
domain.nameservers.updatedA domain's nameservers changed.
domain.transfer.startedA transfer in or out was requested at the registry.
domain.transfer.completedA transfer finished.
domain.transfer.failedA transfer was rejected or cancelled.
account.spend_limit.reachedA purchase through the API, CLI or MCP was refused because it would go over the monthly spending limit (sent at most once a day).
dns.zone.createdA DNS zone was created.
dns.zone.deletedA DNS zone was deleted.
dns.record.createdA DNS record was added.
dns.record.updatedA DNS record changed.
dns.record.deletedA DNS record was deleted.
ssl.issuedA certificate was issued for the first time.
ssl.renewedA certificate was renewed.
ssl.expiringA certificate expires in 7 days and has not been renewed yet.
email.mailbox.createdA mailbox was added to one of your mail domains.
email.mailbox.deletedA mailbox and its mail were deleted.
email.forwarding.enabledEmail forwarding was turned on for a domain.
email.forwarding.disabledEmail forwarding was turned off for a domain, by you or because the domain stopped qualifying (the reason is in the event).
email.deliveredA message you sent with the API or a sending domain's SMTP was accepted by the recipient's mail server.
email.delayedDelivery of a message you sent failed for now; the mail server keeps retrying.
email.bouncedA message you sent could not be delivered (the SMTP code and error are in the event).
email.suppressedA message was not sent because its recipient is on the domain's suppression list.
email.quota.exceededYour monthly transactional email quota ran out: the API refuses mail and sending domains' SMTP logins are held until the next month, pay as you go or a higher spend cap.
email.charge.failedLast month's transactional email could not be charged: the amount is owed on the balance and only the free emails go out until it is paid.
email.sending_domain.createdA sending domain was added (it sends once its SPF and DKIM are published).
email.sending_domain.verifiedA sending domain's SPF and DKIM were found: it can send.
email.sending_domain.deletedA sending domain was removed: its SMTP login no longer works.
server.createdAn app server was created (it is building; server.started is not sent for that).
server.startedA server was started.
server.stoppedA server was stopped.
server.restartedA server was rebooted.
server.restore.startedA backup is being restored over a server.
server.free_plan.endingA server's free year ends in 14 or 3 days; then it moves to the Starter plan, billed to the card on the account (the date and price are in the event).
server.free_plan.endedA server's free year is over: it was moved to the Starter plan and is billed from now on.
server.deployedCode was deployed to a server and its apps restarted (status succeeded or failed).
server.github_connectedA server was connected to a GitHub repository: pushes to its branch deploy it.
server.github_disconnectedA server's GitHub repository no longer deploys it: disconnected, or GitHub access was lost (the reason is in the event).
server.search.indexedA server's search for agents index was built: first crawl, a reindex you asked for, or the first good crawl after failures (pages = indexed pages).
server.search.failedA server's search for agents crawl failed (no page answered); sent once until it works again.
app.install.startedA server was created for a one-click app; the app installs as soon as the server is up.
app.installedA one-click app (WordPress, n8n, Ghost...) finished installing on its server and answers on its address.
app.install.failedA one-click app could not be installed; the reason is in the event and the dashboard can retry.
app.updatedA one-click app was updated to a new version (a backup was taken first).
app.update.failedA one-click app update failed; the previous version was put back when possible.
monitor.downAn uptime monitor went down (most checking locations failed it).
monitor.upAn uptime monitor is up again (the downtime is in the event).
monitor.ssl_expiringA monitored site's certificate expires in 14, 7 or 1 days.
webhook.testSent when you press Send test; ignores the endpoint's event filter.

data carries the domain or zone and the object: the record (with previous on updates), the expiry date, the nameservers (with previous). The exact fields of each object are those of the REST API.

Incoming email can be posted to a URL too: set it per address in Email Forwarding. Those posts use the same headers and signature, with X-NameOcean-Event: email.received.

Good to know

  • NameOcean only posts to public addresses, checked again on every delivery, and never follows redirects.
  • Rotate the secret in the dashboard if it leaks; events are signed with the new one at once.
  • Send test posts a webhook.test event right away, whatever the endpoint's event filter.