---
title: "import rows (CSV)"
method: POST
path: "/datasets/{id}/rows/import"
tags: ["Dataset CRUD"]
---

# import rows (CSV)

`POST /datasets/{id}/rows/import`

## Request

- Base URL: `https://api.riveterhq.com/v1`
- URL: `https://api.riveterhq.com/v1/datasets/{id}/rows/import`
- Auth: HTTP bearer

Append rows from a CSV whose header row holds column names. Input column values become the row's input; output column values land as `manual` cells. Send the CSV as the body (`text/csv`), as a multipart `file`, or as the `csv` string of a JSON body (2 MB max). Up to 1,000 rows land at once (`201`); a bigger file is imported in the background (`202`; [GET /datasets/{id}](#tag/dataset-crud/get/datasets/{id}) shows `import_in_progress`). Duplicates on the index column are skipped.

## Path parameters

- `id` string, required

## Request body

- object
  - `csv` string, required: The CSV text. First row = input and / or output column names.

## Response `201`

The rows landed in this request

- DatasetImportResult
  - `import` object
    - `status` 'done' | 'importing'
    - `rows` integer: Rows in the file
    - `rows_added` integer, nullable: Null while importing
    - `skipped_duplicates` integer, nullable: Null while importing
  - `row_count` integer: The dataset's row count after this request (staged rows included)

## Other responses

- `202`: The file was accepted and is landing from a job (`import.status` is `importing`)
- `400`: The request is malformed or names a conflicting parameter combination
- `401`: Missing or invalid API key (`request_status` body — see the AuthError schema)
- `403`: The API key's account may not access this resource or endpoint (`forbidden`), or the account has not migrated to Datasets yet (`feature_not_enabled` — open Datasets in the app and click "Migrate to Datasets")
- `404`: No resource with that id on this account
- `413`: The body is over the 2 MB limit
- `422`: The request is valid but can't be executed (e.g. insufficient_credits, credit_cap_exceeded when max_credits is set, validation failure)

## Changes

- **2026-11-13** `fac56b649559`: 2 info
  - api tag `Dataset CRUD` added
  - api tag `Datasets` removed
- **2026-10-30** `dcb4d45ade1a`: 10 info
  - added the optional property `error/credit_detail/estimate/oneOf[#/components/schemas/CreditEstimate]/typical` to the response with the `400` status
  - added the optional property `error/credit_detail/estimate/oneOf[#/components/schemas/CreditEstimate]/typical` to the response with the `403` status
  - added the optional property `error/credit_detail/estimate/oneOf[#/components/schemas/CreditEstimate]/typical` to the response with the `404` status
  - added the optional property `error/credit_detail/estimate/oneOf[#/components/schemas/CreditEstimate]/typical` to the response with the `413` status
  - …6 more
- **2026-10-19** `76aabcc5686b`: 2 info
  - api tag `Datasets` added
  - api tag `Datasets (beta)` removed
- **2026-10-13** `029668894d33`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/riveterhq/apis/riveter-api/changes/datasets/:id/rows/import/post.md)

---

[API](https://skmtc.dev/riveterhq/apis/riveter-api.md) - [All operations](https://skmtc.dev/riveterhq/apis/riveter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/riveterhq/apis/riveter-api/revisions/fac56b649559?raw)
