HTTP Incoming Webhook

HTTP Incoming Webhook

Capture an event via a custom incoming webhook

Configuration

OptionDescription
Event name
Type: string
Required: True
Distinct ID
Type: string
Required: True

The distinct ID this event should be associated with

Event properties
Type: json
Required: False

A mapping of the incoming webhook body to the PostHog event properties

Authorization header value
Type: string
Required: False

If set, the incoming Authorization header must match this value exactly. e.g. "Bearer SECRET_TOKEN"

Method
Type: choice
Required: False

HTTP method to allow for the request.

Log payloads
Type: boolean
Required: False

Logs the incoming request for debugging

Using our REST API you can create this source_webhook like so:

Terminal
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
"type": "source_webhook",
"name": "HTTP Incoming Webhook",
"inputs": {
"event": {
"value": ""
},
"distinct_id": {
"value": ""
}
},
"enabled": true,
"template_id": "template-source-webhook"
}'

Community questions

Questions about this page? or post a community question.