Skip to main content
A trigger normally offers its interview to every visitor who reaches the moment it fires on. With the PostHog webhook, an event from your backend or your PostHog pipeline first arms the trigger for one user, and only an armed user is offered it. The offer itself still fires from the page’s own PostHog event, as event triggers do, so it lands at the moment and not seconds later when the webhook arrives. An arm is used up by the first offer, lives for the days you set, and can be taken back by a disarming event. Arms are keyed by PostHog distinct id, so the page must have posthog-js loaded and must identify the user with the same distinct id your server events use.

Get the URL

In the dashboard, open Settings › Integrations and press Connect on the PostHog card. The sheet shows your full webhook URL once: copy it before you close the sheet. The URL is the only credential; PostHog sends no header for it.

Create the destination in PostHog

In PostHog, go to Data pipelines › New destination › HTTP Webhook and set: PostHog bills every event a destination sends, so keep the filters to the events your triggers arm and disarm on. One destination per event, each with its own filters, keeps the volume lowest.

Set the trigger

On the campaign’s Triggers tab, open the trigger and turn on Only for armed users:
  • Arming event — the event, with any property filters, that arms the user for the trigger.
  • Disarming event — optional; an event that takes the arm back, with its own filters.
  • Days — how long an arm lives, 1 to 30. An arm not used within that time expires.
A trigger with this on is never offered to a user who has no live arm, and never to the same user twice.

Worked example

A product sends two kinds of email and wants an interview only from the users who got one, at the moment the email was about, plus a first-lesson interview from new sign-ups in one country who have not finished a lesson in the app yet. Each row is one HTTP Webhook destination in PostHog, all with the same URL. The web page captures plan_ready and lesson_completed through posthog-js under the user’s id, so the offer fires there; the server captures campaign_sent and user created under the same id, so the webhook arms the right user.

Regenerate the URL

Open Settings › Integrations › Manage and press Regenerate URL. The current URL stops working at once, so update every destination’s URL in PostHog with the new one straight away. Events PostHog sends to the old URL in the meantime are refused with 404.