---
title: "Detect CSV structure"
method: PUT
path: "/migration/csv/detect"
tags: ["migration"]
---

# Detect CSV structure

`PUT /migration/csv/detect`

Analyzes a CSV file and returns auto-detected columns, delimiter, quote character, and date format with suggested column mappings.

## Response `200`

Detection results with suggested mappings

- CsvDetectionResult
  - `columns` string[]
  - `date_format` string
  - `delimiter` string
  - `preview_rows` array[]
    - string[]
  - `quote_char` string
  - `suggested_mapping` CsvColumnMapping[]
    - `attribute` 'title' | 'description' | 'due_date' | 'start_date' | 'end_date' | 'done' | 'priority' | 'labels' | 'project' | 'reminder' | 'ignore'
    - `column_index` integer
    - `column_name` string

## Other responses

- `400` — Invalid CSV file
- `500` — Internal server error

---

[API](https://skmtc.net/go-vikunja/apis/vikunja-api.md) · [All operations](https://skmtc.net/go-vikunja/apis/vikunja-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/go-vikunja/vikunja-api/revisions/feb3f68bbdf1/schema)
