PostHog API
Product analytics, session recordings, and feature flags. The all-in-one platform for understanding user behavior.
What We Track
User ID, email, verification status, join date
Project count, current project name & ID
Total events captured in account
Personal (phc_) or Project (phg_) key type
API Key Types
Full account access, expires if user deleted
Use case: Development, scripts, CI/CD
Scoped to specific project
Use case: Frontend tracking, mobile apps
Available Features
Analytics
Events, trends, funnels
Feature Flags
Launch & rollback features
Session Recordings
Replay user sessions
Cohorts
User segmentation
Surveys
Collect user feedback
A/B Testing
Experiment & optimize
Pricing Plans
Free
$0
1 project, 1-year retention
- 1M events/mo
- 5K recordings/mo
- 1M flag requests/mo
- Community support
Pay-as-you-go
Usage-based
6 projects, 7-year retention
- All Free features
- Usage-based pricing
- Email support
- Set billing limits
How to Get Your API Key
- 01.Visit PostHog App
- 02.Log in to your account
- 03.Go to Settings > Personal API Keys
- 04.Click + Create a personal API Key
- 05.Name your key, select scopes, and copy the key (shown once!)
Ready to Track
Add your PostHog API key to API Key Health Dashboard to monitor projects, users, and event counts.
API Key Health securely stores your PostHog credentials using AES-256-GCM encryption.