Consuming Endpoints From Client Code

Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api/openapi-ts, sending the right auth header, shaping the variables payload (HogQL codename vs…

About this skill

Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api/openapi-ts, sending the right auth header, shaping the variables payload (HogQL codename vs insight breakdown property), handling rate-limit and materialised-endpoint error responses.

Maintained by PostHog. The source includes the instructions and any supporting files needed to use this skill.

Inside the instructions

  • 01When to use this skill
  • 02Available tools
  • 03The endpoint URL
  • 04Auth
  • 05The request payload
  • 06Materialised endpoints: all variables are required

Before you start

  1. Read the instructions and check tool or account requirements.
  2. Install the complete folder when the skill references scripts or other files.
  3. Provide your task context, then review the agent's output.

Source

posthog/ai-plugin / consuming-endpoints-from-client-code

Source reviewed October 2, 2026 · See publisher source