Integration Guide

PostHog API

Product analytics, session recordings, and feature flags. The all-in-one platform for understanding user behavior.

What We Track

User Info

User ID, email, verification status, join date

Projects

Project count, current project name & ID

Events

Total events captured in account

Key Type

Personal (phc_) or Project (phg_) key type

API Key Types

Personal API Keyphc_ / phx_

Full account access, expires if user deleted

Use case: Development, scripts, CI/CD

Project API Keyphg_ / phs_

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

  1. 01.Visit PostHog App
  2. 02.Log in to your account
  3. 03.Go to Settings > Personal API Keys
  4. 04.Click + Create a personal API Key
  5. 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.