Commit a previewed CSV upload — creates a new list, inserts rows, and dispatches enrichment.
dataType + mappings produced by the preview step.
For people imports the server extracts company firmographics from the CSV into list_company_rows and links each person to their company row. For companies imports only list_company_rows are created.
After the rows land, the list is flipped to enrichment_status = "enriching" and the bright-data-enrich Trigger.dev task is dispatched to fill in missing company data.
/api/lists/create-with-import with the preview verb. See Preview a create-with-import flow to upload the CSV/XLSX, auto-detect people vs. companies, and get mapping suggestions before committing.CREDIT_COSTS.IMPORT_LEAD per row.floor(balance / costPerLead) rows — the response still succeeds with a smaller imported count.402 Insufficient credits.imported — skipped duplicates and blocked rows are free.name (required), dataType ("people" or "companies"), csvText (from the preview response), personMapping / companyMapping (either or both as appropriate), skipExistingCustomers (default true).When to use this vs. updateListImport. Use create-with-import when you want a brand-new list in one shot. Use PUT /api/lists/{id}/import when you already have a list and want to add to it.Follow-up. The response includes listId. Fetch GET /api/lists/{id} (via the core list routes) to observe enrichment_status transitioning from enriching back to idle.On 402. Stop and surface the credit balance to the user. Do not retry — you need credits first.Truncation is silent. If total > imported and there was no 402, the caller ran out of credits mid-batch. Compare total vs. imported to detect this.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
JSON body. Either personMapping (for people) or companyMapping (for companies) should be populated; supply both for people imports when the CSV includes firmographic columns the server can lift into company rows.
Name for the new list. Required, non-empty.
1Detected or declared data shape. people imports create list_rows plus inferred list_company_rows; companies imports create list_company_rows only.
people, companies The exact csvText returned by the preview step. The server re-parses it.
1Field-name → CSV column-name map. null means no CSV column matched that field.
Field-name → CSV column-name map. null means no CSV column matched that field.
Default true. Skip rows present in other caller-owned lists (cross-list dedup) and rows matching the user's blocked_companies.
List created; rows imported. Response shape depends on dataType.
Shape depends on dataType. Both variants include listId and imported.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$New list_rows inserted (capped by available credits).
0 <= x <= 9007199254740991Rows skipped because their company is blocked.
0 <= x <= 9007199254740991Rows skipped because the person is already in another list.
0 <= x <= 9007199254740991Rows in the parsed CSV.
0 <= x <= 9007199254740991people Company rows created from embedded firmographic data.
0 <= x <= 9007199254740991