[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-managing-endpoint-versions":3,"mdc--l1ud4u-key":45,"related-repo-posthog-managing-endpoint-versions":955,"related-org-posthog-managing-endpoint-versions":1057},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":40,"sourceUrl":43,"mdContent":44},"managing-endpoint-versions","manage PostHog endpoint versions","Work safely with endpoint versions — preview a draft in the playground, roll back to an older version, update settings on one version without bumping query history, deactivate a specific version. Use when the user asks \"how do I roll back my endpoint\", \"preview my changes before publishing\", \"I want to fix v5 without bumping the version\", or anything involving the version history. Calls out today's limitations honestly: there is no pointer flip; \"rollback\" means forking the old query into a new top version.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,16,17],{"name":13,"slug":14,"type":15},"Configuration","configuration","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Analytics","analytics",35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-06-08T08:08:31.187621",null,2977,[26,27,19,28,29,30,31,32,33,34,35,36,37,38,39],"ab-testing","ai-analytics","cdp","data-warehouse","experiments","feature-flags","javascript","product-analytics","python","react","session-replay","surveys","typescript","web-analytics",{"repoUrl":21,"stars":20,"forks":24,"topics":41,"description":42},[26,27,19,28,29,30,31,32,33,34,35,36,37,38,39],"🦔 PostHog is an all-in-one developer platform for building successful products. We offer product analytics, web analytics, session replay, error tracking, feature flags, experimentation, surveys, data warehouse, a CDP, and an AI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.","https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog\u002Ftree\u002FHEAD\u002Fproducts\u002Fendpoints\u002Fskills\u002Fmanaging-endpoint-versions","---\nname: managing-endpoint-versions\ndescription: >\n  Work safely with endpoint versions — preview a draft in the playground, roll back to an older\n  version, update settings on one version without bumping query history, deactivate a specific\n  version. Use when the user asks \"how do I roll back my endpoint\", \"preview my changes before\n  publishing\", \"I want to fix v5 without bumping the version\", or anything involving the version\n  history. Calls out today's limitations honestly: there is no pointer flip; \"rollback\" means\n  forking the old query into a new top version.\n---\n\n# Managing endpoint versions\n\nThis skill is the practical guide to endpoint versioning. It covers the today-workflow, which\nhas some sharp edges worth being explicit about.\n\n## When to use this skill\n\n- \"How do I roll back to v3?\"\n- \"I want to test changes before they go live\"\n- \"How do I update the description \u002F `data_freshness_seconds` on a specific version?\"\n- \"Can I disable v4 without affecting v5?\"\n- The user is uncertain whether a query change will cut a new version\n\n## Versioning model — what to know\n\n| Behaviour                                                                | Reality                                                                                                              |\n| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |\n| Query change                                                             | **Auto-cuts a new version.** Saving any edit to the query creates a new version and bumps the current version number |\n| Settings change (description, `data_freshness_seconds`, materialisation) | Does **not** cut a new version. Updates the targeted version in place                                                |\n| The \"current\" version                                                    | Always the highest version number — it's not a pointer you can move backwards                                        |\n| Calling without `?version=N`                                             | Runs the **latest** version. So unpinned callers always hit the newest                                               |\n| Disabling the whole endpoint                                             | `endpoint-update` with `is_active: false` (no `version`) takes every version offline at once                         |\n| Disabling a single version                                               | `endpoint-update` with `version` + `is_active: false` retires one version without affecting the others               |\n\nThe model is forward-only. There is no \"make v3 the default again\" operation today. Practically\nthis means \"rollback\" requires either creating a new top version that re-uses the old query, or\npinning callers to `?version=N`.\n\n## Available tools\n\n| Tool                | Purpose                                                                                         |\n| ------------------- | ----------------------------------------------------------------------------------------------- |\n| `endpoint-versions` | List all versions for an endpoint, latest first                                                 |\n| `endpoint-get`      | Full config; supports `?version=N` to fetch a specific version                                  |\n| `endpoint-update`   | The workhorse — supports `version` body param to target a specific version                      |\n| `endpoint-run`      | Execute a version directly via `?version=N` (without affecting which version other callers hit) |\n\n## Workflows\n\n### Previewing a draft before publishing\n\nThere is no \"draft\" concept in the model. Editing the query commits it as a new version\nimmediately. To preview safely:\n\n1. Test the new query first with the `execute-sql` tool (or the SQL editor) — not on the live endpoint\n2. When ready, update the endpoint — this creates the new version automatically\n3. Use `endpoint-run` with `?version=N` to confirm the new version returns what you expect\n4. Old callers still hit the latest version (which is now your new version) — there is no\n   \"soft launch\"\n\nIf the user needs a true staging endpoint, the only workaround today is a sibling endpoint\nwith a `_v2` or `_staging` suffix. Document this honestly — there is no in-product staging path.\n\n### Rolling back to an older version\n\nThe forward-only model means \"rollback\" requires forking:\n\n1. `endpoint-versions` to find the version with the good query (say v3)\n2. `endpoint-get` with `?version=3` to retrieve that version's query JSON\n3. `endpoint-update` with the v3 query as the new query — this **creates a new version** (e.g.\n   v6) with the same query as v3\n4. All callers without `?version=N` now hit v6 (== v3's query)\n\nThe old version (v5, the broken one) still exists and is still callable via `?version=5` until\nexplicitly deactivated.\n\nFaster mitigation if you can change every caller: have them pin to `?version=3` until a real\nfix is ready. Lower-impact than cutting a new version.\n\n### Updating settings on a specific version\n\n`endpoint-update` accepts a `version` field in the body. When set, settings updates apply to\nthat version only — they do not cut a new version. Useful when:\n\n- Bumping `data_freshness_seconds` on an old version that some callers still pin to\n- Adjusting description on a historical version for clarity\n- Changing materialisation state per version (the materialisation is per-version anyway)\n\nImportant: passing `query` together with `version` is rejected — query changes always cut a new\ntop version, never modify history. The version arg only affects settings.\n\n### Deactivating a single version\n\nTo take v3 out of service while keeping v4 and v5 callable:\n\n```text\nendpoint-update {name: \"...\", version: 3, is_active: false}\n```\n\nThis sets `is_active: false` on v3 only. Callers pinned to `?version=3` start getting an error;\nother callers are unaffected.\n\nTo re-enable: same call with `is_active: true`.\n\nThe whole-endpoint `is_active` field (without `version`) is a separate switch — it disables\nevery version at once. Use the version-scoped form for surgical takedowns.\n\n### Pruning unused versions\n\nOld versions accumulate over time. To find which are dead, call `endpoint-versions` and read each\nversion's `last_executed_at`: a version that's null or long stale hasn't been called recently.\nMaterialised dead versions are the costly ones — disable their materialisation with\n`endpoint-update` + `version` + `is_materialized: false`, and deactivate with `is_active: false`\nto signal they're retired.\n\nConfirm with the user before retiring a version: `last_executed_at` counts only personal-API-key\ncalls and is recorded only for runs since that tracking was added (so a used version can still\nread null), and a caller may be pinned to `?version=N`. The full audit flow lives in\n`auditing-endpoints`.\n\n## Example interaction\n\n```text\nUser: \"I shipped a broken query last night, v5. How do I roll back?\"\n\nAgent:\n- endpoint-versions \u003Cname> → v5 (latest), v4, v3, v2, v1\n- endpoint-get \u003Cname> ?version=4 → query JSON for v4\n- \"Rolling back means creating v6 with v4's query. v5 stays as a\n   historical version but nobody hits it unless they explicitly\n   pass ?version=5. Sound right?\"\n- User confirms\n- endpoint-update \u003Cname> {query: \u003Cv4 query>} → creates v6\n- endpoint-run \u003Cname> ?version=6 to confirm shape\n- \"Done. v6 is live with v4's query. Want me to also deactivate v5\n   so it's clear it's defunct?\"\n- User: \"Yes\"\n- endpoint-update \u003Cname> {version: 5, is_active: false}\n```\n\n## Important notes\n\n- **There is no pointer flip.** \"Rolling back\" creates a new version. The version number is\n  always going up. If the user is uncomfortable with the resulting history noise, that's a\n  fair concern — surface it honestly.\n- **A query change always creates a new version.** Updating settings on the side does not.\n  If the user wants to fix a typo in v5's description without bumping to v6, use the version\n  param.\n- **Disabling a single version only blocks that version.** It doesn't change which version runs\n  by default — that's always the highest version number.\n- **Materialisation is per-version.** Each version has its own materialised view named\n  `{endpoint_name}_v{version}`. Disabling materialisation on one version doesn't affect others.\n- **Pinning is the safety net — push callers to use it.** Callers that pin to `?version=N` are\n  insulated from query edits; unpinned callers always hit the latest and can be surprised by a new\n  version. Encourage consumers to pin, validate a new version, then bump the pin deliberately.\n- **The CLI manages versions too.** `posthog-cli exp endpoints {pull,push,diff}` lets the user\n  keep endpoint definitions as YAML in version control and review changes before pushing — a\n  cleaner workflow than editing live when query changes need review.\n- **Activating an older version is not yet a product feature.** If the user repeatedly wants this —\n  flip a pointer rather than fork — surface it as a feature gap (and nudge the team via\n  `agent-feedback`). Don't pretend `endpoint-update` does it.\n",{"data":46,"body":47},{"name":4,"description":6},{"type":48,"children":49},"root",[50,58,64,71,110,116,295,307,313,423,429,436,441,486,507,513,518,577,590,602,608,625,650,670,676,681,693,712,724,744,750,797,823,829,838,844],{"type":51,"tag":52,"props":53,"children":54},"element","h1",{"id":4},[55],{"type":56,"value":57},"text","Managing endpoint versions",{"type":51,"tag":59,"props":60,"children":61},"p",{},[62],{"type":56,"value":63},"This skill is the practical guide to endpoint versioning. It covers the today-workflow, which\nhas some sharp edges worth being explicit about.",{"type":51,"tag":65,"props":66,"children":68},"h2",{"id":67},"when-to-use-this-skill",[69],{"type":56,"value":70},"When to use this skill",{"type":51,"tag":72,"props":73,"children":74},"ul",{},[75,81,86,100,105],{"type":51,"tag":76,"props":77,"children":78},"li",{},[79],{"type":56,"value":80},"\"How do I roll back to v3?\"",{"type":51,"tag":76,"props":82,"children":83},{},[84],{"type":56,"value":85},"\"I want to test changes before they go live\"",{"type":51,"tag":76,"props":87,"children":88},{},[89,91,98],{"type":56,"value":90},"\"How do I update the description \u002F ",{"type":51,"tag":92,"props":93,"children":95},"code",{"className":94},[],[96],{"type":56,"value":97},"data_freshness_seconds",{"type":56,"value":99}," on a specific version?\"",{"type":51,"tag":76,"props":101,"children":102},{},[103],{"type":56,"value":104},"\"Can I disable v4 without affecting v5?\"",{"type":51,"tag":76,"props":106,"children":107},{},[108],{"type":56,"value":109},"The user is uncertain whether a query change will cut a new version",{"type":51,"tag":65,"props":111,"children":113},{"id":112},"versioning-model-what-to-know",[114],{"type":56,"value":115},"Versioning model — what to know",{"type":51,"tag":117,"props":118,"children":119},"table",{},[120,139],{"type":51,"tag":121,"props":122,"children":123},"thead",{},[124],{"type":51,"tag":125,"props":126,"children":127},"tr",{},[128,134],{"type":51,"tag":129,"props":130,"children":131},"th",{},[132],{"type":56,"value":133},"Behaviour",{"type":51,"tag":129,"props":135,"children":136},{},[137],{"type":56,"value":138},"Reality",{"type":51,"tag":140,"props":141,"children":142},"tbody",{},[143,163,190,203,229,264],{"type":51,"tag":125,"props":144,"children":145},{},[146,152],{"type":51,"tag":147,"props":148,"children":149},"td",{},[150],{"type":56,"value":151},"Query change",{"type":51,"tag":147,"props":153,"children":154},{},[155,161],{"type":51,"tag":156,"props":157,"children":158},"strong",{},[159],{"type":56,"value":160},"Auto-cuts a new version.",{"type":56,"value":162}," Saving any edit to the query creates a new version and bumps the current version number",{"type":51,"tag":125,"props":164,"children":165},{},[166,178],{"type":51,"tag":147,"props":167,"children":168},{},[169,171,176],{"type":56,"value":170},"Settings change (description, ",{"type":51,"tag":92,"props":172,"children":174},{"className":173},[],[175],{"type":56,"value":97},{"type":56,"value":177},", materialisation)",{"type":51,"tag":147,"props":179,"children":180},{},[181,183,188],{"type":56,"value":182},"Does ",{"type":51,"tag":156,"props":184,"children":185},{},[186],{"type":56,"value":187},"not",{"type":56,"value":189}," cut a new version. Updates the targeted version in place",{"type":51,"tag":125,"props":191,"children":192},{},[193,198],{"type":51,"tag":147,"props":194,"children":195},{},[196],{"type":56,"value":197},"The \"current\" version",{"type":51,"tag":147,"props":199,"children":200},{},[201],{"type":56,"value":202},"Always the highest version number — it's not a pointer you can move backwards",{"type":51,"tag":125,"props":204,"children":205},{},[206,217],{"type":51,"tag":147,"props":207,"children":208},{},[209,211],{"type":56,"value":210},"Calling without ",{"type":51,"tag":92,"props":212,"children":214},{"className":213},[],[215],{"type":56,"value":216},"?version=N",{"type":51,"tag":147,"props":218,"children":219},{},[220,222,227],{"type":56,"value":221},"Runs the ",{"type":51,"tag":156,"props":223,"children":224},{},[225],{"type":56,"value":226},"latest",{"type":56,"value":228}," version. So unpinned callers always hit the newest",{"type":51,"tag":125,"props":230,"children":231},{},[232,237],{"type":51,"tag":147,"props":233,"children":234},{},[235],{"type":56,"value":236},"Disabling the whole endpoint",{"type":51,"tag":147,"props":238,"children":239},{},[240,246,248,254,256,262],{"type":51,"tag":92,"props":241,"children":243},{"className":242},[],[244],{"type":56,"value":245},"endpoint-update",{"type":56,"value":247}," with ",{"type":51,"tag":92,"props":249,"children":251},{"className":250},[],[252],{"type":56,"value":253},"is_active: false",{"type":56,"value":255}," (no ",{"type":51,"tag":92,"props":257,"children":259},{"className":258},[],[260],{"type":56,"value":261},"version",{"type":56,"value":263},") takes every version offline at once",{"type":51,"tag":125,"props":265,"children":266},{},[267,272],{"type":51,"tag":147,"props":268,"children":269},{},[270],{"type":56,"value":271},"Disabling a single version",{"type":51,"tag":147,"props":273,"children":274},{},[275,280,281,286,288,293],{"type":51,"tag":92,"props":276,"children":278},{"className":277},[],[279],{"type":56,"value":245},{"type":56,"value":247},{"type":51,"tag":92,"props":282,"children":284},{"className":283},[],[285],{"type":56,"value":261},{"type":56,"value":287}," + ",{"type":51,"tag":92,"props":289,"children":291},{"className":290},[],[292],{"type":56,"value":253},{"type":56,"value":294}," retires one version without affecting the others",{"type":51,"tag":59,"props":296,"children":297},{},[298,300,305],{"type":56,"value":299},"The model is forward-only. There is no \"make v3 the default again\" operation today. Practically\nthis means \"rollback\" requires either creating a new top version that re-uses the old query, or\npinning callers to ",{"type":51,"tag":92,"props":301,"children":303},{"className":302},[],[304],{"type":56,"value":216},{"type":56,"value":306},".",{"type":51,"tag":65,"props":308,"children":310},{"id":309},"available-tools",[311],{"type":56,"value":312},"Available tools",{"type":51,"tag":117,"props":314,"children":315},{},[316,332],{"type":51,"tag":121,"props":317,"children":318},{},[319],{"type":51,"tag":125,"props":320,"children":321},{},[322,327],{"type":51,"tag":129,"props":323,"children":324},{},[325],{"type":56,"value":326},"Tool",{"type":51,"tag":129,"props":328,"children":329},{},[330],{"type":56,"value":331},"Purpose",{"type":51,"tag":140,"props":333,"children":334},{},[335,352,376,399],{"type":51,"tag":125,"props":336,"children":337},{},[338,347],{"type":51,"tag":147,"props":339,"children":340},{},[341],{"type":51,"tag":92,"props":342,"children":344},{"className":343},[],[345],{"type":56,"value":346},"endpoint-versions",{"type":51,"tag":147,"props":348,"children":349},{},[350],{"type":56,"value":351},"List all versions for an endpoint, latest first",{"type":51,"tag":125,"props":353,"children":354},{},[355,364],{"type":51,"tag":147,"props":356,"children":357},{},[358],{"type":51,"tag":92,"props":359,"children":361},{"className":360},[],[362],{"type":56,"value":363},"endpoint-get",{"type":51,"tag":147,"props":365,"children":366},{},[367,369,374],{"type":56,"value":368},"Full config; supports ",{"type":51,"tag":92,"props":370,"children":372},{"className":371},[],[373],{"type":56,"value":216},{"type":56,"value":375}," to fetch a specific version",{"type":51,"tag":125,"props":377,"children":378},{},[379,387],{"type":51,"tag":147,"props":380,"children":381},{},[382],{"type":51,"tag":92,"props":383,"children":385},{"className":384},[],[386],{"type":56,"value":245},{"type":51,"tag":147,"props":388,"children":389},{},[390,392,397],{"type":56,"value":391},"The workhorse — supports ",{"type":51,"tag":92,"props":393,"children":395},{"className":394},[],[396],{"type":56,"value":261},{"type":56,"value":398}," body param to target a specific version",{"type":51,"tag":125,"props":400,"children":401},{},[402,411],{"type":51,"tag":147,"props":403,"children":404},{},[405],{"type":51,"tag":92,"props":406,"children":408},{"className":407},[],[409],{"type":56,"value":410},"endpoint-run",{"type":51,"tag":147,"props":412,"children":413},{},[414,416,421],{"type":56,"value":415},"Execute a version directly via ",{"type":51,"tag":92,"props":417,"children":419},{"className":418},[],[420],{"type":56,"value":216},{"type":56,"value":422}," (without affecting which version other callers hit)",{"type":51,"tag":65,"props":424,"children":426},{"id":425},"workflows",[427],{"type":56,"value":428},"Workflows",{"type":51,"tag":430,"props":431,"children":433},"h3",{"id":432},"previewing-a-draft-before-publishing",[434],{"type":56,"value":435},"Previewing a draft before publishing",{"type":51,"tag":59,"props":437,"children":438},{},[439],{"type":56,"value":440},"There is no \"draft\" concept in the model. Editing the query commits it as a new version\nimmediately. To preview safely:",{"type":51,"tag":442,"props":443,"children":444},"ol",{},[445,458,463,481],{"type":51,"tag":76,"props":446,"children":447},{},[448,450,456],{"type":56,"value":449},"Test the new query first with the ",{"type":51,"tag":92,"props":451,"children":453},{"className":452},[],[454],{"type":56,"value":455},"execute-sql",{"type":56,"value":457}," tool (or the SQL editor) — not on the live endpoint",{"type":51,"tag":76,"props":459,"children":460},{},[461],{"type":56,"value":462},"When ready, update the endpoint — this creates the new version automatically",{"type":51,"tag":76,"props":464,"children":465},{},[466,468,473,474,479],{"type":56,"value":467},"Use ",{"type":51,"tag":92,"props":469,"children":471},{"className":470},[],[472],{"type":56,"value":410},{"type":56,"value":247},{"type":51,"tag":92,"props":475,"children":477},{"className":476},[],[478],{"type":56,"value":216},{"type":56,"value":480}," to confirm the new version returns what you expect",{"type":51,"tag":76,"props":482,"children":483},{},[484],{"type":56,"value":485},"Old callers still hit the latest version (which is now your new version) — there is no\n\"soft launch\"",{"type":51,"tag":59,"props":487,"children":488},{},[489,491,497,499,505],{"type":56,"value":490},"If the user needs a true staging endpoint, the only workaround today is a sibling endpoint\nwith a ",{"type":51,"tag":92,"props":492,"children":494},{"className":493},[],[495],{"type":56,"value":496},"_v2",{"type":56,"value":498}," or ",{"type":51,"tag":92,"props":500,"children":502},{"className":501},[],[503],{"type":56,"value":504},"_staging",{"type":56,"value":506}," suffix. Document this honestly — there is no in-product staging path.",{"type":51,"tag":430,"props":508,"children":510},{"id":509},"rolling-back-to-an-older-version",[511],{"type":56,"value":512},"Rolling back to an older version",{"type":51,"tag":59,"props":514,"children":515},{},[516],{"type":56,"value":517},"The forward-only model means \"rollback\" requires forking:",{"type":51,"tag":442,"props":519,"children":520},{},[521,531,548,565],{"type":51,"tag":76,"props":522,"children":523},{},[524,529],{"type":51,"tag":92,"props":525,"children":527},{"className":526},[],[528],{"type":56,"value":346},{"type":56,"value":530}," to find the version with the good query (say v3)",{"type":51,"tag":76,"props":532,"children":533},{},[534,539,540,546],{"type":51,"tag":92,"props":535,"children":537},{"className":536},[],[538],{"type":56,"value":363},{"type":56,"value":247},{"type":51,"tag":92,"props":541,"children":543},{"className":542},[],[544],{"type":56,"value":545},"?version=3",{"type":56,"value":547}," to retrieve that version's query JSON",{"type":51,"tag":76,"props":549,"children":550},{},[551,556,558,563],{"type":51,"tag":92,"props":552,"children":554},{"className":553},[],[555],{"type":56,"value":245},{"type":56,"value":557}," with the v3 query as the new query — this ",{"type":51,"tag":156,"props":559,"children":560},{},[561],{"type":56,"value":562},"creates a new version",{"type":56,"value":564}," (e.g.\nv6) with the same query as v3",{"type":51,"tag":76,"props":566,"children":567},{},[568,570,575],{"type":56,"value":569},"All callers without ",{"type":51,"tag":92,"props":571,"children":573},{"className":572},[],[574],{"type":56,"value":216},{"type":56,"value":576}," now hit v6 (== v3's query)",{"type":51,"tag":59,"props":578,"children":579},{},[580,582,588],{"type":56,"value":581},"The old version (v5, the broken one) still exists and is still callable via ",{"type":51,"tag":92,"props":583,"children":585},{"className":584},[],[586],{"type":56,"value":587},"?version=5",{"type":56,"value":589}," until\nexplicitly deactivated.",{"type":51,"tag":59,"props":591,"children":592},{},[593,595,600],{"type":56,"value":594},"Faster mitigation if you can change every caller: have them pin to ",{"type":51,"tag":92,"props":596,"children":598},{"className":597},[],[599],{"type":56,"value":545},{"type":56,"value":601}," until a real\nfix is ready. Lower-impact than cutting a new version.",{"type":51,"tag":430,"props":603,"children":605},{"id":604},"updating-settings-on-a-specific-version",[606],{"type":56,"value":607},"Updating settings on a specific version",{"type":51,"tag":59,"props":609,"children":610},{},[611,616,618,623],{"type":51,"tag":92,"props":612,"children":614},{"className":613},[],[615],{"type":56,"value":245},{"type":56,"value":617}," accepts a ",{"type":51,"tag":92,"props":619,"children":621},{"className":620},[],[622],{"type":56,"value":261},{"type":56,"value":624}," field in the body. When set, settings updates apply to\nthat version only — they do not cut a new version. Useful when:",{"type":51,"tag":72,"props":626,"children":627},{},[628,640,645],{"type":51,"tag":76,"props":629,"children":630},{},[631,633,638],{"type":56,"value":632},"Bumping ",{"type":51,"tag":92,"props":634,"children":636},{"className":635},[],[637],{"type":56,"value":97},{"type":56,"value":639}," on an old version that some callers still pin to",{"type":51,"tag":76,"props":641,"children":642},{},[643],{"type":56,"value":644},"Adjusting description on a historical version for clarity",{"type":51,"tag":76,"props":646,"children":647},{},[648],{"type":56,"value":649},"Changing materialisation state per version (the materialisation is per-version anyway)",{"type":51,"tag":59,"props":651,"children":652},{},[653,655,661,663,668],{"type":56,"value":654},"Important: passing ",{"type":51,"tag":92,"props":656,"children":658},{"className":657},[],[659],{"type":56,"value":660},"query",{"type":56,"value":662}," together with ",{"type":51,"tag":92,"props":664,"children":666},{"className":665},[],[667],{"type":56,"value":261},{"type":56,"value":669}," is rejected — query changes always cut a new\ntop version, never modify history. The version arg only affects settings.",{"type":51,"tag":430,"props":671,"children":673},{"id":672},"deactivating-a-single-version",[674],{"type":56,"value":675},"Deactivating a single version",{"type":51,"tag":59,"props":677,"children":678},{},[679],{"type":56,"value":680},"To take v3 out of service while keeping v4 and v5 callable:",{"type":51,"tag":682,"props":683,"children":688},"pre",{"className":684,"code":686,"language":56,"meta":687},[685],"language-text","endpoint-update {name: \"...\", version: 3, is_active: false}\n","",[689],{"type":51,"tag":92,"props":690,"children":691},{"__ignoreMap":687},[692],{"type":56,"value":686},{"type":51,"tag":59,"props":694,"children":695},{},[696,698,703,705,710],{"type":56,"value":697},"This sets ",{"type":51,"tag":92,"props":699,"children":701},{"className":700},[],[702],{"type":56,"value":253},{"type":56,"value":704}," on v3 only. Callers pinned to ",{"type":51,"tag":92,"props":706,"children":708},{"className":707},[],[709],{"type":56,"value":545},{"type":56,"value":711}," start getting an error;\nother callers are unaffected.",{"type":51,"tag":59,"props":713,"children":714},{},[715,717,723],{"type":56,"value":716},"To re-enable: same call with ",{"type":51,"tag":92,"props":718,"children":720},{"className":719},[],[721],{"type":56,"value":722},"is_active: true",{"type":56,"value":306},{"type":51,"tag":59,"props":725,"children":726},{},[727,729,735,737,742],{"type":56,"value":728},"The whole-endpoint ",{"type":51,"tag":92,"props":730,"children":732},{"className":731},[],[733],{"type":56,"value":734},"is_active",{"type":56,"value":736}," field (without ",{"type":51,"tag":92,"props":738,"children":740},{"className":739},[],[741],{"type":56,"value":261},{"type":56,"value":743},") is a separate switch — it disables\nevery version at once. Use the version-scoped form for surgical takedowns.",{"type":51,"tag":430,"props":745,"children":747},{"id":746},"pruning-unused-versions",[748],{"type":56,"value":749},"Pruning unused versions",{"type":51,"tag":59,"props":751,"children":752},{},[753,755,760,762,768,770,775,776,781,782,788,790,795],{"type":56,"value":754},"Old versions accumulate over time. To find which are dead, call ",{"type":51,"tag":92,"props":756,"children":758},{"className":757},[],[759],{"type":56,"value":346},{"type":56,"value":761}," and read each\nversion's ",{"type":51,"tag":92,"props":763,"children":765},{"className":764},[],[766],{"type":56,"value":767},"last_executed_at",{"type":56,"value":769},": a version that's null or long stale hasn't been called recently.\nMaterialised dead versions are the costly ones — disable their materialisation with\n",{"type":51,"tag":92,"props":771,"children":773},{"className":772},[],[774],{"type":56,"value":245},{"type":56,"value":287},{"type":51,"tag":92,"props":777,"children":779},{"className":778},[],[780],{"type":56,"value":261},{"type":56,"value":287},{"type":51,"tag":92,"props":783,"children":785},{"className":784},[],[786],{"type":56,"value":787},"is_materialized: false",{"type":56,"value":789},", and deactivate with ",{"type":51,"tag":92,"props":791,"children":793},{"className":792},[],[794],{"type":56,"value":253},{"type":56,"value":796},"\nto signal they're retired.",{"type":51,"tag":59,"props":798,"children":799},{},[800,802,807,809,814,816,822],{"type":56,"value":801},"Confirm with the user before retiring a version: ",{"type":51,"tag":92,"props":803,"children":805},{"className":804},[],[806],{"type":56,"value":767},{"type":56,"value":808}," counts only personal-API-key\ncalls and is recorded only for runs since that tracking was added (so a used version can still\nread null), and a caller may be pinned to ",{"type":51,"tag":92,"props":810,"children":812},{"className":811},[],[813],{"type":56,"value":216},{"type":56,"value":815},". The full audit flow lives in\n",{"type":51,"tag":92,"props":817,"children":819},{"className":818},[],[820],{"type":56,"value":821},"auditing-endpoints",{"type":56,"value":306},{"type":51,"tag":65,"props":824,"children":826},{"id":825},"example-interaction",[827],{"type":56,"value":828},"Example interaction",{"type":51,"tag":682,"props":830,"children":833},{"className":831,"code":832,"language":56,"meta":687},[685],"User: \"I shipped a broken query last night, v5. How do I roll back?\"\n\nAgent:\n- endpoint-versions \u003Cname> → v5 (latest), v4, v3, v2, v1\n- endpoint-get \u003Cname> ?version=4 → query JSON for v4\n- \"Rolling back means creating v6 with v4's query. v5 stays as a\n   historical version but nobody hits it unless they explicitly\n   pass ?version=5. Sound right?\"\n- User confirms\n- endpoint-update \u003Cname> {query: \u003Cv4 query>} → creates v6\n- endpoint-run \u003Cname> ?version=6 to confirm shape\n- \"Done. v6 is live with v4's query. Want me to also deactivate v5\n   so it's clear it's defunct?\"\n- User: \"Yes\"\n- endpoint-update \u003Cname> {version: 5, is_active: false}\n",[834],{"type":51,"tag":92,"props":835,"children":836},{"__ignoreMap":687},[837],{"type":56,"value":832},{"type":51,"tag":65,"props":839,"children":841},{"id":840},"important-notes",[842],{"type":56,"value":843},"Important notes",{"type":51,"tag":72,"props":845,"children":846},{},[847,857,867,877,895,912,930],{"type":51,"tag":76,"props":848,"children":849},{},[850,855],{"type":51,"tag":156,"props":851,"children":852},{},[853],{"type":56,"value":854},"There is no pointer flip.",{"type":56,"value":856}," \"Rolling back\" creates a new version. The version number is\nalways going up. If the user is uncomfortable with the resulting history noise, that's a\nfair concern — surface it honestly.",{"type":51,"tag":76,"props":858,"children":859},{},[860,865],{"type":51,"tag":156,"props":861,"children":862},{},[863],{"type":56,"value":864},"A query change always creates a new version.",{"type":56,"value":866}," Updating settings on the side does not.\nIf the user wants to fix a typo in v5's description without bumping to v6, use the version\nparam.",{"type":51,"tag":76,"props":868,"children":869},{},[870,875],{"type":51,"tag":156,"props":871,"children":872},{},[873],{"type":56,"value":874},"Disabling a single version only blocks that version.",{"type":56,"value":876}," It doesn't change which version runs\nby default — that's always the highest version number.",{"type":51,"tag":76,"props":878,"children":879},{},[880,885,887,893],{"type":51,"tag":156,"props":881,"children":882},{},[883],{"type":56,"value":884},"Materialisation is per-version.",{"type":56,"value":886}," Each version has its own materialised view named\n",{"type":51,"tag":92,"props":888,"children":890},{"className":889},[],[891],{"type":56,"value":892},"{endpoint_name}_v{version}",{"type":56,"value":894},". Disabling materialisation on one version doesn't affect others.",{"type":51,"tag":76,"props":896,"children":897},{},[898,903,905,910],{"type":51,"tag":156,"props":899,"children":900},{},[901],{"type":56,"value":902},"Pinning is the safety net — push callers to use it.",{"type":56,"value":904}," Callers that pin to ",{"type":51,"tag":92,"props":906,"children":908},{"className":907},[],[909],{"type":56,"value":216},{"type":56,"value":911}," are\ninsulated from query edits; unpinned callers always hit the latest and can be surprised by a new\nversion. Encourage consumers to pin, validate a new version, then bump the pin deliberately.",{"type":51,"tag":76,"props":913,"children":914},{},[915,920,922,928],{"type":51,"tag":156,"props":916,"children":917},{},[918],{"type":56,"value":919},"The CLI manages versions too.",{"type":56,"value":921}," ",{"type":51,"tag":92,"props":923,"children":925},{"className":924},[],[926],{"type":56,"value":927},"posthog-cli exp endpoints {pull,push,diff}",{"type":56,"value":929}," lets the user\nkeep endpoint definitions as YAML in version control and review changes before pushing — a\ncleaner workflow than editing live when query changes need review.",{"type":51,"tag":76,"props":931,"children":932},{},[933,938,940,946,948,953],{"type":51,"tag":156,"props":934,"children":935},{},[936],{"type":56,"value":937},"Activating an older version is not yet a product feature.",{"type":56,"value":939}," If the user repeatedly wants this —\nflip a pointer rather than fork — surface it as a feature gap (and nudge the team via\n",{"type":51,"tag":92,"props":941,"children":943},{"className":942},[],[944],{"type":56,"value":945},"agent-feedback",{"type":56,"value":947},"). Don't pretend ",{"type":51,"tag":92,"props":949,"children":951},{"className":950},[],[952],{"type":56,"value":245},{"type":56,"value":954}," does it.",{"items":956,"total":1056},[957,972,983,995,1008,1023,1039],{"slug":958,"name":958,"fn":959,"description":960,"org":961,"tags":962,"stars":20,"repoUrl":21,"updatedAt":971},"analyzing-expensive-users","analyze expensive users in AI observability","Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[963,964,967,970],{"name":18,"slug":19,"type":15},{"name":965,"slug":966,"type":15},"Cost Optimization","cost-optimization",{"name":968,"slug":969,"type":15},"Observability","observability",{"name":9,"slug":8,"type":15},"2026-07-28T05:34:11.117757",{"slug":821,"name":821,"fn":973,"description":974,"org":975,"tags":976,"stars":20,"repoUrl":21,"updatedAt":982},"audit PostHog project endpoints","Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks \"what endpoints can I clean up?\", \"are any of my endpoints broken?\", \"which materialised versions are still being called?\", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[977,978,981],{"name":18,"slug":19,"type":15},{"name":979,"slug":980,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},"2026-06-08T08:08:33.693989",{"slug":984,"name":984,"fn":985,"description":986,"org":987,"tags":988,"stars":20,"repoUrl":21,"updatedAt":994},"auditing-warehouse-source-health","audit PostHog data warehouse source health","Audit the health of a PostHog project's data warehouse sources and syncs — find every broken or degraded source connection, sync schema, and webhook channel. Use when the user asks \"why are my imports failing?\", \"what's broken with my sources?\", \"why is my warehouse data stale?\", or wants a one-shot triage of source\u002Fsync health before deciding where to dig in. Produces a prioritized report grouped by severity, with recommended next steps. For materialized-view health use `auditing-warehouse-view-health`; for a single failing sync use `diagnosing-failed-warehouse-syncs`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[989,990,992,993],{"name":979,"slug":980,"type":15},{"name":991,"slug":29,"type":15},"Data Warehouse",{"name":968,"slug":969,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:22:57.67984",{"slug":996,"name":996,"fn":997,"description":998,"org":999,"tags":1000,"stars":20,"repoUrl":21,"updatedAt":1007},"auditing-warehouse-view-health","audit PostHog materialized view health","Audit the health of a PostHog project's materialized views (saved queries) — find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks \"which of my views are broken?\", \"why is this materialized view failing?\", \"are any of my views wasting compute?\", or wants a one-shot triage of view health. For source\u002Fsync health use `auditing-warehouse-source-health`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1001,1002,1003,1006],{"name":979,"slug":980,"type":15},{"name":991,"slug":29,"type":15},{"name":1004,"slug":1005,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-06-18T08:25:10.936787",{"slug":1009,"name":1009,"fn":1010,"description":1011,"org":1012,"tags":1013,"stars":20,"repoUrl":21,"updatedAt":1022},"authoring-error-tracking-alerts","author PostHog error tracking alerts","Author error tracking alerts that fire when an issue is created, reopened, or starts spiking. Use when the user asks to set up error notifications, route exceptions to Slack\u002Fwebhook\u002FLinear, or evaluate which error events are worth alerting on. Covers trigger-event selection, integration choice, dedup against existing alerts, and shipping with the canonical message body shape.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1014,1017,1020,1021],{"name":1015,"slug":1016,"type":15},"Alerting","alerting",{"name":1018,"slug":1019,"type":15},"Debugging","debugging",{"name":968,"slug":969,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:24:40.318583",{"slug":1024,"name":1024,"fn":1025,"description":1026,"org":1027,"tags":1028,"stars":20,"repoUrl":21,"updatedAt":1038},"authoring-log-alerts","author log alerts in PostHog","Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1029,1030,1033,1034,1037],{"name":18,"slug":19,"type":15},{"name":1031,"slug":1032,"type":15},"Monitoring","monitoring",{"name":968,"slug":969,"type":15},{"name":1035,"slug":1036,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-18T05:10:54.430898",{"slug":1040,"name":1040,"fn":1041,"description":1042,"org":1043,"tags":1044,"stars":20,"repoUrl":21,"updatedAt":1055},"building-workflows","build and edit PostHog workflows","Build, edit, test, enable, and monitor PostHog workflows over MCP. Author the action\u002Fedge graph so it runs and opens cleanly in the visual editor, then change drafts surgically with patch operations. Use when asked to build, set up, automate, change, fix, or debug a workflow, campaign, broadcast, drip sequence, or event-triggered automation in the workflows product.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1045,1048,1051,1052],{"name":1046,"slug":1047,"type":15},"Automation","automation",{"name":1049,"slug":1050,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},{"name":1053,"slug":1054,"type":15},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",61,{"items":1058,"total":1175},[1059,1066,1072,1079,1086,1093,1101,1108,1122,1137,1147,1165],{"slug":958,"name":958,"fn":959,"description":960,"org":1060,"tags":1061,"stars":20,"repoUrl":21,"updatedAt":971},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1062,1063,1064,1065],{"name":18,"slug":19,"type":15},{"name":965,"slug":966,"type":15},{"name":968,"slug":969,"type":15},{"name":9,"slug":8,"type":15},{"slug":821,"name":821,"fn":973,"description":974,"org":1067,"tags":1068,"stars":20,"repoUrl":21,"updatedAt":982},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1069,1070,1071],{"name":18,"slug":19,"type":15},{"name":979,"slug":980,"type":15},{"name":9,"slug":8,"type":15},{"slug":984,"name":984,"fn":985,"description":986,"org":1073,"tags":1074,"stars":20,"repoUrl":21,"updatedAt":994},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1075,1076,1077,1078],{"name":979,"slug":980,"type":15},{"name":991,"slug":29,"type":15},{"name":968,"slug":969,"type":15},{"name":9,"slug":8,"type":15},{"slug":996,"name":996,"fn":997,"description":998,"org":1080,"tags":1081,"stars":20,"repoUrl":21,"updatedAt":1007},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1082,1083,1084,1085],{"name":979,"slug":980,"type":15},{"name":991,"slug":29,"type":15},{"name":1004,"slug":1005,"type":15},{"name":9,"slug":8,"type":15},{"slug":1009,"name":1009,"fn":1010,"description":1011,"org":1087,"tags":1088,"stars":20,"repoUrl":21,"updatedAt":1022},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1089,1090,1091,1092],{"name":1015,"slug":1016,"type":15},{"name":1018,"slug":1019,"type":15},{"name":968,"slug":969,"type":15},{"name":9,"slug":8,"type":15},{"slug":1024,"name":1024,"fn":1025,"description":1026,"org":1094,"tags":1095,"stars":20,"repoUrl":21,"updatedAt":1038},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1096,1097,1098,1099,1100],{"name":18,"slug":19,"type":15},{"name":1031,"slug":1032,"type":15},{"name":968,"slug":969,"type":15},{"name":1035,"slug":1036,"type":15},{"name":9,"slug":8,"type":15},{"slug":1040,"name":1040,"fn":1041,"description":1042,"org":1102,"tags":1103,"stars":20,"repoUrl":21,"updatedAt":1055},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1104,1105,1106,1107],{"name":1046,"slug":1047,"type":15},{"name":1049,"slug":1050,"type":15},{"name":9,"slug":8,"type":15},{"name":1053,"slug":1054,"type":15},{"slug":1109,"name":1109,"fn":1110,"description":1111,"org":1112,"tags":1113,"stars":20,"repoUrl":21,"updatedAt":1121},"check-posthog-loading","inspect PostHog SDK loading across URLs","Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1114,1115,1116,1119,1120],{"name":18,"slug":19,"type":15},{"name":1018,"slug":1019,"type":15},{"name":1117,"slug":1118,"type":15},"Frontend","frontend",{"name":968,"slug":969,"type":15},{"name":9,"slug":8,"type":15},"2026-05-07T05:56:19.828048",{"slug":1123,"name":1123,"fn":1124,"description":1125,"org":1126,"tags":1127,"stars":20,"repoUrl":21,"updatedAt":1136},"consuming-endpoints-from-client-code","integrate PostHog endpoints into client applications","Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api\u002Fopenapi-ts, sending the right auth header, shaping the variables payload (HogQL code_name vs insight breakdown property), handling rate-limit and materialised-endpoint error responses. Use when the user says \"how do I call my endpoint\", \"generate a client for this\", or \"what auth header do I use\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1128,1131,1132,1133],{"name":1129,"slug":1130,"type":15},"API Development","api-development",{"name":1117,"slug":1118,"type":15},{"name":9,"slug":8,"type":15},{"name":1134,"slug":1135,"type":15},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":1138,"name":1138,"fn":1139,"description":1140,"org":1141,"tags":1142,"stars":20,"repoUrl":21,"updatedAt":1146},"copying-endpoints-across-projects","copy PostHog endpoints across projects","Copy a PostHog endpoint (a saved HogQL\u002Finsight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's query\u002Fvariables\u002Ffreshness config in another workspace, or clone an endpoint to iterate on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool — this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the active-project switching it requires, name-collision checks, and the safe defaults (land unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see creating-an-endpoint).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1143,1144,1145],{"name":1129,"slug":1130,"type":15},{"name":1035,"slug":1036,"type":15},{"name":9,"slug":8,"type":15},"2026-07-15T05:29:58.442727",{"slug":1148,"name":1148,"fn":1149,"description":1150,"org":1151,"tags":1152,"stars":20,"repoUrl":21,"updatedAt":1164},"creating-ai-subscription","schedule recurring AI-generated PostHog reports","Create a recurring AI-generated PostHog report — schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email or Slack on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight\u002Fdashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1153,1154,1157,1158,1161],{"name":1046,"slug":1047,"type":15},{"name":1155,"slug":1156,"type":15},"Email","email",{"name":9,"slug":8,"type":15},{"name":1159,"slug":1160,"type":15},"Reporting","reporting",{"name":1162,"slug":1163,"type":15},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":1166,"name":1166,"fn":1167,"description":1168,"org":1169,"tags":1170,"stars":20,"repoUrl":21,"updatedAt":1174},"creating-an-endpoint","create PostHog API endpoints","Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says \"create an endpoint\", \"expose this query as an API\", \"turn this insight into an endpoint\", or asks for help structuring a new endpoint. Steers away from common mistakes: materialising a query with cohort breakdowns or compare mode, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1171,1172,1173],{"name":18,"slug":19,"type":15},{"name":1129,"slug":1130,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:29.624498",231]