Skip to content
LocalICPDocs
ProductDataPricingDevelopers
Sign inStart free
Guides
OverviewErrors and limits
Endpoints
Campaigns6Results and leads5Bulk runs6Account6
Integrations
MCP serverWebhooks

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"
}
FieldWhat it holds
event_idThe event's ID, the same on every retry and redelivery. Deduplicate on it.
eventThe event name, such as campaign.completed.
subject_typecampaign, bulk or enrichment.
subject_idThe ID of the run the event is about.
campaign_idOn campaign events only, the same as subject_id.
result_countHow many results the run delivered, even when results is cut short.
truncatedtrue when results holds only the first 500. Fetch the rest from the export endpoint.
resultsThe delivered records, at most 500. null on a failed event.
errorOn a failed event only: what went wrong.
timestampWhen 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.

HeaderWhat it carries
X-LocalICP-Signature-V1t=<unix>,v1=<hex>: the HMAC-SHA256 of the timestamp, a dot and the raw body.
X-LocalICP-SignatureThe HMAC-SHA256 of the raw body alone, kept for receivers written against it.
X-LocalICP-TimestampWhen the delivery was signed, in Unix seconds.
X-LocalICP-Event-IdThe event's ID, as in the body.
X-LocalICP-Delivery-IdThis delivery's ID.
X-LocalICP-Delivery-AttemptWhich 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. 1 · at once
  2. 2 · +1m
  3. 3 · +5m
  4. 4 · +30m
  5. 5 · +2h
  6. 6 · +6h
  7. 7 · +12h
  8. 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.

© 2026 LocalICPDevelopersOpenAPIPrivacyTerms