Skip to main content
POST
/
api
/
v1
/
leads
curl -X POST https://api.sendpilot.ai/api/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"
      },
      {
        "linkedinUrl": "https://www.linkedin.com/in/jane-smith",
        "firstName": "Jane",
        "lastName": "Smith",
        "customFields": {
          "referredBy": "Conference 2024"
        }
      }
    ]
  }'
{
  "success": true,
  "leadsAdded": 2,
  "duplicatesSkipped": 0,
  "invalidEntries": 0
}
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)

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/api/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"
      },
      {
        "linkedinUrl": "https://www.linkedin.com/in/jane-smith",
        "firstName": "Jane",
        "lastName": "Smith",
        "customFields": {
          "referredBy": "Conference 2024"
        }
      }
    ]
  }'
{
  "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.