---
title: "Edit Custom Code"
method: PUT
path: "/api/v1/configurations/{configuration_id}/custom-codes"
tags: ["configurations"]
---

# Edit Custom Code

`PUT /api/v1/configurations/{configuration_id}/custom-codes`

## Request

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

Modify a configuration's custom code based on system_key/code pair.

Args:
    configuration_id (UUID): The ID of the configuration to modify.
    body (UpdateCustomCodeInput): User-provided object containing custom code info.
    user (dict[str, Any]): The logged-in user.
    db (AsyncDatabaseConnection): The database connection.
    logger (Logger): The system logger.

Raises:
    HTTPException: 409 if configuration is not a draft and therefore not editable
    HTTPException: 500 if the configuration can't be updated

Returns:
    ConfigurationCustomCodeResponse: The updated configuration.

## Path parameters

- `configuration_id` string, uuid, required

## Request body

- UpdateCustomCodeInput: Input model when updating a config's custom code.
  - `id` string, uuid, required
  - `system_id` string, uuid, required
  - `code` string, required
  - `display_name` string, required

## Response `200`

Successful Response

- CustomCodeResponse: Custom code object to return to the client.
  - `id` string, uuid, required
  - `display_name` string, required
  - `code` string, required
  - `system_id` string, uuid, required
  - `system_display_name` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-23** `c710294a0d33`: 3 breaking, 1 warning, 2 info
  - added the new required request property `display_name`
  - removed the required property `display` from the response with the `200` status
  - removed the required property `system_name` from the response with the `200` status
  - removed the request property `display`
  - …2 more
- **2026-08-05** `fe92c259d0f5`: 3 breaking, 4 info
  - removed the required property `code_sets` from the response with the `200` status
  - removed the required property `custom_codes` from the response with the `200` status
  - removed the required property `display_name` from the response with the `200` status
  - added the required property `code` to the response with the `200` status
  - …3 more
- **2026-07-28** `790b3ade4deb`: 5 breaking, 5 warning, 4 info
  - added the new required request property `display`
  - added the new required request property `id`
  - added the new required request property `system_id`
  - removed the required property `custom_codes/items/name` from the response with the `200` status
  - …10 more
- **2026-06-03** `6c1358bbda83`: 3 breaking, 2 warning, 1 info
  - added the new required request property `new_system_key`
  - added the new required request property `system_key`
  - removed the required property `custom_codes/items/system` from the response with the `200` status
  - removed the request property `new_system`
  - …2 more
- …earlier changes not shown

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

---

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