Skip to main content

🚀 Quickstart

Connect to PostHog with Nango and see data flow in 2 minutes.
1

Create an integration

In Nango (free signup), go to Integrations -> Configure New Integration -> PostHog.
2

Authorize 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.
3

Call the PostHog API

Let’s make your first request to the PostHog API (get current user). Replace the placeholders below with your secret key, integration ID, and connection ID:
curl "https://api.nango.dev/proxy/api/users/@me" \
  -H "Authorization: Bearer <NANGO-SECRET-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 Nango to inspect requests.
4

Implement Nango in your app

Follow our Auth implementation guide to integrate Nango 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.
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.
Official docs: PostHog API documentation

🧩 Pre-built syncs & actions for PostHog

Enable them in your dashboard. Extend and customize to fit your needs.

Actions

Function nameDescriptionTypeSource code
create-actionCreate an action (saved event pattern) in PostHog.Action🔗 Github
delete-actionDelete an action in PostHog.Action🔗 Github
get-actionRetrieve a single action from PostHog.Action🔗 Github
list-actionsList actions (saved event patterns) from PostHog.Action🔗 Github
update-actionUpdate an action in PostHog.Action🔗 Github

Alerts

Function nameDescriptionTypeSource code
create-alertCreate an alert on an insight in PostHog.Action🔗 Github
delete-alertDelete an alert in PostHog.Action🔗 Github
get-alertRetrieve a single alert from PostHog.Action🔗 Github
list-alertsList alerts from PostHog.Action🔗 Github
update-alertUpdate an alert in PostHog.Action🔗 Github

Annotations

Function nameDescriptionTypeSource code
create-annotationCreate an annotation in PostHog.Action🔗 Github
delete-annotationDelete or archive an annotation in PostHog by setting it as deleted.Action🔗 Github
get-annotationRetrieve a single annotation from PostHog.Action🔗 Github
list-annotationsList annotations from PostHog.Action🔗 Github
update-annotationUpdate an annotation in PostHogAction🔗 Github

Cohorts

Function nameDescriptionTypeSource code
create-cohortCreate a cohort in PostHog.Action🔗 Github
delete-cohortDelete or archive a cohort in PostHog.Action🔗 Github
get-cohortRetrieve a single cohort from PostHog.Action🔗 Github
update-cohortUpdate a cohort in PostHog.Action🔗 Github

Dashboards

Function nameDescriptionTypeSource code
create-dashboardCreate a dashboard in PostHog.Action🔗 Github
delete-dashboardDelete or archive a dashboard in PostHog.Action🔗 Github
get-dashboardRetrieve a single dashboard from PostHog.Action🔗 Github
list-dashboardsList dashboards from PostHog.Action🔗 Github
update-dashboardUpdate a dashboard in PostHogAction🔗 Github

Early Access Features

Function nameDescriptionTypeSource code
create-early-access-featureCreate an early access feature in PostHog.Action🔗 Github
delete-early-access-featureDelete an early access feature in PostHog.Action🔗 Github
get-early-access-featureRetrieve a single early access feature from PostHog.Action🔗 Github
list-early-access-featuresList early access features from PostHog.Action🔗 Github
update-early-access-featureUpdate an early access feature in PostHog.Action🔗 Github

Event Definitions

Function nameDescriptionTypeSource code
get-event-definitionRetrieve a single event definition from PostHog.Action🔗 Github
list-event-definitionsList event definitions (auto-detected event schemas) from PostHog.Action🔗 Github

Events

Function nameDescriptionTypeSource code
capture-eventCapture a PostHog event.Action🔗 Github
get-eventRetrieve a single event from PostHog.Action🔗 Github
list-eventsList events from PostHog.Action🔗 Github

Experiments

Function nameDescriptionTypeSource code
create-experimentCreate an A/B experiment in PostHog.Action🔗 Github
list-experimentsList experiments from PostHog.Action🔗 Github
update-experimentUpdate an experiment in PostHogAction🔗 Github

Feature Flags

Function nameDescriptionTypeSource code
create-feature-flagCreate a feature flag in PostHog.Action🔗 Github
delete-feature-flagDelete or archive a feature flag in PostHogAction🔗 Github
get-feature-flagRetrieve a single feature flag from PostHog.Action🔗 Github
list-feature-flagsList feature flags from PostHog.Action🔗 Github
update-feature-flagUpdate a feature flag in PostHog.Action🔗 Github

Insights

Function nameDescriptionTypeSource code
create-insightCreate a insight in PostHog.Action🔗 Github
delete-insightDelete or archive an insight in PostHog.Action🔗 Github
get-insightRetrieve a single insight from PostHog.Action🔗 Github
list-insightsList insights from PostHog.Action🔗 Github
update-insightUpdate a insight in PostHog.Action🔗 Github

Persons

Function nameDescriptionTypeSource code
create-personCreate a person in PostHog.Action🔗 Github
delete-personDelete or archive a person in PostHog.Action🔗 Github
get-personRetrieve a single person from PostHog.Action🔗 Github
identify-personIdentify or update a PostHog person.Action🔗 Github
list-personsList persons from PostHog.Action🔗 Github
update-personUpdate a person in PostHog.Action🔗 Github

Projects

Function nameDescriptionTypeSource code
get-projectRetrieve a single project from PostHog.Action🔗 Github
list-projectsList projects from PostHogAction🔗 Github

Property Definitions

Function nameDescriptionTypeSource code
get-property-definitionRetrieve a single property definition from PostHog.Action🔗 Github
list-property-definitionsList property definitions from PostHog.Action🔗 Github
update-property-definitionUpdate a property definition in PostHog.Action🔗 Github

Session Recordings

Function nameDescriptionTypeSource code
list-session-recordingsList session recordings from PostHog.Action🔗 Github

Surveys

Function nameDescriptionTypeSource code
create-surveyCreate a survey in PostHog.Action🔗 Github
delete-surveyDelete a survey in PostHog.Action🔗 Github
list-surveysList surveys from PostHog.Action🔗 Github
update-surveyUpdate a survey in PostHog.Action🔗 Github

Others

Function nameDescriptionTypeSource code
get-experimentRetrieve a single experiment from PostHog.Action🔗 Github
get-surveyRetrieve a single survey from PostHog.Action🔗 Github
list-cohortsList cohorts from PostHog.Action🔗 Github
actionsSync actions (saved event patterns) from PostHog.Sync🔗 Github
annotationsSync annotations from PostHogSync🔗 Github
cohortsSync cohorts from PostHog.Sync🔗 Github
dashboardsSync dashboards from PostHog.Sync🔗 Github
early-access-featuresSync early access features from PostHog.Sync🔗 Github
event-definitionsSync event definitions (auto-detected event schemas) from PostHog.Sync🔗 Github
eventsSync events from PostHog.Sync🔗 Github
experimentsSync experiments from PostHog.Sync🔗 Github
feature-flagsSync feature flags from PostHog.Sync🔗 Github
insightsSync insights from PostHogSync🔗 Github
personsSync persons from PostHogSync🔗 Github
projectsSync projects from PostHog.Sync🔗 Github
session-recordingsSync session recording metadata from PostHogSync🔗 Github
surveysSync surveys from PostHog.Sync🔗 Github