Overview
Naturalead provides a two-step CSV import process that lets you preview and map columns before committing leads to your account. This prevents data errors and gives you full control over how CSV columns map to lead fields.All imported leads are automatically deduplicated by phone number. If a lead with the same phone already exists in your account, it will be updated rather than duplicated.
Step 1: Upload CSV for Preview
Send your CSV file as a multipart form upload. The API parses the file and returns detected columns along with a sample of rows so you can verify the data before importing.columns— an array of detected column names from the CSV header rowrows— a sample of parsed rows for verificationuploadId— a temporary identifier to reference this upload in the confirm step
Step 2: Map Columns and Confirm Import
Once you have reviewed the preview, send a column mapping and theuploadId to confirm the import. The mapping tells Naturalead which CSV column corresponds to each lead field.
Field Mapping Rules
The mapping object maps CSV column names (keys) to Naturalead lead fields (values).| Lead Field | Required | Description |
|---|---|---|
phone | Yes | Phone number — used as the unique identifier for deduplication |
name | No | Lead’s full name |
email | No | Email address |
source | No | Where the lead came from (e.g., “website”, “referral”) |
"Company" to "company" will create a custom field called company on each lead.
Deduplication
Naturalead deduplicates leads by phone number within your account. During import:- If a lead with the same phone number already exists, the existing lead is updated with the new data.
- If no match is found, a new lead is created.
Tracking Imports with importBatchId
Every confirmed import generates a uniqueimportBatchId. Use this ID to:
- Filter leads by import batch using the List Leads API
- Track import history to see which leads came from which file
- Roll back imports by identifying and deleting all leads from a specific batch
Store the
importBatchId returned from the confirm response. It is the only way to identify which leads were part of a specific import.Error Handling
| Status Code | Meaning |
|---|---|
400 | Invalid CSV format, missing required phone mapping, or expired uploadId |
401 | Missing or invalid authentication |
413 | CSV file exceeds the maximum upload size |
422 | Column mapping references columns not found in the CSV |
429 | Rate limit exceeded — wait and retry |