PostHog
Integrate your application with the PostHog API
🚀 Quickstart
Connect to PostHog with Tenklo and see data flow in 2 minutes.
In Tenklo (free signup), go to Integrations -> Configure New Integration -> PostHog.
Go to Connections -> Add Test Connection -> Authorize, then enter your Subdomain (e.g. us or eu.i) and API Key. Later, you'll let your users do the same directly from your app.
Let's make your first request to the PostHog API (get current user). Replace the placeholders below with your Environment API key, integration ID, and connection ID:
curl "https://api.tenklo.dev/proxy/api/users/@me" \
-H "Authorization: Bearer <NANGO-API-KEY>" \
-H "Provider-Config-Key: <INTEGRATION-ID>" \
-H "Connection-Id: <CONNECTION-ID>"Or fetch credentials dynamically via the Node SDK or API.
✅ You're connected! Check the Logs tab in Tenklo to inspect requests.
Follow our Auth implementation guide to integrate Tenklo in your app.
To obtain your own production credentials (subdomain and API key), follow the connect guide linked below.
📚 PostHog Integration Guides
Nango-maintained guides for common use cases.
- How do I link my PostHog account?
Connect your PostHog account using the Connect UI (subdomain and API key)
Subdomain: Use the part of your PostHog URL after https:// and before .posthog.com (e.g. us, eu.i for US/EU Cloud). PostHog enforces different rate limits per resource.
Only need to send events, not read data? Use the PostHog (Capture API) integration instead — it authenticates with a public Project Token instead of a personal API key, and doesn't require a logged-in PostHog user (events still need a distinct_id).
Official docs: PostHog API documentation
🧩 Pre-built syncs & actions for PostHog
Explore Nango-provided actions in your dashboard. Extend and customize them to fit your needs.
Others
| Function name | Description | Type | Source code |
|---|---|---|---|
capture-event | Capture a PostHog event. | Action | 🔗 Github |
create-action | Create an action (saved event pattern) in PostHog. | Action | 🔗 Github |
create-alert | Create an alert on an insight in PostHog. | Action | 🔗 Github |
create-annotation | Create an annotation in PostHog. | Action | 🔗 Github |
create-cohort | Create a cohort in PostHog. | Action | 🔗 Github |
create-dashboard | Create a dashboard in PostHog. | Action | 🔗 Github |
create-early-access-feature | Create an early access feature in PostHog. | Action | 🔗 Github |
create-experiment | Create an A/B experiment in PostHog. | Action | 🔗 Github |
create-feature-flag | Create a feature flag in PostHog. | Action | 🔗 Github |
create-insight | Create a insight in PostHog. | Action | 🔗 Github |
create-person | Create a person in PostHog. | Action | 🔗 Github |
create-survey | Create a survey in PostHog. | Action | 🔗 Github |
delete-action | Delete an action in PostHog. | Action | 🔗 Github |
delete-alert | Delete an alert in PostHog. | Action | 🔗 Github |
delete-annotation | Delete or archive an annotation in PostHog by setting it as deleted. | Action | 🔗 Github |
delete-cohort | Delete or archive a cohort in PostHog. | Action | 🔗 Github |
delete-dashboard | Delete or archive a dashboard in PostHog. | Action | 🔗 Github |
delete-early-access-feature | Delete an early access feature in PostHog. | Action | 🔗 Github |
delete-feature-flag | Delete or archive a feature flag in PostHog | Action | 🔗 Github |
delete-insight | Delete or archive an insight in PostHog. | Action | 🔗 Github |
delete-person | Delete or archive a person in PostHog. | Action | 🔗 Github |
delete-survey | Delete a survey in PostHog. | Action | 🔗 Github |
get-action | Retrieve a single action from PostHog. | Action | 🔗 Github |
get-alert | Retrieve a single alert from PostHog. | Action | 🔗 Github |
get-annotation | Retrieve a single annotation from PostHog. | Action | 🔗 Github |
get-cohort | Retrieve a single cohort from PostHog. | Action | 🔗 Github |
get-dashboard | Retrieve a single dashboard from PostHog. | Action | 🔗 Github |
get-early-access-feature | Retrieve a single early access feature from PostHog. | Action | 🔗 Github |
get-event-definition | Retrieve a single event definition from PostHog. | Action | 🔗 Github |
get-event | Retrieve a single event from PostHog. | Action | 🔗 Github |
get-experiment | Retrieve a single experiment from PostHog. | Action | 🔗 Github |
get-feature-flag | Retrieve a single feature flag from PostHog. | Action | 🔗 Github |
get-insight | Retrieve a single insight from PostHog. | Action | 🔗 Github |
get-person | Retrieve a single person from PostHog. | Action | 🔗 Github |
get-project | Retrieve a single project from PostHog. | Action | 🔗 Github |
get-property-definition | Retrieve a single property definition from PostHog. | Action | 🔗 Github |
get-survey | Retrieve a single survey from PostHog. | Action | 🔗 Github |
identify-person | Identify or update a PostHog person. | Action | 🔗 Github |
list-actions | List actions (saved event patterns) from PostHog. | Action | 🔗 Github |
list-alerts | List alerts from PostHog. | Action | 🔗 Github |
list-annotations | List annotations from PostHog. | Action | 🔗 Github |
list-cohorts | List cohorts from PostHog. | Action | 🔗 Github |
list-dashboards | List dashboards from PostHog. | Action | 🔗 Github |
list-early-access-features | List early access features from PostHog. | Action | 🔗 Github |
list-event-definitions | List event definitions (auto-detected event schemas) from PostHog. | Action | 🔗 Github |
list-events | List events from PostHog. | Action | 🔗 Github |
list-experiments | List experiments from PostHog. | Action | 🔗 Github |
list-feature-flags | List feature flags from PostHog. | Action | 🔗 Github |
list-insights | List insights from PostHog. | Action | 🔗 Github |
list-persons | List persons from PostHog. | Action | 🔗 Github |
list-projects | List projects from PostHog | Action | 🔗 Github |
list-property-definitions | List property definitions from PostHog. | Action | 🔗 Github |
list-session-recordings | List session recordings from PostHog. | Action | 🔗 Github |
list-surveys | List surveys from PostHog. | Action | 🔗 Github |
update-action | Update an action in PostHog. | Action | 🔗 Github |
update-alert | Update an alert in PostHog. | Action | 🔗 Github |
update-annotation | Update an annotation in PostHog | Action | 🔗 Github |
update-cohort | Update a cohort in PostHog. | Action | 🔗 Github |
update-dashboard | Update a dashboard in PostHog | Action | 🔗 Github |
update-early-access-feature | Update an early access feature in PostHog. | Action | 🔗 Github |
update-experiment | Update an experiment in PostHog | Action | 🔗 Github |
update-feature-flag | Update a feature flag in PostHog. | Action | 🔗 Github |
update-insight | Update a insight in PostHog. | Action | 🔗 Github |
update-person | Update a person in PostHog. | Action | 🔗 Github |
update-property-definition | Update a property definition in PostHog. | Action | 🔗 Github |
update-survey | Update a survey in PostHog. | Action | 🔗 Github |
actions | Sync actions (saved event patterns) from PostHog. | Sync | 🔗 Github |
annotations | Sync annotations from PostHog | Sync | 🔗 Github |
cohorts | Sync cohorts from PostHog. | Sync | 🔗 Github |
dashboards | Sync dashboards from PostHog. | Sync | 🔗 Github |
early-access-features | Sync early access features from PostHog. | Sync | 🔗 Github |
event-definitions | Sync event definitions (auto-detected event schemas) from PostHog. | Sync | 🔗 Github |
events | Sync events from PostHog. | Sync | 🔗 Github |
experiments | Sync experiments from PostHog. | Sync | 🔗 Github |
feature-flags | Sync feature flags from PostHog. | Sync | 🔗 Github |
insights | Sync insights from PostHog | Sync | 🔗 Github |
persons | Sync persons from PostHog | Sync | 🔗 Github |
projects | Sync projects from PostHog. | Sync | 🔗 Github |
session-recordings | Sync session recording metadata from PostHog | Sync | 🔗 Github |
surveys | Sync surveys from PostHog. | Sync | 🔗 Github |