Contacts
Search the contacts of a list
Returns the contacts of a list that match the search text, one page at a time. The text travels in the body, never in the URL.
POST
/
api
/
v1
/
contact-lists
/
{list_uuid}
/
contacts
/
search
Search the contacts of a list
curl --request POST \
--url https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"limit": 50,
"q": ""
}
'import requests
url = "https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search"
payload = {
"cursor": "<string>",
"limit": 50,
"q": ""
}
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({cursor: '<string>', limit: 50, q: ''})
};
fetch('https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search', 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.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search",
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([
'cursor' => '<string>',
'limit' => 50,
'q' => ''
]),
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.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"limit\": 50,\n \"q\": \"\"\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://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cursor\": \"<string>\",\n \"limit\": 50,\n \"q\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search")
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 \"cursor\": \"<string>\",\n \"limit\": 50,\n \"q\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"contact_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"list_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"additional_fields": {},
"company": "<string>",
"created_by_assistant": false,
"created_conversation_kind": "voice",
"created_conversation_uuid": "<string>",
"created_source": "extracted",
"emails": [
{
"address": "<string>",
"label": "home"
}
],
"field_changes": [
{
"created_at": "2023-11-07T05:31:56Z",
"field_key": "<string>",
"source": "manual",
"conversation_kind": "voice",
"conversation_uuid": "<string>",
"new_value": "<string>",
"old_value": "<string>",
"reason": "<string>"
}
],
"first_name": "<string>",
"last_conversation_at": "2023-11-07T05:31:56Z",
"last_conversation_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"notes": "<string>",
"phones": [
{
"number": "<string>",
"label": "home"
}
]
}
],
"total": 123,
"next_cursor": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}Authorizations
Body
application/json
⌘I
Search the contacts of a list
curl --request POST \
--url https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"limit": 50,
"q": ""
}
'import requests
url = "https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search"
payload = {
"cursor": "<string>",
"limit": 50,
"q": ""
}
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({cursor: '<string>', limit: 50, q: ''})
};
fetch('https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search', 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.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search",
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([
'cursor' => '<string>',
'limit' => 50,
'q' => ''
]),
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.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"limit\": 50,\n \"q\": \"\"\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://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cursor\": \"<string>\",\n \"limit\": 50,\n \"q\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.klatt.ai/api/v1/contact-lists/{list_uuid}/contacts/search")
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 \"cursor\": \"<string>\",\n \"limit\": 50,\n \"q\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"contact_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"list_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"additional_fields": {},
"company": "<string>",
"created_by_assistant": false,
"created_conversation_kind": "voice",
"created_conversation_uuid": "<string>",
"created_source": "extracted",
"emails": [
{
"address": "<string>",
"label": "home"
}
],
"field_changes": [
{
"created_at": "2023-11-07T05:31:56Z",
"field_key": "<string>",
"source": "manual",
"conversation_kind": "voice",
"conversation_uuid": "<string>",
"new_value": "<string>",
"old_value": "<string>",
"reason": "<string>"
}
],
"first_name": "<string>",
"last_conversation_at": "2023-11-07T05:31:56Z",
"last_conversation_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"notes": "<string>",
"phones": [
{
"number": "<string>",
"label": "home"
}
]
}
],
"total": 123,
"next_cursor": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"message": "<string>"
}{
"detail": "<string>",
"message": "<string>"
}