---
title: "Clean Api"
method: POST
path: "/v1/clean"
---

# Clean Api

`POST /v1/clean`

## Request

- Base URL: `https://check.orvel.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://check.orvel.dev/v1/clean`
- Auth: none declared

## Request body

- CleanInput
  - `csv_text` string, required: UTF-8 CSV text, including the header; no URLs, paths, XLSX, or formulas to execute.
  - `schema` CsvSchema, required
    - `columns` Column[], required
      - `name` string, required: Exact, case-sensitive header after any cleanup rename.
      - `type` 'string' | 'integer' | 'decimal' | 'boolean' | 'date' | 'email'
      - `required` boolean: Reject an empty value. Every declared header must exist regardless.
      - `unique` boolean: Require non-empty raw strings to be unique within this column.
      - `choices` string[], nullable: Optional exact allowed strings, checked before type conversion.
      - `minimum` string, nullable: Inclusive numeric bound, as a decimal string. Numeric columns only.
      - `maximum` string, nullable: Inclusive numeric bound, as a decimal string. Numeric columns only.
      - `max_length` integer
    - `allow_extra_columns` boolean
  - `delimiter` ',' | ';' | '	' | '|'
  - `cleanup` Cleanup, required
    - `rename` object: Original header to new header; simultaneous rename, no dropping columns.
    - `changes` Change[]: Applied in order to explicitly named original columns only.
      - `column` string, required: Original header before any renaming.
      - `action` 'trim' | 'lowercase' | 'uppercase' | 'decimal_comma', required
    - `spreadsheet_safe` boolean: Prefix cells starting with spreadsheet formula markers with an apostrophe. Output is then revalidated; numeric negatives may fail numeric types.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/orvel/apis/import-check.md) · [All operations](https://skmtc.dev/orvel/apis/import-check/llms.txt) · [OpenAPI document](https://skmtc.dev/orvel/apis/import-check/revisions/c54ef2674738?raw)
