Skip to main content
DELETE
https://YOUR_DEPLOYMENT.lupitor.com/api/v1
/
api
/
v1
/
leads
curl -X DELETE "https://YOUR_DEPLOYMENT.lupitor.com/api/v1/leads?campaignId=YOUR_CAMPAIGN_ID&externalId=CRM_12345" \
  -H "x-api-key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "deleted": true
  },
  "error": null
}
Endpoint Alias: You can also use /api/v1/records instead of /api/v1/leads. Both endpoints are functionally identical - use whichever naming convention fits your integration.

Lead Lookup

Leads are identified by externalId or phoneNumber, not internal IDs. This matches how you created the lead.
At least one of phoneNumber or externalId is required. If both are provided, externalId takes priority for the lookup.

Authentication

x-api-key
string
required
Your API key with write scope

Query Parameters

campaignId
string
required
The ID of the campaign the lead belongs to
phoneNumber
string
Phone number in E.164 format (e.g., +15555551234).Required if externalId is not provided.
externalId
string
Your CRM’s internal ID for this lead.Required if phoneNumber is not provided.

Response

success
boolean
Whether the request was successful
data
object
error
string | null
Error message if request failed

Examples

Delete by external CRM reference:
curl -X DELETE "https://YOUR_DEPLOYMENT.lupitor.com/api/v1/leads?campaignId=YOUR_CAMPAIGN_ID&externalId=CRM_12345" \
  -H "x-api-key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "deleted": true
  },
  "error": null
}

Notes

Permanent Deletion: This action cannot be undone. The lead will be permanently deleted.
Need the lead data? The delete response only confirms deletion—it doesn’t return the lead’s details. If you need the lead information (metadata, status, etc.), fetch the lead first using GET /api/v1/leads, then delete it.
URL Encoding: When passing phone numbers in the URL, remember to URL-encode the + sign as %2B.
Access Control: You can only delete leads that belong to campaigns your API key has access to.

Common Errors

ErrorCauseSolution
campaignId query parameter is requiredMissing campaignIdInclude campaignId in query string
At least one of phoneNumber or externalId query parameter is requiredMissing both identifiersInclude phoneNumber or externalId
Lead not foundLead doesn’t exist in campaignVerify identifier and campaign
Invalid or inactive API keyWrong API keyCheck your API key
ForbiddenAPI key doesn’t have write accessUse an API key with write scope