managing-endpoint-versions
What it does
This skill explains how endpoint versions work and how to roll back or preview changes without breaking live use. It is for people who edit endpoints and want to avoid surprises.
When to use it
- βWhen you want to roll back an endpoint to an older version.
- βWhen you want to test a query change in the playground before it goes live.
- βWhen you want to update a description or freshness setting on one version without creating a new version.
Skill link
https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/managing-endpoint-versions/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow do I roll my endpoint back to version 3?β
5 new skills a week. 1 minute to read.
How it works
Changing the query creates a new version, while changing settings updates the chosen version in place. The skill uses this to show you safe ways to test and roll back.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Managing endpoint versions
This skill is the practical guide to endpoint versioning. It covers the today-workflow, which has some sharp edges worth being explicit about.
When to use this skill
- "How do I roll back to v3?"
- "I want to test changes before they go live"
- "How do I update the description /
data_freshness_secondson a specific version?" - "Can I disable v4 without affecting v5?"
- The user is uncertain whether a query change will cut a new version
Versioning model β what to know
| Behaviour | Reality |
|---|---|
| Query change | Auto-cuts a new version. Saving any edit to the query creates a new version and bumps the current version number |
Settings change (description, data_freshness_seconds, materialisation) |
Does not cut a new version. Updates the targeted version in place |
| The "current" version | Always the highest version number β it's not a pointer you can move backwards |
Calling without ?version=N |
Runs the latest version. So unpinned callers always hit the newest |
| Disabling the whole endpoint | endpoint-update with is_active: false (no version) takes every version offline at once |
| Disabling a single version | endpoint-update with version + is_active: false retires one version without affecting the others |
The model is forward-only. There is no "make v3 the default again" operation today. Practically
this means "rollback" requires either creating a new top version that re-uses the old query, or
pinning callers to ?version=N.
Available tools
| Tool | Purpose |
|---|---|
endpoint-versions |
List all versions for an endpoint, latest first |
endpoint-get |
Full config; supports ?version=N to fetch a specific version |
endpoint-update |
The workhorse β supports version body param to target a specific version |
endpoint-run |
Execute a version directly via ?version=N (without affecting which version other callers hit) |
Workflows
Previewing a draft before publishing
There is no "draft" concept in the model. Editing the query commits it as a new version immediately. To preview safely:
- Test the new query first with the
execute-sqltool (or the SQL editor) β not on the live endpoint - When ready, update the endpoint β this creates the new version automatically
- Use
endpoint-runwith?version=Nto confirm the new version returns what you expect - Old callers still hit the latest version (which is now your new version) β there is no "soft launch"
If the user needs a true staging endpoint, the only workaround today is a sibling endpoint
with a _v2 or _staging suffix. Document this honestly β there is no in-product staging path.
Rolling back to an older version
The forward-only model means "rollback" requires forking:
endpoint-versionsto find the version with the good query (say v3)endpoint-getwith?version=3to retrieve that version's query JSONendpoint-updatewith the v3 query as the new query β this creates a new version (e.g. v6) with the same query as v3- All callers without
?version=Nnow hit v6 (== v3's query)
The old version (v5, the broken one) still exists and is still callable via ?version=5 until
explicitly deactivated.
Faster mitigation if you can change every caller: have them pin to ?version=3 until a real
fix is ready. Lower-impact than cutting a
FAQ
Does changing a setting create a new version?
No. Settings such as the description or freshness update the targeted version in place.
Does changing the query create a new version?
Yes. Saving a query edit automatically creates a new version and moves the current version number up.
Can I turn off an old version without affecting the new one?
Yes. The skill covers deactivating a specific version, which leaves the others unchanged.
Details
Original description by the author
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.
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6863
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.