---
title: "Bulk Delete Custom Codes"
method: POST
path: "/api/v1/configurations/{configuration_id}/custom-codes/bulk-delete"
tags: ["configurations"]
---

# Bulk Delete Custom Codes

`POST /api/v1/configurations/{configuration_id}/custom-codes/bulk-delete`

## Request

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

Deletes custom codes in bulk for a given configuration.

Args:
    configuration_id (UUID): The ID of the configuration to modify.
    body (BulkDeleteCustomCodesInput): The input body containing IDs of the custom codes.
    user (DbUser): The logged-in user.
    db (AsyncDatabaseConnection): The database connection.

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

Returns:
    ConfigurationCustomCodeResponse: The updated configuration

## Path parameters

- `configuration_id` string, uuid, required

## Request body

- BulkDeleteCustomCodesInput: Input model for a bulk custom codes deletion request.
  - `ids` string[], required
  - `ids_to_skip` string[], required
  - `delete_all` boolean, required

## Response `200`

Successful Response

- CustomCodeResponse[]
  - `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`: 2 breaking, 2 info
  - removed the required property `items/display` from the response with the `200` status
  - removed the required property `items/system_name` from the response with the `200` status
  - added the required property `items/display_name` to the response with the `200` status
  - added the required property `items/system_display_name` to the response with the `200` status
- **2026-09-03** `17faf3275ffc`: 2 breaking
  - added the new required request property `delete_all`
  - added the new required request property `ids_to_skip`
- **2026-08-24** `88b861603742`: 1 info
  - endpoint added

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