curl --request POST \
--url https://api.nuvia.ai/v1/contacts/identity-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"linkedin_identifier": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"exclude_contact_id": "<string>"
}
'import requests
url = "https://api.nuvia.ai/v1/contacts/identity-check"
payload = {
"email": "<string>",
"linkedin_identifier": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"exclude_contact_id": "<string>"
}
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({
email: '<string>',
linkedin_identifier: '<string>',
phone_number: '<string>',
country_code: '<string>',
exclude_contact_id: '<string>'
})
};
fetch('https://api.nuvia.ai/v1/contacts/identity-check', 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.nuvia.ai/v1/contacts/identity-check",
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([
'email' => '<string>',
'linkedin_identifier' => '<string>',
'phone_number' => '<string>',
'country_code' => '<string>',
'exclude_contact_id' => '<string>'
]),
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.nuvia.ai/v1/contacts/identity-check"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"linkedin_identifier\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"exclude_contact_id\": \"<string>\"\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.nuvia.ai/v1/contacts/identity-check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"linkedin_identifier\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"exclude_contact_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuvia.ai/v1/contacts/identity-check")
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 \"email\": \"<string>\",\n \"linkedin_identifier\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"exclude_contact_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "new",
"matched_by": "email",
"matches_count": 123,
"contact": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"linkedin_identifier": "<string>"
},
"conflicts": [
{
"field": "email",
"contact": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"linkedin_identifier": "<string>"
}
}
]
}Conferir identificadores de contato
Só leitura. Diz o que o POST /v1/contacts faria com esses identificadores, para o formulário avisar antes de salvar.
- Ordem de procura: e-mail, LinkedIn e telefone.
new: nenhum contato da empresa tem os identificadores.existing: o contato emcontactseria reaproveitado;matches_countdiz quantos contatos casaram pela chavematched_by.conflict: identificadores diferentes apontam para contatos diferentes;conflictstraz cada um.exclude_contact_id: ignora esse contato (a edição manda o próprio contato).
curl --request POST \
--url https://api.nuvia.ai/v1/contacts/identity-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"linkedin_identifier": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"exclude_contact_id": "<string>"
}
'import requests
url = "https://api.nuvia.ai/v1/contacts/identity-check"
payload = {
"email": "<string>",
"linkedin_identifier": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"exclude_contact_id": "<string>"
}
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({
email: '<string>',
linkedin_identifier: '<string>',
phone_number: '<string>',
country_code: '<string>',
exclude_contact_id: '<string>'
})
};
fetch('https://api.nuvia.ai/v1/contacts/identity-check', 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.nuvia.ai/v1/contacts/identity-check",
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([
'email' => '<string>',
'linkedin_identifier' => '<string>',
'phone_number' => '<string>',
'country_code' => '<string>',
'exclude_contact_id' => '<string>'
]),
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.nuvia.ai/v1/contacts/identity-check"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"linkedin_identifier\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"exclude_contact_id\": \"<string>\"\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.nuvia.ai/v1/contacts/identity-check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"linkedin_identifier\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"exclude_contact_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuvia.ai/v1/contacts/identity-check")
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 \"email\": \"<string>\",\n \"linkedin_identifier\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"country_code\": \"<string>\",\n \"exclude_contact_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "new",
"matched_by": "email",
"matches_count": 123,
"contact": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"linkedin_identifier": "<string>"
},
"conflicts": [
{
"field": "email",
"contact": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"country_code": "<string>",
"linkedin_identifier": "<string>"
}
}
]
}Autorizações
Token JWT de autenticação
Cabeçalhos
Identificador da empresa-alvo. Obrigatório apenas para API Keys globais (type=global). Ignorado para API Keys de empresa e usuários humanos.
Corpo
E-mail a conferir. Só conta como identificador se tiver "@".
URL do perfil do LinkedIn ou só o nome do perfil.
Telefone (DDD + número, sem o DDI). Telefone que não forma número válido é ignorado na conferência.
DDI do telefone. Exemplo: 55.
Contato a ignorar na conferência. A edição manda o próprio contato: valor igual ao dele não é conflito.
^[0-9a-fA-F]{24}$Resposta
Resultado da conferência
new: nenhum contato tem os identificadores. existing: o POST reaproveitaria contact. conflict: identificadores diferentes apontam para contatos diferentes.
new, existing, conflict Identificador que casou
email, linkedin, phone Quantos contatos da empresa casaram pela chave matched_by.
Contato que seria reaproveitado. null em new e conflict.
Show child attributes
Show child attributes
Em conflict, o contato de cada identificador. Vazio nos outros casos.
Show child attributes
Show child attributes