Skip to main content
idapt
HomeAI ModelsExploreResourcesPricing
Sign inUse for Free
All integrations

PostHog

Events, insights, feature flags and session recordings in PostHog.

Analytics
Connect PostHogPostHog docs

How an agent reaches it

MCPREST APICLI

How you authenticate

API key
Get an API key
  1. Create a personal API key in Settings, then Personal API keys, scoping it to the projects you need.
  2. The personal API key (phx_) reads data. The project API key (phc_) only writes events and is not a credential for this API.

Connection details

Base URL
https://us.posthog.com/api
Pagination
offset

Common endpoints

list projectsGET /projects
query eventsPOST /projects/{id}/query
list feature flagsGET /projects/{id}/feature_flags
list insightsGET /projects/{id}/insights

Worth knowing

  • US and EU clouds are separate hosts with separate keys. Using the wrong one 401s.
  • The write-side project key (phc_) and the read-side personal key (phx_) are different things; only phx_ works here.
  • Most paths are scoped to a project id: /api/projects/{id}/....
  • Home
  • Pricing
  • AI Models
  • Skills
  • Image models
  • Voice models
  • Video models
  • Rankings
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • Blog
  • About
  • Comparisons
  • Benchmarks
  • Model Match
  • Demos
  • Help center
  • FAQ
  • Privacy
  • Support
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Migrate
  • Downloads
  • Desktop
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)Discord