API Docs / Operations / Clients - CSV Import / Upload Client CSV

Upload Client CSV

POST /tenants/{tenant}/clients/import/csv

Uploads a CSV file for importing clients. With showPreview=true (default), returns 201 with preview data. With showPreview=false and a mapping provided, returns 202 and starts import.

Header Detection:

  • If hasHeaderRow is provided, that value is used
  • If hasHeaderRow is omitted, the system auto-detects by analyzing the first row for known header patterns (e.g., "Company Name", "Email") and data patterns (e.g., email addresses, phone numbers)
  • The response includes the actual hasHeaderRow value used (whether explicit or auto-detected)

Synthetic Headers:
When hasHeaderRow is false (explicitly or detected), the system generates synthetic column headers: Column1, Column2, Column3, etc. Use these synthetic names when creating column mappings for headerless CSV files.

Parameters

NameTypeDescription
tenant* path string

The Tenant.Code

The Tenant.Code

Request Body

multipart/form-data
{
  "file": "string",
  "hasHeaderRow": false,
  "showPreview": false,
  "mappingCode": "string",
  "columnMappingsJson": "string"
}

Responses

202 Accepted
400 Bad Request
401 Unauthorized – Invalid or missing API key
403 Forbidden