curl --request DELETE \
--url https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"dataset_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"lead_id": "<string>",
"reference": "<string>",
"removed": {},
"shared_emails": 123,
"shared_phones": 123,
"state": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}DeleteLeadAPI removes one lead from Erdo: its row and identity, its
conversations, calls and emails, and the follow-up engine’s decisions about it. The same phone and email submitted again then make a new lead. Contact details a call, text or chat gave Erdo stay in the Conversation leads pipeline’s run history.
There is deliberately no MCP tool for this. It cannot be undone, so an agent must never be one tool call away from it. It is a staff tool behind the lead_delete flag, for demos and tests: copies held by providers and in logs stay, so it is not an answer to a data-deletion request.
A scoped API key is refused: those are per-end-user credentials.
curl --request DELETE \
--url https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/datasets/{datasetSlug}/leads/{leadRef}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"dataset_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"lead_id": "<string>",
"reference": "<string>",
"removed": {},
"shared_emails": 123,
"shared_phones": 123,
"state": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).
Query Parameters
DeletedByExternalRef is the calling product's own handle for the person who deleted the lead. Opaque and unverified.
CheckOnly asks whether the delete would go ahead and removes nothing: the answer is state "deletable", or the refusal the delete would give.
Response
Success response
more.
Show child attributes
Show child attributes
lead in the organization still holds. What is kept by number or address for those — a text thread stamped with the other lead, consent, unlinked calls — was left in place.
for a call naming a lead an earlier delete removed, and "deletable" for a check that found nothing in the way.

