PostHog · Schema

ExperimentApiMetric

A/B TestingAnalyticsFeature FlagsOpen-SourceProduct AnalyticsSession Recording

Properties

Name Type Description
completion_event object For retention metrics: completion event.
conversion_window integer Conversion window duration.
denominator object For ratio metrics: denominator source.
goal object Whether higher or lower values indicate success.
kind string
metric_type object
name string Human-readable metric name.
numerator object For ratio metrics: numerator source.
retention_window_end integer
retention_window_start integer
retention_window_unit object
series array For funnel metrics: array of EventsNode/ActionsNode steps.
source object For mean metrics: event source.
start_event object For retention metrics: start event.
start_handling object
uuid string Unique identifier. Auto-generated if omitted.
View JSON Schema on GitHub

JSON Schema

posthog-experimentapimetric-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ExperimentApiMetric",
  "title": "ExperimentApiMetric",
  "additionalProperties": false,
  "properties": {
    "completion_event": {
      "default": null,
      "description": "For retention metrics: completion event.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ExperimentApiEventSource"
        }
      ],
      "nullable": true
    },
    "conversion_window": {
      "default": null,
      "description": "Conversion window duration.",
      "title": "Conversion Window",
      "type": "integer",
      "nullable": true
    },
    "denominator": {
      "default": null,
      "description": "For ratio metrics: denominator source.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ExperimentApiEventSource"
        }
      ],
      "nullable": true
    },
    "goal": {
      "default": null,
      "description": "Whether higher or lower values indicate success.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ExperimentMetricGoal"
        }
      ],
      "nullable": true
    },
    "kind": {
      "default": "ExperimentMetric",
      "title": "Kind",
      "type": "string",
      "enum": [
        "ExperimentMetric"
      ]
    },
    "metric_type": {
      "$ref": "#/components/schemas/ExperimentMetricType"
    },
    "name": {
      "default": null,
      "description": "Human-readable metric name.",
      "title": "Name",
      "type": "string",
      "nullable": true
    },
    "numerator": {
      "default": null,
      "description": "For ratio metrics: numerator source.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ExperimentApiEventSource"
        }
      ],
      "nullable": true
    },
    "retention_window_end": {
      "default": null,
      "title": "Retention Window End",
      "type": "integer",
      "nullable": true
    },
    "retention_window_start": {
      "default": null,
      "title": "Retention Window Start",
      "type": "integer",
      "nullable": true
    },
    "retention_window_unit": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/FunnelConversionWindowTimeUnit"
        }
      ],
      "nullable": true
    },
    "series": {
      "default": null,
      "description": "For funnel metrics: array of EventsNode/ActionsNode steps.",
      "title": "Series",
      "items": {
        "$ref": "#/components/schemas/ExperimentApiEventSource"
      },
      "type": "array",
      "nullable": true
    },
    "source": {
      "default": null,
      "description": "For mean metrics: event source.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ExperimentApiEventSource"
        }
      ],
      "nullable": true
    },
    "start_event": {
      "default": null,
      "description": "For retention metrics: start event.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ExperimentApiEventSource"
        }
      ],
      "nullable": true
    },
    "start_handling": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/StartHandling"
        }
      ],
      "nullable": true
    },
    "uuid": {
      "default": null,
      "description": "Unique identifier. Auto-generated if omitted.",
      "title": "Uuid",
      "type": "string",
      "nullable": true
    }
  },
  "required": [
    "metric_type"
  ],
  "type": "object"
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/posthog-experimentapimetric"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.