Base URLs
PostHog Cloud is available in two regions. Use the base URL that matches your deployment:All API requests must use HTTPS. HTTP requests will be rejected.
Response format
The API returns JSON-formatted responses. Successful requests return a200 status code along with the requested data.
Success response
Error response
Errors return appropriate HTTP status codes with details:Common status codes
Pagination
List endpoints return paginated results. The response includes pagination metadata:offset and limit query parameters to navigate:
Making your first request
Here’s a simple example to list your projects:API endpoint structure
API endpoints follow a consistent pattern:/api/projects/123/insights/- List insights for project 123/api/projects/123/feature_flags/- List feature flags for project 123/api/projects/123/events/- Query events for project 123
Next steps
Authentication
Learn how to create and use personal API keys
Rate limits
Understand rate limiting and best practices