Gerenciamento de contatos
Criar contato
Cria um contato na subconta, informando os dados cadastrais e o identificador da subconta.
URL completa: https://services.leadconnectorhq.com/contacts/
POST
/
contacts
/
cURL
curl --request POST \
--url 'https://services.leadconnectorhq.com/contacts/' \
--header 'Authorization: Bearer <token>' \
--header 'Version: v3' \
--header 'Content-Type: application/json' \
--data '{
"firstName": "Sara",
"lastName": "Muller",
"name": "Sara Muller",
"email": "sara@salez.com.br",
"locationId": "<locationId>",
"gender": "female",
"phone": "+5511934848735",
"address1": "Av. Pres. Juscelino Kubitschek, 1327",
"city": "São Paulo",
"state": "SP",
"postalCode": "04543-011",
"website": "https://salez.com.br",
"timezone": "America/Sao_Paulo",
"dnd": false,
"inboundDndSettings": {
"all": {
"status": "inactive"
}
},
"tags": [
"cliente",
"atendimento"
],
"customFields": [
{
"id": "<customFieldId>",
"key": "contato.segmento",
"fieldValue": "Tecnologia"
}
],
"source": "Integração API",
"dateOfBirth": "1990-09-25",
"country": "BR",
"companyName": "Salez",
"assignedTo": "<userId>",
"dndSettings": {
"call": {
"status": "inactive"
},
"email": {
"status": "inactive"
}
}
}'import requests
url = "https://services.leadconnectorhq.com/contacts/"
payload = {
"locationId": "ve9EPM428h8vShlRW1KT",
"firstName": "Sara",
"lastName": "Muller",
"name": "Sara Muller",
"email": "sara@salez.com.br",
"gender": "female",
"phone": "+5511934848735",
"address1": "Av. Pres. Juscelino Kubitschek, 1327",
"city": "São Paulo",
"state": "SP",
"postalCode": "04543-011",
"website": "https://salez.com.br",
"timezone": "America/Sao_Paulo",
"dnd": False,
"inboundDndSettings": { "all": { "status": "inactive" } },
"tags": ["cliente", "atendimento"],
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "contato.segmento",
"fieldValue": "Tecnologia"
}
],
"source": "Integração API",
"dateOfBirth": "1990-09-25",
"country": "BR",
"companyName": "Salez",
"assignedTo": "y0BeYjuRIlDwsDcOHOJo",
"dndSettings": {
"call": { "status": "inactive" },
"email": { "status": "inactive" }
}
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locationId: 've9EPM428h8vShlRW1KT',
firstName: 'Sara',
lastName: 'Muller',
name: 'Sara Muller',
email: 'sara@salez.com.br',
gender: 'female',
phone: '+5511934848735',
address1: 'Av. Pres. Juscelino Kubitschek, 1327',
city: 'São Paulo',
state: 'SP',
postalCode: '04543-011',
website: 'https://salez.com.br',
timezone: 'America/Sao_Paulo',
dnd: false,
inboundDndSettings: {all: {status: 'inactive'}},
tags: ['cliente', 'atendimento'],
customFields: [
{id: '6dvNaf7VhkQ9snc5vnjJ', key: 'contato.segmento', fieldValue: 'Tecnologia'}
],
source: 'Integração API',
dateOfBirth: '1990-09-25',
country: 'BR',
companyName: 'Salez',
assignedTo: 'y0BeYjuRIlDwsDcOHOJo',
dndSettings: {call: {status: 'inactive'}, email: {status: 'inactive'}}
})
};
fetch('https://services.leadconnectorhq.com/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://services.leadconnectorhq.com/contacts/",
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([
'locationId' => 've9EPM428h8vShlRW1KT',
'firstName' => 'Sara',
'lastName' => 'Muller',
'name' => 'Sara Muller',
'email' => 'sara@salez.com.br',
'gender' => 'female',
'phone' => '+5511934848735',
'address1' => 'Av. Pres. Juscelino Kubitschek, 1327',
'city' => 'São Paulo',
'state' => 'SP',
'postalCode' => '04543-011',
'website' => 'https://salez.com.br',
'timezone' => 'America/Sao_Paulo',
'dnd' => false,
'inboundDndSettings' => [
'all' => [
'status' => 'inactive'
]
],
'tags' => [
'cliente',
'atendimento'
],
'customFields' => [
[
'id' => '6dvNaf7VhkQ9snc5vnjJ',
'key' => 'contato.segmento',
'fieldValue' => 'Tecnologia'
]
],
'source' => 'Integração API',
'dateOfBirth' => '1990-09-25',
'country' => 'BR',
'companyName' => 'Salez',
'assignedTo' => 'y0BeYjuRIlDwsDcOHOJo',
'dndSettings' => [
'call' => [
'status' => 'inactive'
],
'email' => [
'status' => 'inactive'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Version: <version>"
],
]);
$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://services.leadconnectorhq.com/contacts/"
payload := strings.NewReader("{\n \"locationId\": \"ve9EPM428h8vShlRW1KT\",\n \"firstName\": \"Sara\",\n \"lastName\": \"Muller\",\n \"name\": \"Sara Muller\",\n \"email\": \"sara@salez.com.br\",\n \"gender\": \"female\",\n \"phone\": \"+5511934848735\",\n \"address1\": \"Av. Pres. Juscelino Kubitschek, 1327\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"postalCode\": \"04543-011\",\n \"website\": \"https://salez.com.br\",\n \"timezone\": \"America/Sao_Paulo\",\n \"dnd\": false,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"inactive\"\n }\n },\n \"tags\": [\n \"cliente\",\n \"atendimento\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"contato.segmento\",\n \"fieldValue\": \"Tecnologia\"\n }\n ],\n \"source\": \"Integração API\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"BR\",\n \"companyName\": \"Salez\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"inactive\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Version", "<version>")
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://services.leadconnectorhq.com/contacts/")
.header("Version", "<version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locationId\": \"ve9EPM428h8vShlRW1KT\",\n \"firstName\": \"Sara\",\n \"lastName\": \"Muller\",\n \"name\": \"Sara Muller\",\n \"email\": \"sara@salez.com.br\",\n \"gender\": \"female\",\n \"phone\": \"+5511934848735\",\n \"address1\": \"Av. Pres. Juscelino Kubitschek, 1327\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"postalCode\": \"04543-011\",\n \"website\": \"https://salez.com.br\",\n \"timezone\": \"America/Sao_Paulo\",\n \"dnd\": false,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"inactive\"\n }\n },\n \"tags\": [\n \"cliente\",\n \"atendimento\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"contato.segmento\",\n \"fieldValue\": \"Tecnologia\"\n }\n ],\n \"source\": \"Integração API\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"BR\",\n \"companyName\": \"Salez\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"inactive\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.leadconnectorhq.com/contacts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Version"] = '<version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locationId\": \"ve9EPM428h8vShlRW1KT\",\n \"firstName\": \"Sara\",\n \"lastName\": \"Muller\",\n \"name\": \"Sara Muller\",\n \"email\": \"sara@salez.com.br\",\n \"gender\": \"female\",\n \"phone\": \"+5511934848735\",\n \"address1\": \"Av. Pres. Juscelino Kubitschek, 1327\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"postalCode\": \"04543-011\",\n \"website\": \"https://salez.com.br\",\n \"timezone\": \"America/Sao_Paulo\",\n \"dnd\": false,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"inactive\"\n }\n },\n \"tags\": [\n \"cliente\",\n \"atendimento\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"contato.segmento\",\n \"fieldValue\": \"Tecnologia\"\n }\n ],\n \"source\": \"Integração API\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"BR\",\n \"companyName\": \"Salez\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"inactive\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"id": "seD4PfOuKoVMLkEZqohJ",
"name": "Sara Muller",
"firstName": "Sara",
"lastName": "Muller",
"email": "sara@salez.com.br",
"phone": "+5511934848735",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Token e permissões: na Salez, acesse Configurações > Integrações Privadas para gerar ou gerenciar o token, conforme seu nível de acesso. Esta operação exige o escopo
contacts.write. Envie Authorization: Bearer <token> e Version: v3. Se enviar corpo JSON, inclua Content-Type: application/json. Veja a visão geral de Contatos.Autorizações
Corpo
application/json
Última modificação em 20 de novembro de 2026
⌘I
cURL
curl --request POST \
--url 'https://services.leadconnectorhq.com/contacts/' \
--header 'Authorization: Bearer <token>' \
--header 'Version: v3' \
--header 'Content-Type: application/json' \
--data '{
"firstName": "Sara",
"lastName": "Muller",
"name": "Sara Muller",
"email": "sara@salez.com.br",
"locationId": "<locationId>",
"gender": "female",
"phone": "+5511934848735",
"address1": "Av. Pres. Juscelino Kubitschek, 1327",
"city": "São Paulo",
"state": "SP",
"postalCode": "04543-011",
"website": "https://salez.com.br",
"timezone": "America/Sao_Paulo",
"dnd": false,
"inboundDndSettings": {
"all": {
"status": "inactive"
}
},
"tags": [
"cliente",
"atendimento"
],
"customFields": [
{
"id": "<customFieldId>",
"key": "contato.segmento",
"fieldValue": "Tecnologia"
}
],
"source": "Integração API",
"dateOfBirth": "1990-09-25",
"country": "BR",
"companyName": "Salez",
"assignedTo": "<userId>",
"dndSettings": {
"call": {
"status": "inactive"
},
"email": {
"status": "inactive"
}
}
}'import requests
url = "https://services.leadconnectorhq.com/contacts/"
payload = {
"locationId": "ve9EPM428h8vShlRW1KT",
"firstName": "Sara",
"lastName": "Muller",
"name": "Sara Muller",
"email": "sara@salez.com.br",
"gender": "female",
"phone": "+5511934848735",
"address1": "Av. Pres. Juscelino Kubitschek, 1327",
"city": "São Paulo",
"state": "SP",
"postalCode": "04543-011",
"website": "https://salez.com.br",
"timezone": "America/Sao_Paulo",
"dnd": False,
"inboundDndSettings": { "all": { "status": "inactive" } },
"tags": ["cliente", "atendimento"],
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "contato.segmento",
"fieldValue": "Tecnologia"
}
],
"source": "Integração API",
"dateOfBirth": "1990-09-25",
"country": "BR",
"companyName": "Salez",
"assignedTo": "y0BeYjuRIlDwsDcOHOJo",
"dndSettings": {
"call": { "status": "inactive" },
"email": { "status": "inactive" }
}
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locationId: 've9EPM428h8vShlRW1KT',
firstName: 'Sara',
lastName: 'Muller',
name: 'Sara Muller',
email: 'sara@salez.com.br',
gender: 'female',
phone: '+5511934848735',
address1: 'Av. Pres. Juscelino Kubitschek, 1327',
city: 'São Paulo',
state: 'SP',
postalCode: '04543-011',
website: 'https://salez.com.br',
timezone: 'America/Sao_Paulo',
dnd: false,
inboundDndSettings: {all: {status: 'inactive'}},
tags: ['cliente', 'atendimento'],
customFields: [
{id: '6dvNaf7VhkQ9snc5vnjJ', key: 'contato.segmento', fieldValue: 'Tecnologia'}
],
source: 'Integração API',
dateOfBirth: '1990-09-25',
country: 'BR',
companyName: 'Salez',
assignedTo: 'y0BeYjuRIlDwsDcOHOJo',
dndSettings: {call: {status: 'inactive'}, email: {status: 'inactive'}}
})
};
fetch('https://services.leadconnectorhq.com/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://services.leadconnectorhq.com/contacts/",
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([
'locationId' => 've9EPM428h8vShlRW1KT',
'firstName' => 'Sara',
'lastName' => 'Muller',
'name' => 'Sara Muller',
'email' => 'sara@salez.com.br',
'gender' => 'female',
'phone' => '+5511934848735',
'address1' => 'Av. Pres. Juscelino Kubitschek, 1327',
'city' => 'São Paulo',
'state' => 'SP',
'postalCode' => '04543-011',
'website' => 'https://salez.com.br',
'timezone' => 'America/Sao_Paulo',
'dnd' => false,
'inboundDndSettings' => [
'all' => [
'status' => 'inactive'
]
],
'tags' => [
'cliente',
'atendimento'
],
'customFields' => [
[
'id' => '6dvNaf7VhkQ9snc5vnjJ',
'key' => 'contato.segmento',
'fieldValue' => 'Tecnologia'
]
],
'source' => 'Integração API',
'dateOfBirth' => '1990-09-25',
'country' => 'BR',
'companyName' => 'Salez',
'assignedTo' => 'y0BeYjuRIlDwsDcOHOJo',
'dndSettings' => [
'call' => [
'status' => 'inactive'
],
'email' => [
'status' => 'inactive'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Version: <version>"
],
]);
$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://services.leadconnectorhq.com/contacts/"
payload := strings.NewReader("{\n \"locationId\": \"ve9EPM428h8vShlRW1KT\",\n \"firstName\": \"Sara\",\n \"lastName\": \"Muller\",\n \"name\": \"Sara Muller\",\n \"email\": \"sara@salez.com.br\",\n \"gender\": \"female\",\n \"phone\": \"+5511934848735\",\n \"address1\": \"Av. Pres. Juscelino Kubitschek, 1327\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"postalCode\": \"04543-011\",\n \"website\": \"https://salez.com.br\",\n \"timezone\": \"America/Sao_Paulo\",\n \"dnd\": false,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"inactive\"\n }\n },\n \"tags\": [\n \"cliente\",\n \"atendimento\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"contato.segmento\",\n \"fieldValue\": \"Tecnologia\"\n }\n ],\n \"source\": \"Integração API\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"BR\",\n \"companyName\": \"Salez\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"inactive\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Version", "<version>")
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://services.leadconnectorhq.com/contacts/")
.header("Version", "<version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locationId\": \"ve9EPM428h8vShlRW1KT\",\n \"firstName\": \"Sara\",\n \"lastName\": \"Muller\",\n \"name\": \"Sara Muller\",\n \"email\": \"sara@salez.com.br\",\n \"gender\": \"female\",\n \"phone\": \"+5511934848735\",\n \"address1\": \"Av. Pres. Juscelino Kubitschek, 1327\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"postalCode\": \"04543-011\",\n \"website\": \"https://salez.com.br\",\n \"timezone\": \"America/Sao_Paulo\",\n \"dnd\": false,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"inactive\"\n }\n },\n \"tags\": [\n \"cliente\",\n \"atendimento\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"contato.segmento\",\n \"fieldValue\": \"Tecnologia\"\n }\n ],\n \"source\": \"Integração API\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"BR\",\n \"companyName\": \"Salez\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"inactive\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.leadconnectorhq.com/contacts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Version"] = '<version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locationId\": \"ve9EPM428h8vShlRW1KT\",\n \"firstName\": \"Sara\",\n \"lastName\": \"Muller\",\n \"name\": \"Sara Muller\",\n \"email\": \"sara@salez.com.br\",\n \"gender\": \"female\",\n \"phone\": \"+5511934848735\",\n \"address1\": \"Av. Pres. Juscelino Kubitschek, 1327\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"postalCode\": \"04543-011\",\n \"website\": \"https://salez.com.br\",\n \"timezone\": \"America/Sao_Paulo\",\n \"dnd\": false,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"inactive\"\n }\n },\n \"tags\": [\n \"cliente\",\n \"atendimento\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"contato.segmento\",\n \"fieldValue\": \"Tecnologia\"\n }\n ],\n \"source\": \"Integração API\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"BR\",\n \"companyName\": \"Salez\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"inactive\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"id": "seD4PfOuKoVMLkEZqohJ",
"name": "Sara Muller",
"firstName": "Sara",
"lastName": "Muller",
"email": "sara@salez.com.br",
"phone": "+5511934848735",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
