Publish Recipe Draft
publish_recipe_draftPublish a saved MMM or VAR draft as immutable recipe revisions, either as new brand recipes or as a new revision of an existing recipe. Replays return identical revisions.
Instructions
Publish a saved MMM or VAR draft as immutable recipe revisions. Supply a new UUID publication_id and reuse it with identical arguments after an uncertain response; a replay returns the same revisions. Without target: new recipes, one per prepared brand, atomic. With target={recipe_id, expected_version}: revision N+1 of that recipe under its row lock, the draft's base revision recorded as the source. 412 stale_version when the recipe moved since expected_version: the draft and every edit are kept, so re-read the recipe and publish again on top, or drop target to branch into a new recipe. 409 target_requires_single_recipe for a multi-brand draft; 409 when the draft's own target names a different recipe; 404 for a recipe outside the study. Backend compiles the saved snapshot with shared wizard rules; never send separately prepared settings. Does not fit, consume an attempt or designate a champion. MMM priors the draft leaves unset are filled with smart defaults at publication (the Prior Builder's own calculation over the whole source) and frozen; replay does not rebuild them. VAR requires family-specific evidence assessment; MMM policies cannot establish VAR acceptance. Enabled invalid MMM calibration fails publication; VAR calibration is unsupported. Preserve disabled authoring observations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | ||
| target | No | ||
| draft_id | Yes | ||
| publication_id | Yes | ||
| expected_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||