Count and sample who a filter matches
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/audiences/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"rules": [
{
"field": "<string>",
"cmp": "<string>",
"value": "<unknown>"
}
]
},
"limit": 25,
"offset": 0
}
'import requests
url = "https://apiv2.vodex.ai/v1/contacts/audiences/preview"
payload = {
"filter": { "rules": [
{
"field": "<string>",
"cmp": "<string>",
"value": "<unknown>"
}
] },
"limit": 25,
"offset": 0
}
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({
filter: {rules: [{field: '<string>', cmp: '<string>', value: '<unknown>'}]},
limit: 25,
offset: 0
})
};
fetch('https://apiv2.vodex.ai/v1/contacts/audiences/preview', 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/audiences/preview",
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([
'filter' => [
'rules' => [
[
'field' => '<string>',
'cmp' => '<string>',
'value' => '<unknown>'
]
]
],
'limit' => 25,
'offset' => 0
]),
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/audiences/preview"
payload := strings.NewReader("{\n \"filter\": {\n \"rules\": [\n {\n \"field\": \"<string>\",\n \"cmp\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"limit\": 25,\n \"offset\": 0\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/audiences/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"rules\": [\n {\n \"field\": \"<string>\",\n \"cmp\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"limit\": 25,\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/audiences/preview")
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 \"filter\": {\n \"rules\": [\n {\n \"field\": \"<string>\",\n \"cmp\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"limit\": 25,\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body{
"total": 123,
"suppressed": 123,
"accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalRef": "<string>",
"accountNumber": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"displayName": "<string>",
"email": "<string>",
"timezone": "<string>",
"dateOfBirth": "<string>",
"ssnMasked": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"status": "<string>",
"assignedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"notes": "<string>",
"lastContactedAt": "2023-11-07T05:31:56Z",
"lastContactChannel": "<string>",
"doNotContact": true,
"dncReason": "<string>",
"dncSetAt": "2023-11-07T05:31:56Z",
"consentBasis": "<string>",
"consentCapturedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "phone",
"label": "primary",
"value": "<string>",
"isPrimary": true,
"verified": true,
"isBad": true,
"optedOutAt": "2023-11-07T05:31:56Z",
"lastGoodAt": "2023-11-07T05:31:56Z"
}
]
}
]
}{
"error": "not found"
}Audiences
Count and sample who a filter matches
Exclusions are reported separately rather than subtracted. “1,204 match, 38 are suppressed” is the honest sentence; a single number that quietly already had the exclusions removed cannot be reconciled against the member list the same filter shows (0017 §5).
POST
/
contacts
/
audiences
/
preview
Count and sample who a filter matches
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/audiences/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"rules": [
{
"field": "<string>",
"cmp": "<string>",
"value": "<unknown>"
}
]
},
"limit": 25,
"offset": 0
}
'import requests
url = "https://apiv2.vodex.ai/v1/contacts/audiences/preview"
payload = {
"filter": { "rules": [
{
"field": "<string>",
"cmp": "<string>",
"value": "<unknown>"
}
] },
"limit": 25,
"offset": 0
}
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({
filter: {rules: [{field: '<string>', cmp: '<string>', value: '<unknown>'}]},
limit: 25,
offset: 0
})
};
fetch('https://apiv2.vodex.ai/v1/contacts/audiences/preview', 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/audiences/preview",
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([
'filter' => [
'rules' => [
[
'field' => '<string>',
'cmp' => '<string>',
'value' => '<unknown>'
]
]
],
'limit' => 25,
'offset' => 0
]),
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/audiences/preview"
payload := strings.NewReader("{\n \"filter\": {\n \"rules\": [\n {\n \"field\": \"<string>\",\n \"cmp\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"limit\": 25,\n \"offset\": 0\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/audiences/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"rules\": [\n {\n \"field\": \"<string>\",\n \"cmp\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"limit\": 25,\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/audiences/preview")
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 \"filter\": {\n \"rules\": [\n {\n \"field\": \"<string>\",\n \"cmp\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"limit\": 25,\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body{
"total": 123,
"suppressed": 123,
"accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalRef": "<string>",
"accountNumber": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"displayName": "<string>",
"email": "<string>",
"timezone": "<string>",
"dateOfBirth": "<string>",
"ssnMasked": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"status": "<string>",
"assignedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"notes": "<string>",
"lastContactedAt": "2023-11-07T05:31:56Z",
"lastContactChannel": "<string>",
"doNotContact": true,
"dncReason": "<string>",
"dncSetAt": "2023-11-07T05:31:56Z",
"consentBasis": "<string>",
"consentCapturedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "phone",
"label": "primary",
"value": "<string>",
"isPrimary": true,
"verified": true,
"isBad": true,
"optedOutAt": "2023-11-07T05:31:56Z",
"lastGoodAt": "2023-11-07T05:31:56Z"
}
]
}
]
}{
"error": "not found"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Body
application/json
A filter tree that compiles to a WHERE clause. Two things make
customer-supplied JSON safe there: only whitelisted fields are
reachable, and every value is bound — nothing a caller supplied is ever
interpolated into statement text.
Attribute rules compile to an EXISTS, not a join: a join multiplies
rows the moment two attribute rules appear in one filter, and an
audience count has to be a count of people.
Show child attributes
Show child attributes
Required range:
x <= 200