logo
Campaign LeadsImport leads from CSV into campaign
Campaign Leads

Import leads from CSV into campaign

Upload a CSV file to create leads and add them to the campaign in a single operation.

  • Maximum file size: 50 MB
  • Maximum rows: 50,000
  • Automatically detects email, firstName, lastName, companyName, jobTitle columns by common aliases
  • Unrecognized columns are stored as custom fields on the lead
  • Existing leads (by email) are reused, not duplicated
  • Duplicate campaign leads are skipped
  • Processes in batches of 1,000 for performance
curl -X POST "https://api.sendkit.ai/v1/campaigns/example_string/leads/import/csv" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  --form file=example_string
{
  "success": true,
  "data": {
    "leads": {
      "created": 180,
      "existing": 15,
      "failed": 5
    },
    "campaign": {
      "added": 190,
      "skipped": 5
    },
    "totalRows": 200,
    "errors": [
      {
        "email": "not-an-email",
        "error": "Invalid email"
      }
    ]
  }
}
POST
/v1/campaigns/{id}/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
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

Path Parameters

idstring
Required

Resource ID

Body

multipart/form-data
filefile
Required

CSV file with headers. Must contain an email column.

Responses