Webhooks
LocalICP sends a signed POST to your endpoint when a campaign, bulk run or enrichment finishes or fails, so your own system can pick up the leads without polling.
Set up
Where
Add an endpoint and choose what it fires for in the app. Open Run notifications
Plans
Webhooks are part of the Growth and Agency plans.
Delivered
A 2xx answer within 10 seconds counts as delivered. Anything else is retried.
Events
Every event is <subject>.completed or <subject>.failed.
- campaign.completedA campaign finished. Carries its delivered leads.
- campaign.failedA campaign stopped on an error. Carries the error.
- bulk.completedA bulk run finished. Carries its delivered leads.
- bulk.failedA bulk run stopped on an error. Carries the error.
- enrichment.completedA lead enrichment finished. Carries the enriched rows.
Payload
One JSON body for every event.
campaign.completed
{
"event_id": "evt_…",
"event": "campaign.completed",
"subject_type": "campaign",
"subject_id": "…",
"campaign_id": "…",
"result_count": 23,
"truncated": false,
"results": [ … ],
"timestamp": "2026-10-16T14:02:11Z"
}| Field | What it holds |
|---|---|
| event_id | The event's ID, the same on every retry and redelivery. Deduplicate on it. |
| event | The event name, such as campaign.completed. |
| subject_type | campaign, bulk or enrichment. |
| subject_id | The ID of the run the event is about. |
| campaign_id | On campaign events only, the same as subject_id. |
| result_count | How many results the run delivered, even when results is cut short. |
| truncated | true when results holds only the first 500. Fetch the rest from the export endpoint. |
| results | The delivered records, at most 500. null on a failed event. |
| error | On a failed event only: what went wrong. |
| timestamp | When the event was created. |
Verify a delivery
Recompute the signature from the raw body with your webhook's signing secret before you trust a request, and reject one whose timestamp is too old.
| Header | What it carries |
|---|---|
| X-LocalICP-Signature-V1 | t=<unix>,v1=<hex>: the HMAC-SHA256 of the timestamp, a dot and the raw body. |
| X-LocalICP-Signature | The HMAC-SHA256 of the raw body alone, kept for receivers written against it. |
| X-LocalICP-Timestamp | When the delivery was signed, in Unix seconds. |
| X-LocalICP-Event-Id | The event's ID, as in the body. |
| X-LocalICP-Delivery-Id | This delivery's ID. |
| X-LocalICP-Delivery-Attempt | Which attempt this is, from 1. |
verify.go
// secret: the webhook's signing secret. header: X-LocalICP-Signature-V1, // "t=<unix>,v1=<hex>". body: the raw request body, before any parsing. mac := hmac.New(sha256.New, secret) mac.Write([]byte(t + ".")) mac.Write(body) expected := hex.EncodeToString(mac.Sum(nil)) valid := hmac.Equal([]byte(expected), []byte(v1))
Retries
Up to 8 attempts over about 45 hours, so a receiver that is down for a day still gets the event.
- 1 · at once
- 2 · +1m
- 3 · +5m
- 4 · +30m
- 5 · +2h
- 6 · +6h
- 7 · +12h
- 8 · +24h
The event ID stays the same across retries, so a receiver that saw one already can ignore the repeat. Delivery history is kept for 30 days.