---
title: "Upload Custom Codes Csv"
method: POST
path: "/api/v1/configurations/{configuration_id}/custom-codes/upload"
tags: ["configurations"]
---

# Upload Custom Codes Csv

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

## Request

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

Accepts a CSV payload in JSON body.

Expected CSV headers:
    code,code_system,display_name

Returns:
    UploadCustomCodesResponse

## Path parameters

- `configuration_id` string, uuid, required

## Request body

- UploadCustomCodesCsvInput: Input model for Custom Code CSV.
  - `csv_text` string, required: Full CSV contents as UTF-8 text
  - `filename` string, nullable

## Response `200`

Successful Response

- UploadCustomCodesPreviewResponse: Validated CSV preview for delayed confirmation; only valid if preview.
  - `preview_items` UploadCustomCodesPreviewItem[], required
    - `id` string, uuid, required
    - `code` string, required
    - `system_id` string, uuid, required
    - `system_name` string, required
    - `display` string, required
    - `row` integer, nullable
  - `codes_processed` integer, nullable
  - `total_custom_codes_in_configuration` integer, nullable
  - `code_systems` DbCodeSystem[], required
    - `id` string, uuid, required
    - `key` string, required
    - `display_name` string, required
    - `oid` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-09** `fca481966403`: 1 breaking, 2 info
  - removed the required property `preview` from the response with the `200` status
  - added the required property `code_systems` to the response with the `200` status
  - added the required property `preview_items` to the response with the `200` status
- **2026-06-01** `808af89fc071`: 1 warning, 2 info
  - removed the optional property `errors` from the response with the `200` status
  - the response property `preview` became required for the status `200`
  - response property `preview` list-of-types was narrowed by removing types `null` from media type `application/json` of response `200`
- **2026-03-17** `b897bdc3b9ef`: 1 info
  - endpoint added

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