> ## Documentation Index
> Fetch the complete documentation index at: https://api.smartlead.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Leads to List

> Import leads into a specific lead list

<Note>
  Bulk import leads into a list. Each lead object should contain at least an email field. Custom fields and CSV settings can be configured.
</Note>

## Path Parameters

<ParamField path="id" type="number" required>
  The ID of the lead list to import into
</ParamField>

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

## Request Body

<ParamField body="leadList" type="array" required>
  Array of lead objects to import. Each lead should contain at minimum an email field, plus any additional fields like first\_name, last\_name, company, etc.
</ParamField>

<ParamField body="fileName" type="string" required>
  A name to identify this import batch (e.g., the source CSV filename)
</ParamField>

<ParamField body="emailFieldsAdded" type="object">
  Mapping of email fields in your data
</ParamField>

<ParamField body="customFields" type="object">
  Custom field definitions for your lead data
</ParamField>

<ParamField body="csvSettings" type="object">
  Import settings including `ignoreGlobalBlockList` (boolean) to skip blocked domain checking
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/lead-list/500/import?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "leadList": [
        {"email": "john@company.com", "first_name": "John", "last_name": "Doe", "company": "ACME Corp"},
        {"email": "jane@startup.io", "first_name": "Jane", "last_name": "Smith", "company": "Startup Inc"}
      ],
      "fileName": "enterprise-prospects-jan2025.csv",
      "csvSettings": {
        "ignoreGlobalBlockList": false
      }
    }'
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Request successful
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Invalid request parameters or malformed request body
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key
</ResponseField>

<ResponseField name="422" type="Validation Error">
  Request validation failed. Check parameter types and constraints.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "data": {
      "total_leads": 2,
      "imported": 2,
      "duplicates": 0,
      "blocked": 0
    }
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```
</ResponseExample>
