Create Recipe Draft
create_recipe_draftSave an encrypted recipe authoring draft without publishing it. Create a new draft, start an edit session, or branch a published recipe for later publication.
Instructions
Save an encrypted authoring draft without publishing, fitting or consuming an attempt. Supply a UUID draft_id and reuse it with identical content after an uncertain response. Start from get_recipe_draft_template for a new draft, or from get_recipe_revision_authoring when working from a published revision. To edit a recipe in place, pass target={recipe_id, base_revision_id}: the draft becomes an edit session of that recipe and publish_recipe_draft with a matching target writes the recipe's next revision; the target is immutable after creation (409 on a replay that names another; 404 for a recipe outside the study). To branch a published recipe into a new one instead, omit target and supply its source_revision_id from this study; the immutable link carries inherited influence through publication. Backend validates version and size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| target | No | ||
| draft_id | Yes | ||
| snapshot | Yes | Lossless editor authoring state. Backend is authoritative; preserve unknown nested fields. Source bytes are copied into encrypted draft storage (10 MB source limit); metadata limit is 5 MB. No local filesystem paths or executable code. | |
| study_id | Yes | ||
| source_revision_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||