API
REST APIs for everything
Capture events, query data, manage feature flags, and control every aspect of PostHog programmatically.
Query insights, manage feature flags, create cohorts, export data, and automate workflows. If you can do it in the UI, you can do it via API.
- Event capture: Send events from any language or platform
- Query API: Execute HogQL queries and fetch insights programmatically
- Feature flags: Evaluate and manage feature flags via API
- Persons & cohorts: Create and manage user profiles and segments
- Annotations: Add context to your data programmatically
- Dashboards: Create and update dashboards via API
No rate limits on event capture
Send as many events as you need without worrying about rate limits. We handle billions of events daily and our infrastructure scales automatically with your growth.
Built for scale:
- No rate limits on event ingestion
- Automatic batching and retry logic in SDKs
- 99.9% uptime SLA for enterprise customers
- Global CDN for minimal latency
Real-time data access
Query your data immediately after it's captured. No waiting for batch processing or ETL pipelines. Perfect for building live dashboards, real-time personalization, and instant analytics.
Authentication & security
Multiple authentication methods to keep your data secure:
- Project token: For client-side event capture (safe to expose)
- Personal API keys: For server-side operations and data access
- Scoped tokens: Create tokens with specific permissions
- IP allowlisting: Restrict API access by IP address
Webhook integrations
Send data to PostHog or receive events when things happen. Connect with thousands of tools through webhooks, Zapier, and our Customer Data Platform.
Comprehensive documentation
Get up and running quickly with detailed guides, API references, and example code for every endpoint and SDK.