Filter customer contacts by IDs
curl --request POST \
--url https://platform.thena.ai/v1/accounts/contacts/filter/ids \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ids": [
"C123",
"C456"
]
}
'import requests
url = "https://platform.thena.ai/v1/accounts/contacts/filter/ids"
payload = { "ids": ["C123", "C456"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['C123', 'C456']})
};
fetch('https://platform.thena.ai/v1/accounts/contacts/filter/ids', 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://platform.thena.ai/v1/accounts/contacts/filter/ids",
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' => [
'C123',
'C456'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://platform.thena.ai/v1/accounts/contacts/filter/ids"
payload := strings.NewReader("{\n \"ids\": [\n \"C123\",\n \"C456\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://platform.thena.ai/v1/accounts/contacts/filter/ids")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"C123\",\n \"C456\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.thena.ai/v1/accounts/contacts/filter/ids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"C123\",\n \"C456\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"avatarUrl": "<string>",
"accounts": [
"<string>"
],
"contactTypeId": "<string>",
"contactType": "<string>",
"customFieldValues": [
"<string>"
],
"metadata": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}
][
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"avatarUrl": "<string>",
"accounts": [
"<string>"
],
"contactTypeId": "<string>",
"contactType": "<string>",
"customFieldValues": [
"<string>"
],
"metadata": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}
]{
"statusCode": 400,
"message": "Invalid contact IDs provided",
"error": "Bad Request"
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error"
}Accounts
Filter customer contacts by IDs
POST
/
v1
/
accounts
/
contacts
/
filter
/
ids
Filter customer contacts by IDs
curl --request POST \
--url https://platform.thena.ai/v1/accounts/contacts/filter/ids \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ids": [
"C123",
"C456"
]
}
'import requests
url = "https://platform.thena.ai/v1/accounts/contacts/filter/ids"
payload = { "ids": ["C123", "C456"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['C123', 'C456']})
};
fetch('https://platform.thena.ai/v1/accounts/contacts/filter/ids', 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://platform.thena.ai/v1/accounts/contacts/filter/ids",
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' => [
'C123',
'C456'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://platform.thena.ai/v1/accounts/contacts/filter/ids"
payload := strings.NewReader("{\n \"ids\": [\n \"C123\",\n \"C456\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://platform.thena.ai/v1/accounts/contacts/filter/ids")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"C123\",\n \"C456\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.thena.ai/v1/accounts/contacts/filter/ids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"C123\",\n \"C456\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"avatarUrl": "<string>",
"accounts": [
"<string>"
],
"contactTypeId": "<string>",
"contactType": "<string>",
"customFieldValues": [
"<string>"
],
"metadata": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}
][
{
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"avatarUrl": "<string>",
"accounts": [
"<string>"
],
"contactTypeId": "<string>",
"contactType": "<string>",
"customFieldValues": [
"<string>"
],
"metadata": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}
]{
"statusCode": 400,
"message": "Invalid contact IDs provided",
"error": "Bad Request"
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error"
}Authorizations
Enter your API key
Body
application/json
Contact IDs to filter
The IDs of the customer contacts to filter
Example:
["C123", "C456"]
Response
Customer contacts filtered successfully
The identifier of the customer contact
The first name of the customer contact
The last name of the customer contact
The email of the customer contact
The phone number of the customer contact
The avatar URL of the customer contact
The name of the account
The identifier of the contact type
The name of the contact type
The custom field values
The metadata of the contact
The creation date of the contact
The last update date of the contact
⌘I