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"
      },
      {
        "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/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.

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[]