Webhooks
Webhooks let YourNextHome push events to a URL you control as soon as something happens. For v1, that means a new inquiry. You no longer need to poll our API to find out a lead came in.
What ships in v1
A single event type:
The signing scheme, headers, and delivery guarantees described below are designed to extend, so adding new event types later won't break existing integrations.
Configure an endpoint
- Sign in to the dashboard as an organization admin.
- Open Settings → Webhooks.
- Generate the signing secret and copy it once; we never show it again. Store it in your secrets manager.
- Click Add endpoint, paste your HTTPS URL, enable
inquiry.created, and save.
The URL must be HTTPS and must resolve to a public address. We refuse loopback (127.0.0.0/8), private (10/8, 172.16/12, 192.168/16, fc00::/7), and link-local (169.254/16, fe80::/10) ranges to prevent abuse.
Receiving a webhook
Each delivery is an HTTPS POST with a JSON body.
Request headers
Body (inquiry.created)
We deliberately omit ip and userAgent: PII you don't need to receive.
Verify the signature
Always recompute the HMAC and compare with timingSafeEqual. Never trust the X-YNH-Signature header verbatim.
A quick curl check against a freshly delivered payload (handy for ops):
Delivery guarantees
-
At-least-once. Receivers must dedup by
X-YNH-Event-Id. -
No ordering guarantee between events. A replay can arrive after a newer event.
-
Up to 6 attempts spaced out over ~30 hours, with ±20 % jitter on each delay:
-
Success = HTTP 2xx. Anything else (4xx, 5xx, network error, timeout) counts as a failure and triggers the next attempt.
-
Response capture. We record HTTP status + the first 2 KB of the body, handy for debugging your handler.
-
Auto-disable. After 20 consecutive dead deliveries we disable the endpoint and stop sending. Re-enable it from the dashboard once you've fixed your handler.
-
Retention. We keep delivery logs for 30 days.
Rotating the secret
Open Settings → Webhooks → Rotate signing secret. The old secret stops working immediately; there is no overlap window in v1. Update every consumer to the new secret before rotating in production.
If you lose the secret, just rotate. There is no "reveal again" endpoint.
Replay
From the deliveries drawer on a given endpoint, click Replay on any past attempt. We insert a fresh delivery row that reuses the original X-YNH-Event-Id. Your receiver's dedup logic should treat the replay as a no-op for events you've already processed.