Send PostHog event data using webhooks

With webhook destinations, you can send event data from PostHog to any HTTP endpoint, whether it's to your own backend, an internal system, or a third-party platform.

Want to send PostHog data to a particular platform like Slack?

Browse all the Destinations listed in the sidenav to integrate with well-known platforms like Slack, HubSpot, or Zapier.

Want to bring your data into PostHog?

Check out Sources to learn how to connect your systems like CRM, payment processor, or database with PostHog data for all-in-one analytics.

Setting up destination webhooks

1. Create a new destination

In PostHog, navigate to the data pipelines section in the sidebar. Click + New > Destination in the top-right corner. Search for "Webhook" then click + Create.

Create new destination

2. Configure the webhook

On the configuration page, enter a Webhook URL. This is the HTTP endpoint that will receive the event data from PostHog. By default, PostHog sends a POST request with a templated JSON body.

Click Create & Enable.

Configure webhook
Webhook services

You can use services like webhook.site or ngrok to create Webhook URLs for quick testing.

3. Test the webhook

Now that the webhook is enabled, let's see it in action. In the Testing section of the configuration page, click Start testing > Test function to send an example event.

You should see the webhook endpoint receive a POST request with event data.

Debugging

Try enabling Log responses to help debug HTTP calls.

4. Customize the webhook (optional)

You can further configure and customize webhook destinations by:

Configuration

OptionDescription
Webhook URL
Type: string
Required: True

Endpoint URL to send event data to.

Method
Type: choice
Required: False

HTTP method to use for the request.

JSON Body
Type: json
Required: False

JSON payload to send in the request body.

Headers
Type: dictionary
Required: False

HTTP headers to send in the request.

Log responses
Type: boolean
Required: False

Logs the response of http calls for debugging.

FAQ

Is the source code for this destination available?

PostHog is open-source and so are all the destination on the platform. The source code is available on GitHub.

Who maintains this?

This is maintained by PostHog. If you have issues with it not functioning as intended, please let us know!

What if I have feedback on this destination?

We love feature requests and feedback. Please tell us what you think.

What if my question isn't answered above?

We love answering questions. Ask us anything via our community forum.

Community questions

Was this page useful?

Questions about this page? or post a community question.