---
title: "Parse and validate a CSV of recipients before creating or updating a task; nothing is saved"
method: POST
path: "/v1/tasks/csv-preview"
---

# Parse and validate a CSV of recipients before creating or updating a task; nothing is saved

`POST /v1/tasks/csv-preview`

## Request

- Base URL: `https://volai.cz`
- URL: `https://volai.cz/v1/tasks/csv-preview`
- Auth: HTTP bearer

Parses and validates a recipient CSV BEFORE creating or updating a task - nothing is saved, per-row errors go into the `errors` array of a 200 response, not an HTTP error.

## Request body

- object
  - `csv` string, required: CSV text to preview before saving a task. The response reports valid recipients and row errors; this request never creates or starts a task.

## Response `200`

Parsed CSV with per-row errors

- object
  - `headers` string[], required
  - `delimiter` ',' | ';', required
  - `rows` object[], required
    - `line` number, required
    - `phone` string
    - `variables` object, required
    - `errors` object[], required
      - `field` string, required
      - `message` string, required
      - `row` number
  - `validRows` object[], required
    - `phone` string, required
    - `variables` object, required
  - `errors` object[], required
    - `field` string, required
    - `message` string, required
    - `row` number

## Other responses

- `400`: Error codes: validation (request).
- `401`: Error codes: unauthorized (request).
- `403`: Error codes: account_suspended (account).
- `429`: Error codes: rate_limited (busy).
- `500`: Error codes: internal_error (service).

---

[API](https://skmtc.dev/volai/apis/volai-rest-api.md) · [All operations](https://skmtc.dev/volai/apis/volai-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/volai/apis/volai-rest-api/revisions/12029b05e2fa?raw)
