Contacts
List Contacts
Listing all the resolved contacts with pagination (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
GET
/
api
/
v1
/
contacts
List Contacts
curl --request GET \
--url https://api.evoai.app/api/v1/contacts \
--header 'api_access_token: <api-key>'import requests
url = "https://api.evoai.app/api/v1/contacts"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://api.evoai.app/api/v1/contacts', 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.evoai.app/api/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_access_token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.evoai.app/api/v1/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.evoai.app/api/v1/contacts")
.header("api_access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "John Doe",
"email": null,
"phone_number": "+5574999999999",
"identifier": null,
"blocked": false,
"type": "person",
"tax_id": null,
"website": null,
"industry": null,
"additional_attributes": {
"city": "",
"country": "",
"location": {
"city": "",
"country": "",
"country_code": ""
},
"description": "",
"company_name": "",
"country_code": "",
"social_profiles": {
"github": "",
"twitter": "",
"facebook": "",
"linkedin": "",
"instagram": ""
}
},
"custom_attributes": {},
"created_at": 1704067200,
"last_activity_at": null,
"labels": [],
"contact_inboxes": []
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Jane Smith",
"email": "[email protected]",
"phone_number": null,
"identifier": null,
"blocked": false,
"type": "person",
"tax_id": null,
"website": null,
"industry": null,
"additional_attributes": {
"source_id": "email:example-source-id-123"
},
"custom_attributes": {},
"created_at": 1704153600,
"last_activity_at": 1704153700,
"labels": [],
"contact_inboxes": [
{
"source_id": "[email protected]",
"inbox": {
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "support-inbox",
"channel_type": "Channel::Email"
}
}
]
}
],
"meta": {
"pagination": {
"page": 1,
"pageSize": 20,
"total": 100,
"totalPages": 5,
"hasNextPage": true,
"hasPreviousPage": null
},
"timestamp": "2024-01-15T10:30:00Z"
},
"message": "Contacts retrieved successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}Authorizations
Query Parameters
Field for sorting results
Available options:
name, email, created_at, updated_at ⌘I
List Contacts
curl --request GET \
--url https://api.evoai.app/api/v1/contacts \
--header 'api_access_token: <api-key>'import requests
url = "https://api.evoai.app/api/v1/contacts"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://api.evoai.app/api/v1/contacts', 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.evoai.app/api/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_access_token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.evoai.app/api/v1/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.evoai.app/api/v1/contacts")
.header("api_access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "John Doe",
"email": null,
"phone_number": "+5574999999999",
"identifier": null,
"blocked": false,
"type": "person",
"tax_id": null,
"website": null,
"industry": null,
"additional_attributes": {
"city": "",
"country": "",
"location": {
"city": "",
"country": "",
"country_code": ""
},
"description": "",
"company_name": "",
"country_code": "",
"social_profiles": {
"github": "",
"twitter": "",
"facebook": "",
"linkedin": "",
"instagram": ""
}
},
"custom_attributes": {},
"created_at": 1704067200,
"last_activity_at": null,
"labels": [],
"contact_inboxes": []
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Jane Smith",
"email": "[email protected]",
"phone_number": null,
"identifier": null,
"blocked": false,
"type": "person",
"tax_id": null,
"website": null,
"industry": null,
"additional_attributes": {
"source_id": "email:example-source-id-123"
},
"custom_attributes": {},
"created_at": 1704153600,
"last_activity_at": 1704153700,
"labels": [],
"contact_inboxes": [
{
"source_id": "[email protected]",
"inbox": {
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "support-inbox",
"channel_type": "Channel::Email"
}
}
]
}
],
"meta": {
"pagination": {
"page": 1,
"pageSize": 20,
"total": 100,
"totalPages": 5,
"hasNextPage": true,
"hasPreviousPage": null
},
"timestamp": "2024-01-15T10:30:00Z"
},
"message": "Contacts retrieved successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/contacts",
"method": "GET"
}
}