Leads
Bulk Delete Leads
Delete multiple leads in a single request
POST
Endpoint Alias: You can also use
/api/v1/records/bulk-delete instead of /api/v1/leads/bulk-delete. Both endpoints are functionally identical - use whichever naming convention fits your integration.Why POST? This endpoint uses POST instead of DELETE because DELETE requests with a body are not universally supported by all HTTP clients and proxies.
Lead Lookup
Leads are identified byexternalId or phoneNumber, not internal IDs. Each entry in the leads array must have at least one identifier.
Each lead must have at least one of
phoneNumber or externalId. If both are provided, externalId takes priority for the lookup.Authentication
string
required
Your API key with
write scopeRequest Body
string
required
The ID of the campaign these leads belong to
array
required
Array of lead identifiers to delete (max 1000 per request)
Response
boolean
Whether the request was successful
object
string | null
Error message if request failed
Examples
- By External IDs
- By Phone Numbers
- Mixed
Delete multiple leads by external CRM references:
Limits
Partial Success Handling
The bulk delete endpoint handles missing leads gracefully:- Validates campaign access - Ensures API key has write access to the specified campaign
- Processes each lead - Looks up by externalId first, then phoneNumber
- Tracks results - Records which leads were deleted vs not found
- Returns details - Provides identifiers for both outcomes
No Partial Rollback: If some leads are not found, the ones that exist will still be deleted. The operation does not fail entirely.
Notes
Campaign Scope: All leads must belong to the specified campaign. Leads from other campaigns will appear in
notFoundIdentifiers.Common Errors
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
Identifier Choice
Identifier Choice
- Use
externalIdwhen available - it’s more specific - Use
phoneNumberas fallback for leads without external IDs - Don’t mix identifiers for the same lead across requests
Error Handling
Error Handling
- Check the
deletedvsnotFoundcounts - Log
notFoundIdentifiersfor investigation - Retry failed requests with exponential backoff
Cleanup
Cleanup
- Consider archiving leads instead of deleting if audit trail is important
- Use bulk delete for cleaning up test data
- Run bulk deletes during off-peak hours for large datasets