PostHog
communityOpen-source product analytics with event tracking, session replays, feature flags, and A/B testing.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
POST
https://app.posthog.com/capture/Capture an event
Parameters
eventevent name (stringrequiredapi_keyproject API key (stringrequiredpropertiesevent properties (objectoptionaldistinct_iduser ID (stringrequiredReturns
status: 1 for successPOST
https://app.posthog.com/api/projects/{project_id}/insights/trend/Query analytics insights
Parameters
eventsarray of {idrequired— name, math} (arraydate_toend date (stringoptionalintervalhour|day|week|month (stringoptionaldate_fromstart date (stringoptionalReturns
result[] with data[], labels[], days[], count, aggregated_valuePOST
https://app.posthog.com/decide/Get feature flags for a user
Parameters
api_keyproject key (stringrequireddistinct_iduser ID (stringrequiredReturns
featureFlags with flag_name: true/false or variant string, featureFlagPayloads