logo
LeadsImport leads from CSV
Leads

Import leads from CSV

Upload a CSV file to bulk import leads. Supports:

  • Auto-detection of column mappings (email, firstName, lastName, company, jobTitle, phone, linkedinUrl, city, state, country, timezone, notes, etc.)
  • Custom mapping via the mapping field for non-standard column names
  • Data cleanup (default on): normalizes emails, phone numbers, LinkedIn URLs, strips special chars
  • Deduplication (default on): skips leads that already exist by email. Set to false to update existing leads.
  • Unrecognized columns are stored as custom fields on the lead
  • Maximum 50,000 rows per file, 50 MB file size limit
  • Processed in batches of 1,000 with up to 10 concurrent batches
curl -X POST "https://api.sendkit.ai/v1/leads/import/csv" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  --form file=example_string \
  --form mapping=example_string \
  --form skipDuplicates=true \
  --form dataCleanup=true \
  --form tag=example_string
{
  "success": true,
  "data": {
    "imported": 180,
    "updated": 0,
    "skipped": 15,
    "failed": 5,
    "importedLeadIds": [
      "665d4e5f6a7b8c9d0e1f2a3b"
    ],
    "errors": [
      {
        "email": "not-an-email",
        "error": "Invalid email format"
      }
    ],
    "csvInfo": {
      "totalRows": 200,
      "columns": [
        "Email",
        "First Name",
        "Last Name",
        "Company",
        "Title",
        "Industry"
      ],
      "mapping": {
        "Email": "email",
        "First Name": "firstName",
        "Last Name": "lastName",
        "Company": "companyName",
        "Title": "jobTitle",
        "Industry": "custom:Industry"
      }
    }
  }
}
POST
/v1/leads/import/csv
POST
API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Bearer Token
Bearer Tokenstring
Required

API key as Bearer token

API key as Bearer token
Content-Typestring
Required

The media type of the request body

Options: multipart/form-data
filestring
Required

CSV file with headers. Must contain an email column.

Format: binary
mappingstring

JSON string mapping CSV column headers to lead fields. Example: {"Email Address": "email", "First": "firstName", "Company": "companyName"} If omitted, columns are auto-detected from common header aliases. Use "skip" to ignore a column. Unmapped columns become custom fields.

skipDuplicatesstring

Skip leads whose email already exists (false = update existing)

Options: true, false
dataCleanupstring

Normalize emails, phone numbers, names

Options: true, false
tagstring

Tag to apply to all imported leads

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

header
Authorizationstring
Required

Bearer token. API key as Bearer token

Body

multipart/form-data
filefile
Required

CSV file with headers. Must contain an email column.

mappingstring

JSON string mapping CSV column headers to lead fields. Example: \\{"Email Address": "email", "First": "firstName", "Company": "companyName"\\} If omitted, columns are auto-detected from common header aliases. Use "skip" to ignore a column. Unmapped columns become custom fields.

skipDuplicatesstring

Skip leads whose email already exists (false = update existing)

Allowed values:truefalse
dataCleanupstring

Normalize emails, phone numbers, names

Allowed values:truefalse
tagstring

Tag to apply to all imported leads

Responses