---
title: "Create section"
method: POST
path: "/documents/sections/"
tags: ["Guided Sections"]
---

# Create section

`POST /documents/sections/`

Creates a new section with an initial version. When `publish` is true (default),
the response includes the published version with full inheritance resolution applied
(section inheritance chain walked to fill missing fields).

## Headers

- `Tenant-Name` string, required — Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.

## Request body

- union
  - GuidedSectionsCreateFromInheritanceRequest — Creates a section that inherits from another section. Any fields omitted in `generation` are inherited from the referenced section's published version; any fields provided override the inherited values.
    - `name` string, required — A human-readable identifier for this section. Not passed to the LLM.
    - `description` string — A description for this section. Not passed to the LLM.
    - `languages` string[] — BCP 47 language tags this section has been tweaked for.
    - `regions` string[] — ISO 3166-1 alpha-3 country codes this section has been tweaked for.
    - `specialties` string[] — Clinical specialties this section has been tweaked for.
    - `labels` GuidedLabel[] — Labels work as query param filter in the LIST /sections endpoint.
      - `key` string, required
      - `value` string, required
    - `publish` boolean — Defaults to true when omitted. Set this to false if you do not want the section to automatically show up in LIST /sections.
    - `inheritFromId` string, uuid, required — Reference to the section to inherit generation configuration from. Inherits from the published version of the referenced section.
    - `generation` GuidedSectionGenerationPartial — 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.
  - GuidedSectionsCreateFromScratchRequest — Creates a section from scratch with an explicit generation configuration. All required fields on `generation` apply.
    - `name` string, required — A human-readable identifier for this section. Not passed to the LLM.
    - `description` string — A description for this section. Not passed to the LLM.
    - `languages` string[] — BCP 47 language tags this section has been tweaked for.
    - `regions` string[] — ISO 3166-1 alpha-3 country codes this section has been tweaked for.
    - `specialties` string[] — Clinical specialties this section has been tweaked for.
    - `labels` GuidedLabel[] — Labels work as query param filter in the LIST /sections endpoint.
      - `key` string, required
      - `value` string, required
    - `publish` boolean — Defaults to true when omitted. Set this to false if you do not want the section to automatically show up in LIST /sections.
    - `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.

## Response `201`

Created

- GuidedSection — Section metadata as returned by the LIST /documents/sections endpoint. Does not include the resolved `publishedVersion` — use GET /documents/sections/{sectionID} to fetch a single section with its published version resolved.
  - `id` string, uuid, required — The UUID of the section.
  - `inheritedFromId` string, uuid, nullable — Reference to the section to inherit generation configuration from. Inherits from published version by default.
  - `autoGenerated` boolean — True if the section was auto-generated as part of an inline section-composed POST /documents request.
  - `source` 'user' | 'corti' | 'project' — Whether this section was created by the user, a project-related API Client or is a Corti standard resource.
  - `name` string, required — The name of the section.
  - `languages` string[], required — BCP 47 languages this section has been tweaked for. Empty means no language-specific tweaks.
  - `regions` string[], required — ISO 3166-1 alpha-3 country codes this section has been tweaked for. Empty means no region-specific tweaks.
  - `specialties` string[], required — Clinical specialties this section has been tweaked for. Empty means no specialty-specific tweaks.
  - `description` string — The description for the section.
  - `labels` GuidedLabel[], required — The labels available to use as query param filter in the LIST /sections endpoint.
    - `key` string, required
    - `value` string, required
  - `createdBy` string, uuid — The UUID of the creator of this section.
  - `createdAt` string, date-time, required — The original timestamp when the section was created.
  - `updatedAt` string, date-time, required — The original timestamp when the section was last updated.
  - `deletedAt` string, date-time, nullable — Present when the section has been deleted. GET by ID still returns the full resource with this field populated.
  - `publishedVersion` 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

---

[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/versions/5d1895a1b3fc/schema)
