Uptime alert delivered to your webhook
What NSIN sends to the webhook URL saved with PUT /uptime/settings
(webhook_url, notify_webhook: true): one outage.opened when an
incident opens on the domain, one outage.resolved when it resolves,
and test for POST /uptime/webhook/test. Each incident sends each
event at most once.
Verify every request. X-Nsin-Signature is
sha256=<hex HMAC-SHA256> of <X-Nsin-Timestamp>.<raw body>, keyed
with the domain’s signing secret (GET /uptime/webhook). The
timestamp is inside the MAC, so reject requests whose timestamp is too
old to stop replays.
Answer with any 2xx within 5 seconds. Anything else — another
status, a timeout, a connection error — is retried twice, after 5 and
30 seconds. Redirects are not followed, and a URL that resolves to a
private or otherwise disallowed address is refused without retrying.
Every delivery is listed in GET /uptime/webhook/deliveries.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”The event name, repeated from the body.
Example
1759050000When the request was signed, in unix seconds.
sha256= followed by the hex HMAC-SHA256 of <timestamp>.<raw body>.
Always Nsin-Uptime-Webhook/1.
Request Body required
Section titled “Request Body required ”The JSON body POSTed to a domain’s uptime webhook.
Every request carries X-Nsin-Event, X-Nsin-Timestamp (unix seconds)
and X-Nsin-Signature: sha256=<hex>, the HMAC-SHA256 of
<timestamp>.<raw body> keyed with the domain’s signing secret. Answer
with any 2xx within 5 seconds. Anything else is retried twice (after 5 s
and 30 s). Redirects are not followed. Each incident sends each event at
most once.
object
What happened. test for POST /uptime/webhook/test.
The incident this event is about. 0 on test.
null for the default whole-host watch.
The monitor’s name or path; empty for the whole-host watch.
Highest per-minute origin-error percentage seen in the incident.
When the incident opened.
When it resolved. null on outage.opened.
How long it lasted, in seconds. null until resolved.
When this delivery was signed — the same instant as X-Nsin-Timestamp.
Responses
Section titled “ Responses ”Delivery accepted. Any other answer counts as a failure and is retried.