---
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` string, required

## Response `200`

Successful Response

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

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-09** `fca481966403`: 6 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 `code_sets` from the response with the `200` status
  - …11 more
- **2026-06-01** `808af89fc071`: 1 warning
  - added the new `CVX` enum value to the `custom_codes/items/system` response property for the response status `200`
- **2026-03-17** `b897bdc3b9ef`: 1 warning
  - added the new `Other` enum value to the `custom_codes/items/system` response property for the response status `200`

[Operation history](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner-2/changes/api/v1/configurations/:configuration_id/custom-codes/put.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)
