PostHog · Schema

RetentionFilter

A/B TestingAnalyticsFeature FlagsOpen-SourceProduct AnalyticsSession Recording

Properties

Name Type Description
aggregationProperty string The property to aggregate when aggregationType is sum or avg
aggregationPropertyType object The type of property to aggregate on (event or person). Defaults to event.
aggregationType object The aggregation type to use for retention
cumulative boolean
customAggregationTarget boolean For data warehouse based retention insights when the aggregation target can't be mapped to persons or groups.
dashboardDisplay object
display object controls the display of the retention graph
goalLines array
meanRetentionCalculation object
minimumOccurrences integer
period object
retentionCustomBrackets array Custom brackets for retention calculations
retentionReference object Whether retention is with regard to initial cohort size, or that of the previous period.
retentionType object
returningEntity object
selectedInterval integer The selected interval to display across all cohorts (null = show all intervals for each cohort)
showTrendLines boolean
targetEntity object
timeWindowMode object The time window mode to use for retention calculations
totalIntervals integer
View JSON Schema on GitHub

JSON Schema

posthog-retentionfilter-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/RetentionFilter",
  "title": "RetentionFilter",
  "additionalProperties": false,
  "properties": {
    "aggregationProperty": {
      "default": null,
      "description": "The property to aggregate when aggregationType is sum or avg",
      "title": "Aggregationproperty",
      "type": "string",
      "nullable": true
    },
    "aggregationPropertyType": {
      "default": "event",
      "description": "The type of property to aggregate on (event or person). Defaults to event.",
      "allOf": [
        {
          "$ref": "#/components/schemas/AggregationPropertyType"
        }
      ],
      "nullable": true
    },
    "aggregationType": {
      "default": "count",
      "description": "The aggregation type to use for retention",
      "allOf": [
        {
          "$ref": "#/components/schemas/AggregationType"
        }
      ],
      "nullable": true
    },
    "cumulative": {
      "default": null,
      "title": "Cumulative",
      "type": "boolean",
      "nullable": true
    },
    "customAggregationTarget": {
      "default": null,
      "description": "For data warehouse based retention insights when the aggregation target can't be mapped to persons or groups.",
      "title": "Customaggregationtarget",
      "type": "boolean",
      "nullable": true
    },
    "dashboardDisplay": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionDashboardDisplayType"
        }
      ],
      "nullable": true
    },
    "display": {
      "default": null,
      "description": "controls the display of the retention graph",
      "allOf": [
        {
          "$ref": "#/components/schemas/ChartDisplayType"
        }
      ],
      "nullable": true
    },
    "goalLines": {
      "default": null,
      "title": "Goallines",
      "items": {
        "$ref": "#/components/schemas/GoalLine"
      },
      "type": "array",
      "nullable": true
    },
    "meanRetentionCalculation": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/MeanRetentionCalculation"
        }
      ],
      "nullable": true
    },
    "minimumOccurrences": {
      "default": null,
      "title": "Minimumoccurrences",
      "type": "integer",
      "nullable": true
    },
    "period": {
      "default": "Day",
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionPeriod"
        }
      ],
      "nullable": true
    },
    "retentionCustomBrackets": {
      "default": null,
      "description": "Custom brackets for retention calculations",
      "title": "Retentioncustombrackets",
      "items": {
        "type": "number"
      },
      "type": "array",
      "nullable": true
    },
    "retentionReference": {
      "default": null,
      "description": "Whether retention is with regard to initial cohort size, or that of the previous period.",
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionReference"
        }
      ],
      "nullable": true
    },
    "retentionType": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionType"
        }
      ],
      "nullable": true
    },
    "returningEntity": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionEntity"
        }
      ],
      "nullable": true
    },
    "selectedInterval": {
      "default": null,
      "description": "The selected interval to display across all cohorts (null = show all intervals for each cohort)",
      "title": "Selectedinterval",
      "type": "integer",
      "nullable": true
    },
    "showTrendLines": {
      "default": null,
      "title": "Showtrendlines",
      "type": "boolean",
      "nullable": true
    },
    "targetEntity": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionEntity"
        }
      ],
      "nullable": true
    },
    "timeWindowMode": {
      "default": null,
      "description": "The time window mode to use for retention calculations",
      "allOf": [
        {
          "$ref": "#/components/schemas/TimeWindowMode"
        }
      ],
      "nullable": true
    },
    "totalIntervals": {
      "default": 8,
      "title": "Totalintervals",
      "type": "integer",
      "nullable": true
    }
  },
  "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-retentionfilter"
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.