---
title: "Import a CSV file"
method: POST
path: "/v2/csv-imports"
tags: ["CSV Imports"]
---

# Import a CSV file

`POST /v2/csv-imports`

## Request

- Base URL: `https://api.prod.goaugment.com`
- URL: `https://api.prod.goaugment.com/v2/csv-imports`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/goaugment/apis/augment-api/docs/v2/csv-imports/post.ts> (a function with typed inputs; its response is checked against the schema)

Submit a CSV file for asynchronous ingestion into Augment. The request body is the raw file content, sent with `Content-Type: text/csv` — not a multipart upload. The brokerage that owns the import is resolved from the API key used to authenticate the request.

A `202` response means the file was accepted and enqueued, not that every row was imported. Processing happens asynchronously; row-level mapping failures surface on the ingest event referenced by `ingestId`, not in this response.

`mappingName` selects the CSV column mapping to apply: either a global default mapping or one configured specifically for your brokerage. If no mapping with that name is configured, the request fails with `CSV_IMPORT_UNKNOWN_MAPPING_NAME`. Contact Augment to have a mapping configured before using this endpoint.

Files are capped at 5 MB, and each brokerage may submit at most 50 files per UTC day.

## Query parameters

- `mappingName` string, required

## Request body `text/csv`

- string, binary

## Response `202`

CSV import accepted

- CsvImportAcceptedResponse
  - `ingestId` string, required: Ingest event id; row-level results surface asynchronously on it.

## Other responses

- `400`: Malformed request; do not retry without changing it. `errorCode` identifies the specific failure: `CSV_IMPORT_MISSING_MAPPING_NAME` (the `mappingName` query parameter was not sent), `CSV_IMPORT_INVALID_BODY` (the request body was not raw CSV content — for example an empty body), `CSV_IMPORT_EMPTY_FILE` (the file had no non-blank lines), `CSV_IMPORT_FILE_TOO_LARGE` (the file exceeds 5 MB), `CSV_IMPORT_MISSING_HEADER_ROW` (fewer than two non-blank lines, so there is no header plus at least one data row), or `CSV_IMPORT_UNKNOWN_MAPPING_NAME` (no mapping with that name is configured for your brokerage or globally).
- `403`: Forbidden
- `429`: Daily file cap reached for this brokerage. Retry after midnight UTC; do not retry sooner.

---

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