Revert asset to a version
revert_assetRevert an asset to a prior version by version_number. Requires a write-scope token and versioning enabled on the workspace plan. A content-changing revert does NOT move the head back to N — it snapshots the current head as a new REVERT version and rotates the bytes to the target, so head_version_number moves FORWARD (old head + 1). A revert whose target content already matches the current head is a no-op (no new version, head unchanged) — this also covers a client-timeout retry of a just-completed revert. Note head_version_number is the next, not-yet-assigned number, so passing version_number equal to it is a benign no-op; the newest stored version is head_version_number − 1. On Free/Pro plans, reverting to a version older than the revert window is refused (revert_window_exceeded). Call list_asset_versions first to pick a valid, revertable version_number.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Asset token | |
| comment | No | Optional note recorded on the snapshot of the replaced head | |
| organization | No | Workspace slug, as returned by list_organizations. Omit it when the account has a single workspace — it is then resolved from your token. Pass it only when the account has several, or when you mean a workspace other than the obvious one. | |
| version_number | Yes | Version to revert to (>= 1, from list_asset_versions) |