# Restore Recipe to Version



{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

Roll back a live recipe to the content state it had at a prior version.

This is a **full point-in-time restore** — every sub-entity of the recipe
(ingredients, servings, nutrition, label configuration, summary, metadata)
snaps back to exactly the state recorded in `target_version_id`. Any
sub-entities added or modified after that version — including servings added
later — are removed in the restored commit. This matches the semantics of
`git checkout <tag>`: the entire tree reverts, not just the fields that
changed between the target and the current HEAD.

This is a **version rollback**, not an un-delete. The recipe must be
ACTIVE or ARCHIVED — a deleted recipe returns 404 (`recipe_not_found`),
the same as any other read. To check whether a recipe is deleted, call
`getRecipe` first; deleted recipes are fully hidden from all endpoints.

Creates a new commit whose content matches `target_version_id`; the existing
history is never rewritten. The new `version_id` is returned in the response
body and `ETag` header — pass it as `If-Match` on subsequent mutations.
Returns 404 if the recipe does not exist (or is deleted), or if the target
version does not exist; 412 on `If-Match` mismatch.

<APIPage document="&#x22;bettermenu&#x22;" operations="[{&#x22;path&#x22;:&#x22;/studio/recipes/{recipe_id}/restore&#x22;,&#x22;method&#x22;:&#x22;post&#x22;}]" />
