# Import a CSV of leads

> Import handles and custom fields from CSV text (up to 200 KB) into a contact list. This is how you hand Xholic first lines you wrote: add a column such as first_line and use [first_line] in the campaign template. Call it only when the user asked for this in the conversation; never on your own initiative.

`dm.import_csv` · write

- **MCP tool:** `dm_import_csv`. Catalog: reach it with `find_actions` and `run_write_action`, or turn on the full toolset.
- **REST:** `POST /v1/dm/import-csv`
- **CLI:** `xholic dm import-csv`
- **Scope:** `write`
- **Plan:** Pro plan or higher
- **Cost:** Free.
- **Rate limit bucket:** `write`

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `csv` | string | Yes | The CSV text, with a header row. |
| `handleColumn` | string ≤ 80 chars or null | No | Header of the column holding X handles; detected when left out. |
| `fieldMap` | object | No | CSV header to field key (lowercase, e.g. first_line), or null to ignore a column. |
| `listId` | string (uuid) or null | No | Contact list to import into. |
| `newListName` | string ≤ 80 chars or null | No | Name for a new list instead. Pass exactly one of listId or newListName. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |
| `dryRun` | boolean | No | Return exactly what would happen without doing it. |
| `idempotencyKey` | string ≤ 200 chars | No | A unique key for this write. Repeating a call with the same key returns the first result instead of acting twice. |
