Remove Lead from Campaign
curl --request DELETE \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "+14155552671",
"campaign_lead_id": "Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=="
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove"
payload = {
"phone_number": "+14155552671",
"campaign_lead_id": "Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=="
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '+14155552671',
campaign_lead_id: 'Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=='
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove', 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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'phone_number' => '+14155552671',
'campaign_lead_id' => 'Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=='
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove"
payload := strings.NewReader("{\n \"phone_number\": \"+14155552671\",\n \"campaign_lead_id\": \"Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA==\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+14155552671\",\n \"campaign_lead_id\": \"Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA==\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"+14155552671\",\n \"campaign_lead_id\": \"Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA==\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Lead removed successfully"
}{
"message": "To delete a lead, you need to provide either the \"campaign_lead_id\" or the \"phone_number\""
}{
"message": "<string>"
}{
"message": "Lead not found with the given phone number or campaign lead id"
}{
"message": "Internal server error"
}Leads (v2)
Remove Lead from Campaign
Permanently removes a lead from the specified campaign, identified by phone number or campaign lead ID.
Authentication
All requests require an Authorization header using Bearer token authentication:
Authorization: Bearer <api_key>
DELETE
/
api
/
v2
/
voice-campaigns
/
{campaign_id}
/
lead
/
remove
Remove Lead from Campaign
curl --request DELETE \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "+14155552671",
"campaign_lead_id": "Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=="
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove"
payload = {
"phone_number": "+14155552671",
"campaign_lead_id": "Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=="
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '+14155552671',
campaign_lead_id: 'Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=='
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove', 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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'phone_number' => '+14155552671',
'campaign_lead_id' => 'Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA=='
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove"
payload := strings.NewReader("{\n \"phone_number\": \"+14155552671\",\n \"campaign_lead_id\": \"Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA==\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+14155552671\",\n \"campaign_lead_id\": \"Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA==\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/lead/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"+14155552671\",\n \"campaign_lead_id\": \"Vm9pY2VDYW1wYWlnbkxlYWQ6MTIzNA==\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Lead removed successfully"
}{
"message": "To delete a lead, you need to provide either the \"campaign_lead_id\" or the \"phone_number\""
}{
"message": "<string>"
}{
"message": "Lead not found with the given phone number or campaign lead id"
}{
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the campaign. Required.
Example:
"camp_abc123"
Body
application/json
Lead identifier - provide phone_number or campaign_lead_id
Was this page helpful?
⌘I

