---
title: "Update Section"
method: PATCH
path: "/api/v1/configurations/{configuration_id}/sections"
tags: ["configurations"]
---

# Update Section

`PATCH /api/v1/configurations/{configuration_id}/sections`

## Request

- The document declares no server URL.
- Auth: none declared

Update a section entry for a configuration.

Args:
    configuration_id (UUID): ID of the configuration to update
    section_input (SectionUpdateInput): Updated section info
    user (DbUser): The logged-in user
    db (AsyncDatabaseConnection): Database connection

Raises:
    HTTPException: 400 if the code is not valid, code is in use,
        name is in use, the section is system-skipped
        (`DisabledSection`) and therefore not configurable, the
        narrative/action combination is unsupported (e.g.
        narrative="reconstruct" or "keep_on_match" with
        action="retain"), or narrative "reconstruct" targets a
        section without a registered reconstructor
    HTTPException: 404 if configuration isn't found
    HTTPException: 409 if configuration is not a draft and therefore not editable
    HTTPException: 500 if section processing can't be updated

Returns:
    UpdateSectionProcessingResponse: The message to show the user

## Path parameters

- `configuration_id` string, uuid, required

## Request body

- SectionUpdateInput: Input model for updating a section's processing instructions.
  - `include` boolean, nullable
  - `narrative` 'retain' | 'remove' | 'reconstruct' | 'keep_on_match', nullable
  - `action` 'retain' | 'refine', nullable
  - `name` string, nullable
  - `current_code` string, required
  - `new_code` string, nullable

## Response `200`

Successful Response

- UpdateSectionProcessingResponse: Section with information for a custom section update.
  - `section_updated_code` string, required
  - `disabled_section` DisabledSection[], required
  - `narrative_only_section` NarrativeOnlySection[], required
  - `reconstructable_section` ReconstructableSection[], required
  - `narrative_data_labels` NarrativeDataLabels, required: Enum class to type the narrative actions possible for the frontend.
    - `retain` 'Keep original'
    - `keep_on_match` 'Keep on match'
    - `reconstruct` 'Reconstruct'
    - `remove` 'Exclude'
  - `coded_data_labels` CodedDataLabels, required: Enum class to type the narrative actions possible for the frontend.
    - `retain` 'Keep original'
    - `refine` 'Refine'

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-09** `fca481966403`: 2 breaking, 7 info
  - removed `subschema #1` from the `narrative` request property `anyOf` list
  - the response's body type changed from `string` to `object` for status `200`
  - added `#/components/schemas/DbNarrativeAction` to the `narrative` request property `anyOf` list
  - added the required property `coded_data_labels` to the response with the `200` status
  - …5 more
- **2026-06-01** `808af89fc071`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner-2/changes/api/v1/configurations/:configuration_id/sections/patch.md)

---

[API](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner-2.md) - [All operations](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner-2/llms.txt) - [OpenAPI document](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner-2/revisions/fca481966403?raw)
