---
title: "Create section version"
method: POST
path: "/documents/sections/{sectionID}/versions/"
tags: ["Guided Sections"]
---

# Create section version

`POST /documents/sections/{sectionID}/versions/`

Creates a new section version. Returns raw authored values without inheritance resolution.

## Request body

- GuidedSectionsCreateVersionRequest
  - `generation` GuidedSectionGenerationPartial, required — Partial form of GuidedSectionGeneration used when inheriting from another section. Any field omitted is inherited from the referenced section.
    - `heading` string — Override the inherited section title. Passed to the LLM.
    - `instructions` GuidedSectionInstructionsPartial — Partial form of GuidedSectionInstructions used when inheriting from another section. Any field omitted is inherited.
      - `contentPrompt` string — Override the inherited content prompt.
      - `writingStylePrompt` string — Override the inherited writing style prompt.
      - `miscPrompt` string — Override the inherited misc prompt.
    - `outputSchema` union
      - GuidedStringNode
        - `type` 'string', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `default` string, nullable — If nothing is outputted, this default is used. When `enum` is set, the default must be one of the enum values.
        - `enum` string[] — Can be used to guide the LLM with specific values to output.
        - `pattern` string, nullable — Can be used to constrain the LLM to output a specific pattern.
      - GuidedNumberNode
        - `type` 'number', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `default` number, nullable — If nothing is outputted, this default is used.
        - `enum` number[] — Can be used to guide the LLM with specific values to output.
        - `minimum` number, nullable — Use if a minimum value applies.
        - `maximum` number, nullable — Use if a maximum value applies.
      - GuidedBoolNode
        - `type` 'boolean', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `default` boolean, nullable — If nothing is outputted, this default is used.
      - GuidedArrayNode
        - `type` 'array', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `items` GuidedOutputSchema, required — recursive
        - `itemFormat` string — Format string used to render each array item in the generated output. Use the `{item}` placeholder for the item value.
        - `minItems` integer, nullable — Minimum number of array items to generate.
        - `maxItems` integer, nullable — Maximum number of array items to generate.
      - GuidedObjectNode
        - `type` 'object', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `fieldFormat` string — Free-form format string that controls how an object's fields are rendered into the final text output. Operates in one of two modes determined by which placeholders appear: **Subheading mode** (default: `"{key}: {value}\n"`): triggered when the format contains both `{key}` and `{value}`. Applied per field — each field becomes a key/value line. When a field has no relevant input/output and no `default` is set, the entire key/value line for that field is omitted from the rendered output. **Object mode** (e.g. `"{name} ({age})"`): triggered when `{key}` and `{value}` are absent. Placeholders must be actual field keys defined in `fields`. Applied once for the whole object, composing all fields into a single string. When a field has no relevant input/output and no `default` is set, its placeholder is replaced with an empty string (`""`). Validation rules: format must not be empty; if either `{key}` or `{value}` appears, both must be present; in subheading mode no extra placeholders are allowed; in object mode every placeholder must match a defined field key.
        - `fields` GuidedFieldDefinition[] — Define what fields are possible to return in the object.
          - `key` string, required — Use to set a key to reference.
          - `description` string, required — Guide the LLM in what to output for this node. Supplements the section-level instructions.
          - `value` GuidedOutputSchema, required — recursive
          - `default` string, nullable — If nothing is outputted for this field, this default value is used in the rendered output.

## Response `201`

Created — returns raw (unresolved) section version

- GuidedSectionVersion — A section version. When embedded inside a Section resource (e.g. GET /sections/:id), inheritance is fully resolved. When returned directly from version endpoints (GET/LIST/POST .../versions/...), contains raw authored values without inheritance.
  - `id` string, uuid, required — The UUID of the section version.
  - `versionNumber` integer, required — Starts at 0 and auto-increments.
  - `deletedAt` string, date-time, nullable — Present when the section version has been deleted.
  - `generation` GuidedSectionGeneration, required
    - `heading` string, required — The heading of this section. Passed to the LLM.
    - `instructions` GuidedSectionInstructions, required
      - `contentPrompt` string, required — The content prompt instructs the model what to include for synthesis. For `documentationMode: routed_parallel` this impacts what facts to route to this section.
      - `writingStylePrompt` string — The writingStyle prompt instructs the model in what tone and style to output.
      - `miscPrompt` string — Optional free-form prompt for any instructions that don't fit contentPrompt or writingStylePrompt.
    - `outputSchema` union, required
      - GuidedStringNode
        - `type` 'string', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `default` string, nullable — If nothing is outputted, this default is used. When `enum` is set, the default must be one of the enum values.
        - `enum` string[] — Can be used to guide the LLM with specific values to output.
        - `pattern` string, nullable — Can be used to constrain the LLM to output a specific pattern.
      - GuidedNumberNode
        - `type` 'number', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `default` number, nullable — If nothing is outputted, this default is used.
        - `enum` number[] — Can be used to guide the LLM with specific values to output.
        - `minimum` number, nullable — Use if a minimum value applies.
        - `maximum` number, nullable — Use if a maximum value applies.
      - GuidedBoolNode
        - `type` 'boolean', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `default` boolean, nullable — If nothing is outputted, this default is used.
      - GuidedArrayNode
        - `type` 'array', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `items` GuidedOutputSchema, required — recursive
        - `itemFormat` string — Format string used to render each array item in the generated output. Use the `{item}` placeholder for the item value.
        - `minItems` integer, nullable — Minimum number of array items to generate.
        - `maxItems` integer, nullable — Maximum number of array items to generate.
      - GuidedObjectNode
        - `type` 'object', required
        - `description` string — Guide the LLM in what to output for this node. Supplements the section-level instructions.
        - `fieldFormat` string — Free-form format string that controls how an object's fields are rendered into the final text output. Operates in one of two modes determined by which placeholders appear: **Subheading mode** (default: `"{key}: {value}\n"`): triggered when the format contains both `{key}` and `{value}`. Applied per field — each field becomes a key/value line. When a field has no relevant input/output and no `default` is set, the entire key/value line for that field is omitted from the rendered output. **Object mode** (e.g. `"{name} ({age})"`): triggered when `{key}` and `{value}` are absent. Placeholders must be actual field keys defined in `fields`. Applied once for the whole object, composing all fields into a single string. When a field has no relevant input/output and no `default` is set, its placeholder is replaced with an empty string (`""`). Validation rules: format must not be empty; if either `{key}` or `{value}` appears, both must be present; in subheading mode no extra placeholders are allowed; in object mode every placeholder must match a defined field key.
        - `fields` GuidedFieldDefinition[] — Define what fields are possible to return in the object.
          - `key` string, required — Use to set a key to reference.
          - `description` string, required — Guide the LLM in what to output for this node. Supplements the section-level instructions.
          - `value` GuidedOutputSchema, required — recursive
          - `default` string, nullable — If nothing is outputted for this field, this default value is used in the rendered output.

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/corti/apis/admin-api.md) · [All operations](https://skmtc.net/corti/apis/admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/corti/admin-api/revisions/5d1895a1b3fc/schema)
