Webhooks
When a signal fires, Datamagnet sends an HTTPPOST request to the webhook_url you configured when creating the signal.
Registering a webhook
Pass awebhook_url when calling /signal/create or update it later via /signal/update.
Example
Payload format by signal type
Every delivery is one JSON object with a top-levelevent field:
job_change · new_post · person_activity
The first run for each profile records a baseline and sends abaseline event listing the profiles now tracked. After that, each run that finds changes sends one delivery with every change in changes.
job_id and job_name are the signal’s signal_id and name, so you can tell apart several signals of one type. A profile tracked by two signals appears in a delivery from each.
baseline
job_change
new_post
person_activity, changes holds one entry per reaction, comment, or reply. See the Person Activity guide for its payload.
Engagement signals
All four engagement signal types —keyword_engagement, industry_engagement, company_engagement, and person_engagement — share the same webhook payload structure. The only difference is the signal_type value and the meaning of signal_keyword.
A lead is one person per signal. The first time a signal finds someone, they arrive as a lead with "event": "new_lead". If they later engage with a post they had not engaged with before (for example, they comment on a second lead-magnet post of a profile you track), that engagement is added to the lead you already have. It is sent again as an entry with "event": "re_engagement" only if the signal has notify_re_engagements turned on. Either way, it shows in /signal/leads through the lead’s updated_at and engagements.
A run that finds more than 200 entries sends them in several deliveries of up to 200 each. They share one run_id, and batch says which part of the run each one is.
keyword_engagement example
company_engagement example
industry_engagement example
person_engagement example
person_engagement re_engagement example
Repeat engagements
Setnotify_re_engagements to true when you create an engagement signal, or later with the update_re_engagements action. Each run then also sends the leads you already have that engaged with something new:
- a comment or reaction on a post they had not engaged with before, or
- a comment on a post they had only reacted to.
"event": "re_engagement". Its lead_id is the same as the lead’s first delivery and its id in /signal/leads. first_detected_at is when the lead was first found. A re-engagement does not count toward after_dedup, after_icp, or the flame_* counts. It is counted in re_engagements.
It is off by default, so a receiver that treats every entry as a new person is not sent the same person twice. With it off, the new engagement is still recorded on the lead. To pick those up yourself, poll /signal/leads with updated_from (see Only what changed).
Engagement signal payload fields
Missed a delivery, or want the history? /signal/leads returns your stored leads with these same fields, on request.Top level
One of
"keyword_engagement" · "company_engagement" · "industry_engagement" · "person_engagement".Aggregated counts for this run. The group count key varies by signal type:
All types include
total_raw, after_dedup, after_icp, flame_1, flame_2, flame_3, and:One ID per run. A run with more than 200 entries is split into several deliveries, all with this
run_id.Per-lead fields
"new_lead" for a person this signal has not found before. "re_engagement" for a lead you already have that engaged with something new; only sent when notify_re_engagements is on.The lead’s ID, the same as its
id in /signal/leads. A re-engagement carries the ID of the lead it belongs to.The search term or group label that surfaced this lead.
- keyword_engagement — the keyword that matched (e.g.
"sales intelligence") - company_engagement — the company label (e.g.
"Salesforce") - industry_engagement — the industry label (e.g.
"Financial Services") - person_engagement — the monitored person’s label (e.g.
"John Doe")
How the person engaged with the post. Either
"like" (or a specific reaction type such as "celebrate", "support") or "comment".Deep link to the specific engagement. For comments, this links directly to the comment. For likes, same as
engagement_post_url.The text of the comment left by the engager.
null for likes and reactions — only populated when engagement_type is "comment".First 300 characters of the post the engager interacted with. Gives context about the content that triggered the signal.
null if the post text could not be retrieved.Full name of the person or page who authored the post.
null if the author could not be retrieved.ICP fit score between 0.0 and 1.0. Reflects how well the lead matches the configured ICP filters.
Intent signal score between 0.0 and 1.0. Based on engagement type (comment = 1.0, like = 0.7), post recency (decays over 14 days), and keyword specificity.
ISO 8601 timestamp of when this engagement was found: when the lead was scored, for a
new_lead.Every engagement this entry is about, each with
post_url, engagement_type, engagement_link, comment_text, post_excerpt, post_author, and signal_keyword. Usually one. A person who engaged with several posts in the same run has them all here. The top-level engagement fields are then the first of them for a new_lead, and the latest for a re_engagement.job_change · new_post · person_activity payload fields
Top level
Per-change fields
Details of the change.When the change could not be analysed in detail,
change_data also has "_llm_fallback": true and a shorter, generic summary. The change itself is real.Verifying webhook signatures
If you set awebhook_secret, every request includes an X-Datamagnet-Signature header: sha256= followed by the hex HMAC-SHA256 of the raw request body, signed with your secret. The same value is also sent as X-Signature-256.
Responding to webhooks
Your endpoint must return a2xx status within 10 seconds. If it times out or returns an error, Datamagnet retries the same payload:
A
400, 401, 403, or 404 response means the endpoint is misconfigured, so it is retried once and then dropped. Use event_id (profile signals) to ignore a change you already processed.
Acknowledge immediately and process asynchronously to avoid timeouts:
Python (Flask)