Skip to main content
POST
/
v1
/
leads
curl -X POST https://api.sendpilot.ai/v1/leads \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignId": "camp_xyz789",
    "leads": [
      {
        "linkedinUrl": "https://www.linkedin.com/in/john-doe",
        "firstName": "John",
        "lastName": "Doe",
        "company": "TechCorp",
        "title": "VP of Engineering",
        "industry": "Technology",
        "region": "North America"
      },
      {
        "linkedinUrl": "https://www.linkedin.com/in/jane-smith",
        "firstName": "Jane",
        "lastName": "Smith",
        "referredBy": "Conference 2024",
        "customScore": 85,
        "icebreaker": "Loved your talk on AI automation"
      }
    ]
  }'
{
  "success": true,
  "leadsAdded": 2,
  "duplicatesSkipped": 0,
  "invalidEntries": 0
}

Documentation Index

Fetch the complete documentation index at: https://docs.sendpilot.ai/llms.txt

Use this file to discover all available pages before exploring further.

Add new leads to an existing campaign. The leads will be queued for processing according to the campaign’s sequence.

Request

X-API-Key
string
required
Your API key
campaignId
string
required
The campaign ID to add leads to
leads
array
required
Array of lead objects to add (max 100 per request)
Custom fields: You can pass any additional custom fields as flat properties directly on each lead object. See the Dynamic/Custom Fields section below for details.

Dynamic/Custom Fields

Leads support dynamic custom fields that can be passed as flat properties alongside the required linkedinUrl. This allows you to include any additional data for personalization in your campaign messages.
How it works: Simply add any custom key-value pairs directly to the lead object. There’s no need for a nested customFields object—all properties are accepted at the top level.
Common use cases for custom fields:
  • industry - Lead’s industry for targeted messaging
  • region - Geographic region for localized outreach
  • referredBy - Referral source tracking
  • customScore - Lead scoring from your CRM
  • eventName - Conference or event where you met
  • icebreaker - Pre-written personalized opener

Response

success
boolean
Whether the operation completed successfully
leadsAdded
integer
Number of leads successfully added
duplicatesSkipped
integer
Number of leads skipped (already exist in campaign)
invalidEntries
integer
Number of leads with invalid data
errors
array
Array of error objects for leads that failed validation (only present if there are errors)
curl -X POST https://api.sendpilot.ai/v1/leads \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignId": "camp_xyz789",
    "leads": [
      {
        "linkedinUrl": "https://www.linkedin.com/in/john-doe",
        "firstName": "John",
        "lastName": "Doe",
        "company": "TechCorp",
        "title": "VP of Engineering",
        "industry": "Technology",
        "region": "North America"
      },
      {
        "linkedinUrl": "https://www.linkedin.com/in/jane-smith",
        "firstName": "Jane",
        "lastName": "Smith",
        "referredBy": "Conference 2024",
        "customScore": 85,
        "icebreaker": "Loved your talk on AI automation"
      }
    ]
  }'
{
  "success": true,
  "leadsAdded": 2,
  "duplicatesSkipped": 0,
  "invalidEntries": 0
}
Duplicate detection is based on the LinkedIn URL. If a lead with the same URL already exists in the campaign, it will be skipped.
Using custom fields in messages: Reference your custom fields in campaign message templates using the {{fieldName}} syntax. For example, if you pass industry: "Technology", use {{industry}} in your message template.

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json
campaignId
string
required

Campaign ID to add leads to

leads
object[]
required
Required array length: 1 - 100 elements

Response

Leads added successfully

success
boolean
required
leadsAdded
integer
required
duplicatesSkipped
integer
required
invalidEntries
integer
required
errors
object[]