Leads
Bulk Create Leads
Create multiple leads in a single request
POST
Endpoint Alias: You can also use
/api/v1/records/bulk instead of /api/v1/leads/bulk. Both endpoints are functionally identical - use whichever naming convention fits your integration.Lead Import Modes
Each lead in the array can use either import mode:Standard Mode
Phone number known at import timeProvide
phoneNumber directly for each lead.Prefetch Mode
Phone number fetched just-in-timeProvide
externalId only. Phone fetched via predial function before calling.Each lead must have at least one of
phoneNumber or externalId. You can mix modes within the same bulk request.Authentication
Your API key with
write scopeRequest Body
The ID of the campaign these leads belong to
Array of lead objects (max 1000 per request)
Response
Whether the request was successful
Error message if request failed
Examples
- Standard Mode
- Prefetch Mode
- Mixed Mode
All leads with phone numbers:
Limits
Rate Limit: Bulk endpoint is limited to 10 requests per minute to prevent abuse.
Duplicate Handling
The bulk endpoint automatically handles duplicates:- Checks
externalIdfirst - if provided, checks for existing lead with same externalId in campaign - Then checks
phoneNumber- if provided, checks for existing lead with same phone in campaign - Skips duplicates without failing the entire request
- Returns details about what was created vs skipped
Common Errors
| Error | Cause | Solution |
|---|---|---|
campaignId is required | Missing campaignId | Include campaignId in request body |
leads array is required | Missing or invalid leads | Include leads array in request body |
leads array cannot be empty | Empty leads array | Add at least one lead to the array |
Maximum 1000 leads per bulk request | Too many leads | Split into multiple requests |
leads[N]: At least one of phoneNumber or externalId is required | Lead missing both identifiers | Each lead needs phoneNumber or externalId |
Best Practices
Batch Size
Batch Size
- Use 100-500 leads per request for optimal performance
- Don’t max out at 1000 unless necessary
- Monitor response times and adjust
Scheduling
Scheduling
- Spread out bulk imports over time
- Don’t import 10,000 leads at once
- Respect rate limits (10/min)
Validation
Validation
- Validate phone numbers before sending (E.164 format)
- Ensure each lead has phoneNumber OR externalId
- Remove duplicates in your data first
Error Handling
Error Handling
- Check the
createdvsskippedcounts - Log
skippedIdentifiersfor investigation - Retry failed requests with exponential backoff
Prefetch Mode
Prefetch Mode
- Ensure your campaign has a predial function configured
- Include any metadata needed by the predial function
- Test with a small batch first
Example: CSV Import Script
Python