Webhooks integration
Send buyer intent leads to any endpoint
Needle POSTs one JSON event per hot or worth-engaging lead to the HTTPS URL you choose, signed with a secret only you and Needle hold. Use it for your own API, for Zapier through "Webhooks by Zapier", or for any tool without a native integration.
7-day free trial - no card. Cancel anytime.
How it works
- Step 1
Save a brand and turn on Auto Search
Add the problem phrases, competitors, and communities you care about. Needle reruns the search on your schedule.
- Step 2
Add your endpoint
Paste an HTTPS URL that accepts POST requests, then click Test and enable. Needle sends a test event and shows the signing secret once - copy it.
- Step 3
Verify, then handle the event
Check X-Needle-Signature against the raw body, dedupe on event_id, and route the lead wherever you need.
Why teams use the webhook
Available on the Growth plan and up.
Reach any tool
Connect a CRM, ticketing system, or internal app that has no native Needle integration.
No-code friendly
Point it at a "Webhooks by Zapier" catch hook, or use the Make and n8n destinations, which come with ready-made templates.
Signed and deduped
Every request is signed with HMAC-SHA256 using a secret for that endpoint, and carries a stable event_id so retries never create duplicates on your side.
Resilient delivery
Failed requests are retried. If your endpoint starts returning 401, 403, 404, or 410, Needle pauses it and shows the error in the dashboard.
The payload: LeadEvent v1
One event per lead, sent as the JSON request body. Values below are illustrative. The schema only gains optional fields; anything breaking becomes v2.
Example event
{
"schema": "needle.lead_event.v1",
"event": "lead.created",
"event_id": "9f2c…64 hex characters…e1",
"occurred_at": "2026-10-30T12:00:00.000Z",
"brand": { "id": "brand_123", "name": "Acme" },
"lead": {
"id": "t3_example",
"platform": "reddit",
"url": "https://www.reddit.com/r/agency/comments/example/",
"author": "example_user",
"title": "Which CRM do small agencies actually stick with?",
"excerpt": "We're a 6-person agency and our spreadsheet pipeline is falling apart…",
"posted_at": "2026-10-30T09:41:00.000Z",
"tier": "hot_lead",
"lead_score": 0.82,
"relevance": 0.71,
"intent_type": null,
"evidence": null,
"matched_term": "crm for agencies",
"competitor_mentions": ["HubSpot"],
"dashboard_url": "https://useneedle.net/dashboard/search/auto?brandId=brand_123"
}
}Fields
Nullable fields are null, not missing, when Needle has no value.
| Field | Type | What it holds |
|---|---|---|
| schema | string | Always "needle.lead_event.v1" for this version. |
| event | string | "lead.created" for a real lead, "test" when you click Test and enable. |
| event_id | string | 64-character hex SHA-256, stable for the same brand and post. Use it to dedupe. |
| occurred_at | string | ISO 8601 time the event was built. |
| brand.id, brand.name | string | The Needle brand that found the lead. |
| lead.id | string | null | The post id on its platform, when known. |
| lead.platform | string | Community the post is from, for example "reddit" or "hackernews". |
| lead.url | string | Link to the post or thread. |
| lead.author | string | null | Username on that platform. |
| lead.title | string | Post title, or its first line (up to 140 characters). |
| lead.excerpt | string | First ~500 characters of the post text. |
| lead.posted_at | string | null | ISO 8601 time the post was published. |
| lead.tier | string | "hot_lead" or "worth_engaging". |
| lead.lead_score | number | null | Buying-intent score from 0 to 1, when scored. |
| lead.relevance | number | null | How closely the post matches your brand, 0 to 1. |
| lead.intent_type | string | null | Kind of intent, when available. Null for now on most leads. |
| lead.evidence | string | null | The sentence that shows the intent, when available. |
| lead.matched_term | string | null | The search phrase that matched, when known. |
| lead.competitor_mentions | string[] | Competitors named in the post (can be empty). |
| lead.dashboard_url | string | Opens the brand’s Auto Search results in Needle (with UTM tags). |
Request headers
Return any 2xx status quickly; do slow work after responding.
| Header | Value |
|---|---|
| Content-Type | application/json |
| X-Needle-Event-Id | Same value as event_id in the body. |
| X-Needle-Signature | t=<unix seconds>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")> |
Verify the signature
Use the whole signing secret, including the whsec_ prefix, as the HMAC key. Recompute HMAC-SHA256 over "<t>.<raw body>" using the bytes you received (not re-serialized JSON), compare in constant time, and reject timestamps more than 5 minutes old.
Node.js (Express)
import crypto from 'node:crypto';
import express from 'express';
const app = express();
const SECRET = process.env.NEEDLE_SIGNING_SECRET; // whsec_..., the whole value
// express.raw keeps the exact bytes Needle signed. Do not JSON-parse first.
app.post(
'/needle-webhook',
express.raw({ type: 'application/json' }),
(req, res) => {
const header = req.get('X-Needle-Signature') || '';
const parts = Object.fromEntries(
header.split(',').map(kv => {
const i = kv.indexOf('=');
return [kv.slice(0, i).trim(), kv.slice(i + 1).trim()];
})
);
const t = Number(parts.t);
const raw = req.body.toString('utf8');
const expected = crypto
.createHmac('sha256', SECRET)
.update(`${t}.${raw}`)
.digest('hex');
const fresh =
Number.isInteger(t) && Math.abs(Date.now() / 1000 - t) <= 5 * 60;
const given = Buffer.from(parts.v1 || '');
const valid =
given.length === expected.length &&
crypto.timingSafeEqual(given, Buffer.from(expected));
if (!fresh || !valid) return res.status(400).send('invalid signature');
const event = JSON.parse(raw);
if (event.event === 'test') return res.sendStatus(200);
// Dedupe on event.event_id, then store or route event.lead.
return res.sendStatus(200);
}
);Python (Flask)
import hashlib
import hmac
import json
import os
import time
from flask import Flask, abort, request
app = Flask(__name__)
SECRET = os.environ["NEEDLE_SIGNING_SECRET"].encode() # whsec_..., the whole value
@app.post("/needle-webhook")
def needle_webhook():
raw = request.get_data() # exact bytes Needle signed; parse only after verifying
header = request.headers.get("X-Needle-Signature", "")
parts = dict(kv.split("=", 1) for kv in header.split(",") if "=" in kv)
try:
t = int(parts["t"])
except (KeyError, ValueError):
abort(400)
if abs(time.time() - t) > 5 * 60:
abort(400)
expected = hmac.new(SECRET, f"{t}.".encode() + raw, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, parts.get("v1", "")):
abort(400)
event = json.loads(raw)
if event["event"] == "test":
return "", 200
# Dedupe on event["event_id"], then store or route event["lead"].
return "", 200When a custom webhook is the wrong choice
You want alerts in team chat
Slack, Discord, Google Chat, and Teams are native destinations with digests and hot-lead alerts. No endpoint to run.
You only need a lead log
Google Sheets (with our Apps Script), Notion, or Airtable keep a running list without any code on your side.
You want an email for every lead
Community posts carry usernames, not emails, and the payload does not include one. For outbound, route leads through Clay to enrich them first.
Frequently asked questions
Setup, limits, and every platform are covered in the docs.
What does the payload look like?
How do I know a request came from Needle?
I lost the signing secret. What now?
Does the endpoint have to use HTTPS?
What happens if my endpoint is down?
How often is it called?
Does it work with Zapier?
Does Needle reply or post for me?
Connect Needle to Webhooks today
Send ranked buyer threads to Webhooks on your Auto Search schedule, so the conversations worth replying to land where your team already works.
Cancel anytime