Delete many contacts at once
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"q": "<string>",
"status": "<string>",
"tag": "<string>",
"assignedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"excludeIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete"
payload = {
"ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"q": "<string>",
"status": "<string>",
"tag": "<string>",
"assignedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"excludeIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
q: '<string>',
status: '<string>',
tag: '<string>',
assignedTo: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
excludeIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete', 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://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'filter' => [
'q' => '<string>',
'status' => '<string>',
'tag' => '<string>',
'assignedTo' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'excludeIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete"
payload := strings.NewReader("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"filter\": {\n \"q\": \"<string>\",\n \"status\": \"<string>\",\n \"tag\": \"<string>\",\n \"assignedTo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"excludeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"filter\": {\n \"q\": \"<string>\",\n \"status\": \"<string>\",\n \"tag\": \"<string>\",\n \"assignedTo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"excludeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"filter\": {\n \"q\": \"<string>\",\n \"status\": \"<string>\",\n \"tag\": \"<string>\",\n \"assignedTo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"excludeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deleted": 123
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}Contacts
Delete many contacts at once
Deletes in one of two mutually exclusive modes — provide exactly one
of ids or filter, never both and never neither (that is a 400):
ids: delete these specific contacts. Ids belonging to another tenant match nothing and are skipped silently, never reported — the same reason a single fetch of another tenant’s id is a 404.filter: delete everything the list atGET /contacts/accountswould show for the same query, minus any ids inexcludeIds. This is how “select all N matching, except a few” is expressed, and has no cap. Filter fields are validated (a baddnc/assignedTois a 400, not silently dropped), because here a dropped narrowing widens the delete.
ids is capped at 10000 per call — to delete more, use filter.
Each contact’s channels, attribute values, files and campaign enrollments go with it. Suppression entries created from a contact’s do-not-contact flag go too; entries uploaded as a list survive, exactly as they do for a single delete.
POST
/
contacts
/
accounts
/
bulk-delete
Delete many contacts at once
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"q": "<string>",
"status": "<string>",
"tag": "<string>",
"assignedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"excludeIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete"
payload = {
"ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"q": "<string>",
"status": "<string>",
"tag": "<string>",
"assignedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"excludeIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
q: '<string>',
status: '<string>',
tag: '<string>',
assignedTo: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
excludeIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete', 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://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'filter' => [
'q' => '<string>',
'status' => '<string>',
'tag' => '<string>',
'assignedTo' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'excludeIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete"
payload := strings.NewReader("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"filter\": {\n \"q\": \"<string>\",\n \"status\": \"<string>\",\n \"tag\": \"<string>\",\n \"assignedTo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"excludeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"filter\": {\n \"q\": \"<string>\",\n \"status\": \"<string>\",\n \"tag\": \"<string>\",\n \"assignedTo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"excludeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/accounts/bulk-delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"filter\": {\n \"q\": \"<string>\",\n \"status\": \"<string>\",\n \"tag\": \"<string>\",\n \"assignedTo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"excludeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deleted": 123
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Body
application/json
Response
The number of contacts deleted.