Guide

PostHog Endpoint

Source

PostHog endpoints connect Gateway to product analytics, events, insights, funnels, trends, feature flags, and HogQL queries.

Endpoint Kind

Use posthog as the endpoint kind when creating this endpoint through the API or dashboard.

What Gateway Uses This Endpoint For

  • Expose product analytics to AI Orchestration and approved tools.
  • Run governed HogQL and insight retrieval workflows.
  • Connect product telemetry with support, sales, and engineering investigations.
  • Centralize PostHog API key handling.

Basic Endpoint Shape

json
{
  "endpoint": "posthog-prod",
  "kind": "posthog",
  "config": {
    "read_conn": {
      "api_key": "secret",
      "project_id": "12345",
      "base_url": "https://us.posthog.com"
    }
  }
}

Create it with the endpoint API:

bash
curl -sS -X POST "$EDEN/endpoints" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{
  "endpoint": "posthog-prod",
  "kind": "posthog",
  "config": {
    "read_conn": {
      "api_key": "secret",
      "project_id": "12345",
      "base_url": "https://us.posthog.com"
    }
  }
}'

Configuration Fields

FieldPurpose
api_keyPostHog personal API key
project_idProject ID
base_urlOptional base URL, such as https://us.posthog.com

Operating Notes

  • Product analytics can contain user behavior data; scope access carefully.
  • Prefer read-only use cases unless a workflow explicitly needs feature flag or project changes.
  • Keep production and sandbox PostHog projects as separate endpoints.
Help improve Eden Docs

Find something unclear or incomplete? Review the source and propose an update.

View on GitLab Updated August 2, 2026