---
title: "Import Accounts Csv"
method: POST
path: "/accounts/import/csv"
tags: ["accounts"]
---

# Import Accounts Csv

`POST /accounts/import/csv`

## Request

- Base URL: `https://dev.whispa.net` (the document declares no server; this is the origin it was published from)
- URL: `https://dev.whispa.net/accounts/import/csv`
- Auth: one of:
  - OAuth 2
    - Password
    - Token URL: `auth/bearer/login`
  - API key in cookie `access_token`

Import full account rows when provider-side sync is unavailable.

Canonical identity/debt fields feed the normal Accounts and campaign
surfaces; every original column is retained on the account for audit and
display. The whole file is validated before the atomic upsert begins.

## Request body `multipart/form-data`

- BodyAccountsImportAccountsCsv
  - `file` string, binary, required: UTF-8 CSV export, up to 10 MB.

## Response `201`

Successful Response

- CsvAccountImportResult: Outcome of one atomic, server-validated CSV account import.
  - `run` AccountSyncRunRead, required
    - `id` string, uuid, required
    - `provider` string, required
    - `mode` string, required
    - `client_id` string, nullable
    - `status` string, required
    - `synced` integer, required
    - `total` integer, nullable
    - `processed` integer
    - `stalled` boolean
    - `not_found` string[]
    - `error` string, nullable
    - `started_at` string, date-time, required
    - `finished_at` string, date-time, nullable
    - `created_by` string, uuid, nullable
  - `total_rows` integer, required
  - `imported` integer, required
  - `created` integer, required
  - `updated` integer, required
  - `skipped` integer, required
  - `warnings` string[]

## Other responses

- `422`: Validation Error

---

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