LabscoMCP early access ↗
PostHog avatar✓ Official

consuming-endpoints-from-client-code

MCP connection required★ 59 on GitHub
part of posthog/ai-pluginby posthog

A PostHog endpoint is one of your saved queries, published at a web address. This is how your own app or server calls it: the address, the key it has to send, what goes in the request, and what the errors mean.

WHEN TO USE

SCOPE

USE FOR

  • Generate a typed TypeScript or Python client for an existing endpoint.
  • Figure out why calling an endpoint returns a 401 or 403 error.
  • Fix a call that started failing after an endpoint was materialised.
  • Build the request payload and auth header to call an endpoint from a backend.
  • Handle rate limits when calling PostHog endpoints from production traffic.

NOT FOR

  • Creating a brand-new PostHog endpoint — that's creating-an-endpoint instead.
  • Diagnosing persistent server errors from the endpoint — that's diagnosing-endpoint-performance.