Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

31.2 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
        "breakdown_colors": {
            "anyOf": [
                {
                    "items": {
                        "properties": {
                            "breakdownProperty": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ],
                                "description": "Breakdown property the color is scoped to, so the color applies only to tiles that break down by that property. Omit to apply it under every property."
                            },
                            "breakdownType": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ],
                                "description": "Breakdown type the value came from, such as `event`, `person`, `session`, or `cohort`."
                            },
                            "breakdownValue": {
                                "description": "The breakdown value this color applies to, as it appears in the chart legend.",
                                "type": "string"
                            },
                            "colorToken": {
                                "anyOf": [
                                    {
                                        "pattern": "^preset-[1-9][0-9]*$",
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ],
                                "description": "Palette slot to color the value with, as `preset-1` upwards. Not a CSS color: a hex value is rejected. Null leaves the value on its default color."
                            },
                            "source": {
                                "anyOf": [
                                    {
                                        "description": "* `auto` - auto\n* `manual` - manual",
                                        "enum": ["auto", "manual"],
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ],
                                "description": "`manual` for a color a person picked, `auto` for one the dashboard assigned.\n\n* `auto` - auto\n* `manual` - manual"
                            }
                        },
                        "required": ["breakdownValue", "colorToken"],
                        "type": "object"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Colors pinned to specific breakdown values across the dashboard's tiles. A list of entries, not an object keyed by breakdown value. Send an empty list to clear them."
        },
        "data_color_theme_id": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "description": "ID of the color theme used for chart visualizations."
        },
        "delete_insights": {
            "description": "When deleting, also delete insights that are only on this dashboard.",
            "type": "boolean"
        },
        "description": {
            "type": "string"
        },
        "filters": {
            "description": "Dashboard-level filters (date range, properties, breakdown, interval, comparison) applied across all tiles as the source of truth.",
            "properties": {
                "breakdown_filter": {
                    "anyOf": [
                        {
                            "properties": {
                                "breakdown": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "type": "string"
                                                    },
                                                    {
                                                        "type": "number"
                                                    }
                                                ]
                                            },
                                            "type": "array"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "breakdown_group_type_index": {
                                    "anyOf": [
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "breakdown_hide_other_aggregation": {
                                    "anyOf": [
                                        {
                                            "type": "boolean"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "breakdown_histogram_bin_count": {
                                    "anyOf": [
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "breakdown_limit": {
                                    "anyOf": [
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "breakdown_normalize_url": {
                                    "anyOf": [
                                        {
                                            "type": "boolean"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "breakdown_path_cleaning": {
                                    "anyOf": [
                                        {
                                            "type": "boolean"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "breakdown_type": {
                                    "anyOf": [
                                        {
                                            "enum": [
                                                "cohort",
                                                "person",
                                                "event",
                                                "event_metadata",
                                                "element",
                                                "group",
                                                "session",
                                                "hogql",
                                                "data_warehouse",
                                                "data_warehouse_person_property",
                                                "revenue_analytics"
                                            ],
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "default": "event"
                                },
                                "breakdowns": {
                                    "anyOf": [
                                        {
                                            "items": {
                                                "properties": {
                                                    "group_type_index": {
                                                        "anyOf": [
                                                            {
                                                                "type": "number"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ]
                                                    },
                                                    "histogram_bin_count": {
                                                        "anyOf": [
                                                            {
                                                                "type": "number"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ]
                                                    },
                                                    "normalize_url": {
                                                        "anyOf": [
                                                            {
                                                                "type": "boolean"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ]
                                                    },
                                                    "property": {
                                                        "anyOf": [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "number"
                                                            }
                                                        ]
                                                    },
                                                    "type": {
                                                        "anyOf": [
                                                            {
                                                                "enum": [
                                                                    "person",
                                                                    "event",
                                                                    "event_metadata",
                                                                    "element",
                                                                    "group",
                                                                    "session",
                                                                    "hogql",
                                                                    "cohort",
                                                                    "revenue_analytics",
                                                                    "data_warehouse",
                                                                    "data_warehouse_person_property"
                                                                ],
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ]
                                                    }
                                                },
                                                "required": ["property"],
                                                "type": "object"
                                            },
                                            "maxItems": 3,
                                            "type": "array"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            },
                            "type": "object"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Dashboard-level breakdown applied to every tile that supports one, replacing the tile's own breakdown. Example: {\"breakdown_type\": \"event\", \"breakdown\": \"$browser\"}. Null clears it."
                },
                "compareFilter": {
                    "anyOf": [
                        {
                            "properties": {
                                "compare": {
                                    "anyOf": [
                                        {
                                            "type": "boolean"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "default": false,
                                    "description": "Whether to compare the current date range to a previous date range."
                                },
                                "compare_to": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "description": "The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago."
                                }
                            },
                            "type": "object"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Period comparison forced onto every tile that supports one. Null means each tile keeps its own."
                },
                "date_from": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Dashboard-level start of the date range, e.g. '-30d', '-7d', or an ISO date. Applies to all tiles."
                },
                "date_to": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Dashboard-level end of the date range, e.g. '-1d' or an ISO date. Null/omitted means up to now."
                },
                "filterTestAccounts": {
                    "anyOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "True forces test accounts out of every tile, false forces them in, null keeps each tile's setting."
                },
                "interval": {
                    "anyOf": [
                        {
                            "description": "* `second` - second\n* `minute` - minute\n* `hour` - hour\n* `day` - day\n* `week` - week\n* `month` - month\n* `quarter` - quarter\n* `year` - year",
                            "enum": ["second", "minute", "hour", "day", "week", "month", "quarter", "year"],
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Time granularity forced onto every tile that supports one. Null means each tile keeps its own.\n\n* `second` - second\n* `minute` - minute\n* `hour` - hour\n* `day` - day\n* `week` - week\n* `month` - month\n* `quarter` - quarter\n* `year` - year"
                },
                "properties": {
                    "description": "Dashboard-level property filters applied to every tile (PostHog property filter group)."
                }
            },
            "type": "object"
        },
        "grid_spacing": {
            "description": "Named tile density preset. Use tight, condensed, standard, relaxed, or wide.\n\n* `tight` - tight\n* `condensed` - condensed\n* `standard` - standard\n* `relaxed` - relaxed\n* `wide` - wide",
            "enum": ["tight", "condensed", "standard", "relaxed", "wide"],
            "type": "string"
        },
        "group_display": {
            "description": "How tile groups show. sections shows each group as a band that opens and closes. tabs shows one group at a time, and tiles outside any group get their own first tab.\n\n* `sections` - sections\n* `tabs` - tabs",
            "enum": ["sections", "tabs"],
            "type": "string"
        },
        "groups": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "properties": {
                            "collapsed": {
                                "description": "Whether the group starts closed. Defaults to false. When a viewer opens or closes the group, their browser keeps that choice and it wins over this default. A closed group loads its tiles when a viewer opens it.",
                                "type": "boolean"
                            },
                            "color": {
                                "anyOf": [
                                    {
                                        "description": "* `blue` - Blue\n* `purple` - Purple\n* `green` - Green\n* `yellow` - Yellow\n* `orange` - Orange\n* `red` - Red",
                                        "enum": ["blue", "purple", "green", "yellow", "orange", "red"],
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ],
                                "description": "Color of a dot before the group heading. Null or omitted shows no dot.\n\n* `blue` - Blue\n* `purple` - Purple\n* `green` - Green\n* `yellow` - Yellow\n* `orange` - Orange\n* `red` - Red"
                            },
                            "title": {
                                "description": "Heading for the group. When it is blank or omitted, the heading shows the number of tiles.",
                                "maxLength": 200,
                                "type": "string"
                            }
                        },
                        "type": "object"
                    },
                    "propertyNames": {
                        "type": "string"
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Settings for tile groups, keyed by the tiles' group_key. Each group shows as a band of its tiles under a heading that viewers can open and close. Viewers who do not have bands yet see only the group title above its tiles. A write replaces the whole map. Send an empty object or null to remove all group settings."
        },
        "id": {
            "description": "A unique integer value identifying this dashboard.",
            "type": "number"
        },
        "include_dashboards": {
            "description": "Opt in to receiving the deprecated `dashboards` field in insight payloads. Once opt-in enforcement is enabled, API-token callers stop receiving it by default; use `dashboard_tiles` instead.",
            "type": "boolean"
        },
        "layout_compaction": {
            "description": "How tiles rearrange after a move or resize. vertical stacks tiles upward, horizontal stacks tiles to the left, and stable preserves positions while moving colliding tiles.\n\n* `vertical` - vertical\n* `horizontal` - horizontal\n* `stable` - stable",
            "enum": ["vertical", "horizontal", "stable"],
            "type": "string"
        },
        "name": {
            "anyOf": [
                {
                    "maxLength": 400,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ]
        },
        "pinned": {
            "type": "boolean"
        },
        "quick_filter_ids": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "description": "List of quick filter IDs associated with this dashboard."
        },
        "tags": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "tiles": {
            "description": "Dashboard tiles to update, each identified by its tile id. Any tile type accepts `layouts` to set its grid position and size. To change a widget tile's config, name, or description, use dashboard-widgets-batch-update.",
            "items": {
                "properties": {
                    "badge": {
                        "anyOf": [
                            {
                                "description": "* `winner` - Winner\n* `cheeky-hog` - Cheeky hog",
                                "enum": ["winner", "cheeky-hog"],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Badge on the tile. winner shows a crown in the top left corner, for example to mark the best tile in a group. cheeky-hog shows a hedgehog when a person hovers over the tile. Null removes the badge. More than one tile in a group can have the winner badge.\n\n* `winner` - Winner\n* `cheeky-hog` - Cheeky hog"
                    },
                    "group_key": {
                        "anyOf": [
                            {
                                "maxLength": 100,
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Key that puts this tile in a group with the other tiles that have the same key on this dashboard. Set the group's title and style in the dashboard's groups. Null or an empty string removes the tile from its group."
                    },
                    "id": {
                        "description": "Dashboard tile ID to update.",
                        "type": "number"
                    },
                    "layouts": {
                        "description": "Grid position and size per breakpoint. Works for every tile type, including insight tiles. A write replaces the tile's whole layout, so send a complete sm box rather than the one value you want to change. Boxes are stored as sent and overlaps are not resolved, so send sm boxes that do not overlap, and include every tile you move in the same request.",
                        "properties": {
                            "sm": {
                                "description": "Layout for the standard (desktop) breakpoint. The grid is 12 columns wide. A write replaces the tile's whole layout and the dashboard reads desktop placement from this box, so send it whenever you send layouts.",
                                "properties": {
                                    "h": {
                                        "description": "Height in grid rows.",
                                        "minimum": 1,
                                        "type": "number"
                                    },
                                    "w": {
                                        "description": "Width in grid columns. The desktop grid is 12 columns wide.",
                                        "maximum": 12,
                                        "minimum": 1,
                                        "type": "number"
                                    },
                                    "x": {
                                        "description": "Column position in the dashboard grid (0-indexed).",
                                        "maximum": 11,
                                        "minimum": 0,
                                        "type": "number"
                                    },
                                    "y": {
                                        "description": "Row position in the dashboard grid (0-indexed).",
                                        "minimum": 0,
                                        "type": "number"
                                    }
                                },
                                "required": ["x", "y", "w", "h"],
                                "type": "object"
                            },
                            "xs": {
                                "description": "Layout for the small (mobile) breakpoint, on a 1-column grid. The dashboard derives this layout from the sm order and heights, so a stored xs box does not change what renders.",
                                "properties": {
                                    "h": {
                                        "description": "Height in grid rows.",
                                        "minimum": 1,
                                        "type": "number"
                                    },
                                    "w": {
                                        "description": "Width in grid columns. The desktop grid is 12 columns wide.",
                                        "maximum": 12,
                                        "minimum": 1,
                                        "type": "number"
                                    },
                                    "x": {
                                        "description": "Column position in the dashboard grid (0-indexed).",
                                        "maximum": 11,
                                        "minimum": 0,
                                        "type": "number"
                                    },
                                    "y": {
                                        "description": "Row position in the dashboard grid (0-indexed).",
                                        "minimum": 0,
                                        "type": "number"
                                    }
                                },
                                "required": ["x", "y", "w", "h"],
                                "type": "object"
                            }
                        },
                        "required": ["sm"],
                        "type": "object"
                    },
                    "show_description": {
                        "description": "Whether to show the tile's description underneath its title on the dashboard. Works for every tile type. The description itself is unaffected and still comes from the tile's insight, text, or widget content — this only toggles whether it renders on the dashboard.",
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "type": "array"
        },
        "use_dashboard": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "description": "ID of an existing dashboard to duplicate."
        },
        "use_template": {
            "description": "Template key to create the dashboard from a predefined template.",
            "type": "string"
        }
    },
    "required": ["id"],
    "type": "object"
}