What are webhooks?
Webhooks (sometimes called callbacks) let you build a custom, real-time integration between Userpilot and your own systems. Instead of your tools polling Userpilot for updates, Userpilot sends an HTTP POST request to an endpoint you control the moment an event happens — a flow gets completed, an NPS score comes in, someone unsubscribes from an email. Each request carries a JSON payload describing what happened and, where relevant, who it happened to. Because delivery is immediate, webhooks are the right tool when another system needs to react to in-app behavior as it happens, not after a batch export. If you need historical or bulk event data instead, see Data Sync or the native HubSpot and Salesforce integrations.When to use webhooks
Reach for a webhook whenever another system needs to know about something the moment it happens in Userpilot:- Fire a scenario in an automation platform like Zapier or Workato when a user takes a specific in-app action
- Kick off an email campaign the moment a user submits a particular NPS score
- Stream flow, checklist, or survey engagement into your analytics tools for real-time analysis
- Notify your own backend when an event occurs so you can update state on your side
- Push real-time activity into a CRM such as HubSpot
- Post a notification to a Slack channel when a user takes an action in Userpilot
- Sync email unsubscribes and re-subscribes out of Userpilot and into your own email or CRM tools
Webhooks are available on Growth and Enterprise plans. To learn more about upgrading, reach out to support@userpilot.com.
Before you start
- Plan: your account needs to be on Growth or Enterprise.
- An endpoint: a URL that can accept an HTTP POST request with a JSON body — typically an endpoint on your own backend, or a tool like Zapier or Workato. webhook.site is a convenient way to inspect payloads while you’re building.
- A plan for what to send: decide which event types you need, and whether you want all items of that type (all flows, all checklists, etc.) or only specific ones — you’ll scope this per event type when you set up the webhook.
Supported events
A single webhook can be configured to fire on one or more of the following event types. Most can be scoped to specific items and filtered to specific statuses, so you only receive the events you actually need.Feature Tags (Legacy) is the original feature-tagging system. Going forward, Userpilot captures that kind of interaction data through Tracked Events, Labeled Events, and Tagged Pages instead — the Legacy option remains for webhooks that already depend on it.
Create a webhook
Webhooks live under Settings → Integrations → Webhooks.1
Start a new webhook
From the Webhooks tab, click Create Webhook. In the dialog, give it a descriptive Name and the Endpoint URL you want events sent to, then click Create.
2
Fill in the details
Creating the webhook opens the Configure webhook panel on the Details step, with your name and endpoint already filled in. From here you can also set:
- Secret Auth-Token — a token Userpilot includes with every request so your endpoint can confirm it really came from Userpilot. Strongly recommended; see Verify webhook signatures below.
- Webhook Description — shown next to this webhook in your webhooks list, useful once you have more than one.
- Send staging data only — toggle this on while you’re testing so only staging-environment events are sent, keeping production data out of your endpoint until you’re ready. The payload’s
environmentfield reflects whichever mode is active.
3
Choose what to send
On the Data setup step:
- Under User Properties and Company Properties, click Add to include user or company properties in every payload — up to 30 properties in total (shown as
Properties: x / 30). - For each event type you want to trigger the webhook, turn its toggle on, then use the Select [event type] dropdown to scope it to specific items, or leave it on All … Selected. Where a has been dropdown is available, choose which statuses should trigger the webhook — for example, only
Completedfor Flows rather than everySeen. - For Emails, choose which statuses (Unsubscribed, Re-subscribed) and which source(s) — Manual, CSV import, API, Preference center, One-click unsubscribe — should trigger the webhook.
4
Test and save
Click Send Test on either step to send a sample payload to your endpoint using your current configuration, so you can confirm your integration handles it correctly. When you’re happy with the setup, click Save.
Manage existing webhooks
The Webhooks tab lists every webhook you’ve created, with its Name, Description (shown as “Description Not Available” if you left it blank), and Status.- Enable or disable a webhook with the Status toggle in its row — a saved webhook sends nothing while its status is off.
- Use the ⋮ menu on a row for other actions on that webhook.
- Click a webhook’s name to reopen the Configure webhook panel and adjust its details or data setup at any time.
Test webhook events
You don’t need to enable a webhook to try it. Send Test is available on both the Details and Data setup steps, and sends a sample event to your endpoint using whatever configuration you’ve entered so far — a fast way to validate your endpoint before the webhook goes live.Test sends don’t change real data. For example, a test send for the Emails event never actually unsubscribes anyone.
Verify webhook signatures
To ensure the security and integrity of the events Userpilot sends to your webhook, every request includes a signature in theX-Signature header. Verifying this signature confirms the event was sent by Userpilot and hasn’t been tampered with in transit.
Structure of the X-Signature header
The X-Signature header consists of two components: t={{TIMESTAMP}},v1={{SIGNATURE}}.
- t: timestamp of the request.
- v1: signature derived from the request payload and your secret token.
How to verify the signature
To verify the signature (v1 value) of an incoming webhook event:
- Parse the request body: extract and stringify the JSON payload of the incoming request.
- Retrieve the timestamp: extract the timestamp value (
t) from theX-Signatureheader. As a fallback, the timestamp is also included in the request body. - Construct the signature base string: concatenate the stringified request body and the timestamp with a period (
.) in between:signature_base_string = stringified_request_body + "." + timestamp - Compute the HMAC SHA-256 signature: using your secret token, compute the HMAC SHA-256 hash of the signature base string.
- Compare signatures: the computed hash should match the
v1value in theX-Signatureheader. If they match, the event is verified.
Example in Node.js
Webhook payload
Webhooks are sent to your endpoint as HTTP POST requests with a JSON-formatted body. Every payload is made up of:- The event response — details about the event that fired, under
data. - Generic metadata — sent with every payload, such as
type,timestamp, andapp_token. - Additional user & company properties — the
userandcompanyobjects, containing whichever properties you selected in Data setup.
Send data only to third-party systems you trust — webhook payloads can contain personally identifiable information (PII).
Flows
Checklists
Surveys
NPS
Feature Tags (Legacy)
Forms
Tracked Events
The example below shows the payload for a tracked event fired through a flow button’s action settings:type, timestamp, app_token, and a data object identifying the event, the page it happened on, and the user and company it’s attached to.
Labeled Events, Tagged Pages, Mobile content, and Workflows
These event types follow the same envelope shape as the events above — a top-leveltype, timestamp, and app_token, and a data object with the event’s type, action, id, and (where applicable) the user and company objects you configured in Data setup. If you need the exact schema for one of these while you build your integration, reach out to support@userpilot.com.
Emails
data.idis the subscription type ID, or-1when the change applies to every email. Someone who unsubscribes from two subscription types produces two events.data.sourceis one ofpreference_centre,one_click,api,import, ormanual, and is what the from source filter in Data setup selects on.data.user.user_idcan benull. Unsubscribes are tracked by email address, so an imported address that belongs to no Userpilot user still produces an event.- User and company properties aren’t included, since there may be no user behind the address.
emailis always present. environmentreflects whether Send staging data only was on when the event was sent.
Limitations
- Webhooks are available on Growth and Enterprise plans only.
- A webhook can include up to 30 user and company properties combined.
- Only events that happen after the webhook is saved and enabled are sent — there’s no way to backfill or replay historical events through a webhook. For historical or bulk data, use Data Sync instead.
- An event only fires if its category is toggled on in Data setup, and only for the specific items and statuses you’ve selected.
- Email events never include user or company properties, since an unsubscribe can be recorded against an email address with no associated Userpilot user.
- Test sends don’t write real data — they won’t unsubscribe a user, mark a flow completed, or otherwise change anything in your account.
For any questions or concerns, please reach out to support@userpilot.com