PostHog

Integrate your application with the PostHog API

🚀 Quickstart

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

Create an integration

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

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.

Call the PostHog API

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.

Implement Tenklo in your app

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.

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 nameDescriptionTypeSource code
capture-eventCapture a PostHog event.Action🔗 Github
create-actionCreate an action (saved event pattern) in PostHog.Action🔗 Github
create-alertCreate an alert on an insight in PostHog.Action🔗 Github
create-annotationCreate an annotation in PostHog.Action🔗 Github
create-cohortCreate a cohort in PostHog.Action🔗 Github
create-dashboardCreate a dashboard in PostHog.Action🔗 Github
create-early-access-featureCreate an early access feature in PostHog.Action🔗 Github
create-experimentCreate an A/B experiment in PostHog.Action🔗 Github
create-feature-flagCreate a feature flag in PostHog.Action🔗 Github
create-insightCreate a insight in PostHog.Action🔗 Github
create-personCreate a person in PostHog.Action🔗 Github
create-surveyCreate a survey in PostHog.Action🔗 Github
delete-actionDelete an action in PostHog.Action🔗 Github
delete-alertDelete an alert in PostHog.Action🔗 Github
delete-annotationDelete or archive an annotation in PostHog by setting it as deleted.Action🔗 Github
delete-cohortDelete or archive a cohort in PostHog.Action🔗 Github
delete-dashboardDelete or archive a dashboard in PostHog.Action🔗 Github
delete-early-access-featureDelete an early access feature in PostHog.Action🔗 Github
delete-feature-flagDelete or archive a feature flag in PostHogAction🔗 Github
delete-insightDelete or archive an insight in PostHog.Action🔗 Github
delete-personDelete or archive a person in PostHog.Action🔗 Github
delete-surveyDelete a survey in PostHog.Action🔗 Github
get-actionRetrieve a single action from PostHog.Action🔗 Github
get-alertRetrieve a single alert from PostHog.Action🔗 Github
get-annotationRetrieve a single annotation from PostHog.Action🔗 Github
get-cohortRetrieve a single cohort from PostHog.Action🔗 Github
get-dashboardRetrieve a single dashboard from PostHog.Action🔗 Github
get-early-access-featureRetrieve a single early access feature from PostHog.Action🔗 Github
get-event-definitionRetrieve a single event definition from PostHog.Action🔗 Github
get-eventRetrieve a single event from PostHog.Action🔗 Github
get-experimentRetrieve a single experiment from PostHog.Action🔗 Github
get-feature-flagRetrieve a single feature flag from PostHog.Action🔗 Github
get-insightRetrieve a single insight from PostHog.Action🔗 Github
get-personRetrieve a single person from PostHog.Action🔗 Github
get-projectRetrieve a single project from PostHog.Action🔗 Github
get-property-definitionRetrieve a single property definition from PostHog.Action🔗 Github
get-surveyRetrieve a single survey from PostHog.Action🔗 Github
identify-personIdentify or update a PostHog person.Action🔗 Github
list-actionsList actions (saved event patterns) from PostHog.Action🔗 Github
list-alertsList alerts from PostHog.Action🔗 Github
list-annotationsList annotations from PostHog.Action🔗 Github
list-cohortsList cohorts from PostHog.Action🔗 Github
list-dashboardsList dashboards from PostHog.Action🔗 Github
list-early-access-featuresList early access features from PostHog.Action🔗 Github
list-event-definitionsList event definitions (auto-detected event schemas) from PostHog.Action🔗 Github
list-eventsList events from PostHog.Action🔗 Github
list-experimentsList experiments from PostHog.Action🔗 Github
list-feature-flagsList feature flags from PostHog.Action🔗 Github
list-insightsList insights from PostHog.Action🔗 Github
list-personsList persons from PostHog.Action🔗 Github
list-projectsList projects from PostHogAction🔗 Github
list-property-definitionsList property definitions from PostHog.Action🔗 Github
list-session-recordingsList session recordings from PostHog.Action🔗 Github
list-surveysList surveys from PostHog.Action🔗 Github
update-actionUpdate an action in PostHog.Action🔗 Github
update-alertUpdate an alert in PostHog.Action🔗 Github
update-annotationUpdate an annotation in PostHogAction🔗 Github
update-cohortUpdate a cohort in PostHog.Action🔗 Github
update-dashboardUpdate a dashboard in PostHogAction🔗 Github
update-early-access-featureUpdate an early access feature in PostHog.Action🔗 Github
update-experimentUpdate an experiment in PostHogAction🔗 Github
update-feature-flagUpdate a feature flag in PostHog.Action🔗 Github
update-insightUpdate a insight in PostHog.Action🔗 Github
update-personUpdate a person in PostHog.Action🔗 Github
update-property-definitionUpdate a property definition in PostHog.Action🔗 Github
update-surveyUpdate a survey in 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

On this page