Skip to main content

How webhooks work

When NearIQ detects a competitive change, it can POST a JSON payload to a URL you register. This lets you build real-time integrations — send an alert to Slack, trigger a workflow, or update your own dashboard.

Registering a webhook

Webhook URLs must use HTTPS, must not include embedded credentials, and must be publicly routable; localhost, private, link-local, multicast, and reserved network hosts are rejected. NearIQ also re-checks DNS resolution before delivery and deactivates endpoints that resolve to non-public addresses. NearIQ generates and returns the signing secret once when the webhook is created. Supported events are competitor.rating_change, competitor.review_surge, competitor.hours_change, competitor.price_change, competitor.status_change, competitor.website_change, competitor.new_competitor, business.rating_change, business.review_surge, alert.created, api_key.suspended, api_key.reactivated, and api_key.revoked_by_admin.

Payload format

Verifying signatures

NearIQ signs every webhook delivery using HMAC-SHA256. Verify the signature to ensure the request came from NearIQ:
Every delivery includes X-NearIQ-Delivery, X-NearIQ-Event, X-NearIQ-Timestamp, and X-NearIQ-Signature. The signature uses the exact raw request body, prefixed by the timestamp.

Retry behavior

NearIQ retries failed deliveries (non-2xx response or timeout) with exponential backoff:
  • Retry delays start at about 1 minute
  • Delays increase exponentially and cap at about 1 hour
  • Deliveries are attempted up to 8 times
After the final attempt, the delivery is marked dead. The endpoint remains registered so you can fix it without recreating the secret. You can review failed webhook deliveries from the dashboard alert details panel. The panel shows the event type, HTTP response status, retry count, next retry time, and a sanitized payload preview. After fixing your receiver, use the alert’s retry action to queue failed or dead deliveries again.

Webhook management endpoints

All webhook management endpoints require an API key with the webhooks:manage scope and a Growth+ plan.

GET /webhooks — List webhooks

POST /webhooks — Register a webhook

The secret is returned only on creation. Store it securely — it cannot be retrieved again.

PATCH /webhooks/:id — Update a webhook

DELETE /webhooks/:id — Remove a webhook

Deleting a webhook is permanent. Pending deliveries for the endpoint are canceled.