Atualizar contato
curl --request PUT \
--url https://services.leadconnectorhq.com/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"firstName": "rosan",
"lastName": "Deo",
"name": "rosan Deo",
"email": "rosan@deos.com",
"phone": "+1 888-888-8888",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"postalCode": "35061",
"website": "https://www.tesla.com",
"timezone": "America/Chihuahua",
"dnd": true,
"inboundDndSettings": {
"all": {
"status": "active",
"message": "Do not contact me"
}
},
"tags": [
"nisi sint commodo amet",
"consequat"
],
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"fieldValue": "My Text"
}
],
"source": "public api",
"dateOfBirth": "1990-09-25",
"country": "US",
"assignedTo": "y0BeYjuRIlDwsDcOHOJo",
"dndSettings": {
"call": {
"status": "active",
"message": "Do not call"
},
"email": {
"status": "inactive"
}
}
}
'import requests
url = "https://services.leadconnectorhq.com/contacts/{contactId}"
payload = {
"firstName": "rosan",
"lastName": "Deo",
"name": "rosan Deo",
"email": "rosan@deos.com",
"phone": "+1 888-888-8888",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"postalCode": "35061",
"website": "https://www.tesla.com",
"timezone": "America/Chihuahua",
"dnd": True,
"inboundDndSettings": { "all": {
"status": "active",
"message": "Do not contact me"
} },
"tags": ["nisi sint commodo amet", "consequat"],
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"fieldValue": "My Text"
}
],
"source": "public api",
"dateOfBirth": "1990-09-25",
"country": "US",
"assignedTo": "y0BeYjuRIlDwsDcOHOJo",
"dndSettings": {
"call": {
"status": "active",
"message": "Do not call"
},
"email": { "status": "inactive" }
}
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'rosan',
lastName: 'Deo',
name: 'rosan Deo',
email: 'rosan@deos.com',
phone: '+1 888-888-8888',
address1: '3535 1st St N',
city: 'Dolomite',
state: 'AL',
postalCode: '35061',
website: 'https://www.tesla.com',
timezone: 'America/Chihuahua',
dnd: true,
inboundDndSettings: {all: {status: 'active', message: 'Do not contact me'}},
tags: ['nisi sint commodo amet', 'consequat'],
customFields: [{id: '6dvNaf7VhkQ9snc5vnjJ', key: 'my_custom_field', fieldValue: 'My Text'}],
source: 'public api',
dateOfBirth: '1990-09-25',
country: 'US',
assignedTo: 'y0BeYjuRIlDwsDcOHOJo',
dndSettings: {call: {status: 'active', message: 'Do not call'}, email: {status: 'inactive'}}
})
};
fetch('https://services.leadconnectorhq.com/contacts/{contactId}', 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/{contactId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'rosan',
'lastName' => 'Deo',
'name' => 'rosan Deo',
'email' => 'rosan@deos.com',
'phone' => '+1 888-888-8888',
'address1' => '3535 1st St N',
'city' => 'Dolomite',
'state' => 'AL',
'postalCode' => '35061',
'website' => 'https://www.tesla.com',
'timezone' => 'America/Chihuahua',
'dnd' => true,
'inboundDndSettings' => [
'all' => [
'status' => 'active',
'message' => 'Do not contact me'
]
],
'tags' => [
'nisi sint commodo amet',
'consequat'
],
'customFields' => [
[
'id' => '6dvNaf7VhkQ9snc5vnjJ',
'key' => 'my_custom_field',
'fieldValue' => 'My Text'
]
],
'source' => 'public api',
'dateOfBirth' => '1990-09-25',
'country' => 'US',
'assignedTo' => 'y0BeYjuRIlDwsDcOHOJo',
'dndSettings' => [
'call' => [
'status' => 'active',
'message' => 'Do not call'
],
'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/{contactId}"
payload := strings.NewReader("{\n \"firstName\": \"rosan\",\n \"lastName\": \"Deo\",\n \"name\": \"rosan Deo\",\n \"email\": \"rosan@deos.com\",\n \"phone\": \"+1 888-888-8888\",\n \"address1\": \"3535 1st St N\",\n \"city\": \"Dolomite\",\n \"state\": \"AL\",\n \"postalCode\": \"35061\",\n \"website\": \"https://www.tesla.com\",\n \"timezone\": \"America/Chihuahua\",\n \"dnd\": true,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"active\",\n \"message\": \"Do not contact me\"\n }\n },\n \"tags\": [\n \"nisi sint commodo amet\",\n \"consequat\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"my_custom_field\",\n \"fieldValue\": \"My Text\"\n }\n ],\n \"source\": \"public api\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"US\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"active\",\n \"message\": \"Do not call\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://services.leadconnectorhq.com/contacts/{contactId}")
.header("Version", "<version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"rosan\",\n \"lastName\": \"Deo\",\n \"name\": \"rosan Deo\",\n \"email\": \"rosan@deos.com\",\n \"phone\": \"+1 888-888-8888\",\n \"address1\": \"3535 1st St N\",\n \"city\": \"Dolomite\",\n \"state\": \"AL\",\n \"postalCode\": \"35061\",\n \"website\": \"https://www.tesla.com\",\n \"timezone\": \"America/Chihuahua\",\n \"dnd\": true,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"active\",\n \"message\": \"Do not contact me\"\n }\n },\n \"tags\": [\n \"nisi sint commodo amet\",\n \"consequat\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"my_custom_field\",\n \"fieldValue\": \"My Text\"\n }\n ],\n \"source\": \"public api\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"US\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"active\",\n \"message\": \"Do not call\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.leadconnectorhq.com/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Version"] = '<version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"rosan\",\n \"lastName\": \"Deo\",\n \"name\": \"rosan Deo\",\n \"email\": \"rosan@deos.com\",\n \"phone\": \"+1 888-888-8888\",\n \"address1\": \"3535 1st St N\",\n \"city\": \"Dolomite\",\n \"state\": \"AL\",\n \"postalCode\": \"35061\",\n \"website\": \"https://www.tesla.com\",\n \"timezone\": \"America/Chihuahua\",\n \"dnd\": true,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"active\",\n \"message\": \"Do not contact me\"\n }\n },\n \"tags\": [\n \"nisi sint commodo amet\",\n \"consequat\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"my_custom_field\",\n \"fieldValue\": \"My Text\"\n }\n ],\n \"source\": \"public api\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"US\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"active\",\n \"message\": \"Do not call\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"succeeded": true,
"contact": {
"id": "seD4PfOuKoVMLkEZqohJ",
"name": "rubika deo",
"email": "rubika@deos.com",
"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"
}Contatos
Atualizar contato
Atualiza um contato identificado por contactId. O envio do campo tags substitui todas as etiquetas existentes do contato.
Autenticação: envie um token de acesso da subconta ou um token de integração privada da subconta no cabeçalho Authorization: Bearer <token>. Permissão necessária: contacts.write. Envie também o cabeçalho Version: v3.
PUT
/
contacts
/
{contactId}
Atualizar contato
curl --request PUT \
--url https://services.leadconnectorhq.com/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"firstName": "rosan",
"lastName": "Deo",
"name": "rosan Deo",
"email": "rosan@deos.com",
"phone": "+1 888-888-8888",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"postalCode": "35061",
"website": "https://www.tesla.com",
"timezone": "America/Chihuahua",
"dnd": true,
"inboundDndSettings": {
"all": {
"status": "active",
"message": "Do not contact me"
}
},
"tags": [
"nisi sint commodo amet",
"consequat"
],
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"fieldValue": "My Text"
}
],
"source": "public api",
"dateOfBirth": "1990-09-25",
"country": "US",
"assignedTo": "y0BeYjuRIlDwsDcOHOJo",
"dndSettings": {
"call": {
"status": "active",
"message": "Do not call"
},
"email": {
"status": "inactive"
}
}
}
'import requests
url = "https://services.leadconnectorhq.com/contacts/{contactId}"
payload = {
"firstName": "rosan",
"lastName": "Deo",
"name": "rosan Deo",
"email": "rosan@deos.com",
"phone": "+1 888-888-8888",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"postalCode": "35061",
"website": "https://www.tesla.com",
"timezone": "America/Chihuahua",
"dnd": True,
"inboundDndSettings": { "all": {
"status": "active",
"message": "Do not contact me"
} },
"tags": ["nisi sint commodo amet", "consequat"],
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"fieldValue": "My Text"
}
],
"source": "public api",
"dateOfBirth": "1990-09-25",
"country": "US",
"assignedTo": "y0BeYjuRIlDwsDcOHOJo",
"dndSettings": {
"call": {
"status": "active",
"message": "Do not call"
},
"email": { "status": "inactive" }
}
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'rosan',
lastName: 'Deo',
name: 'rosan Deo',
email: 'rosan@deos.com',
phone: '+1 888-888-8888',
address1: '3535 1st St N',
city: 'Dolomite',
state: 'AL',
postalCode: '35061',
website: 'https://www.tesla.com',
timezone: 'America/Chihuahua',
dnd: true,
inboundDndSettings: {all: {status: 'active', message: 'Do not contact me'}},
tags: ['nisi sint commodo amet', 'consequat'],
customFields: [{id: '6dvNaf7VhkQ9snc5vnjJ', key: 'my_custom_field', fieldValue: 'My Text'}],
source: 'public api',
dateOfBirth: '1990-09-25',
country: 'US',
assignedTo: 'y0BeYjuRIlDwsDcOHOJo',
dndSettings: {call: {status: 'active', message: 'Do not call'}, email: {status: 'inactive'}}
})
};
fetch('https://services.leadconnectorhq.com/contacts/{contactId}', 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/{contactId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'rosan',
'lastName' => 'Deo',
'name' => 'rosan Deo',
'email' => 'rosan@deos.com',
'phone' => '+1 888-888-8888',
'address1' => '3535 1st St N',
'city' => 'Dolomite',
'state' => 'AL',
'postalCode' => '35061',
'website' => 'https://www.tesla.com',
'timezone' => 'America/Chihuahua',
'dnd' => true,
'inboundDndSettings' => [
'all' => [
'status' => 'active',
'message' => 'Do not contact me'
]
],
'tags' => [
'nisi sint commodo amet',
'consequat'
],
'customFields' => [
[
'id' => '6dvNaf7VhkQ9snc5vnjJ',
'key' => 'my_custom_field',
'fieldValue' => 'My Text'
]
],
'source' => 'public api',
'dateOfBirth' => '1990-09-25',
'country' => 'US',
'assignedTo' => 'y0BeYjuRIlDwsDcOHOJo',
'dndSettings' => [
'call' => [
'status' => 'active',
'message' => 'Do not call'
],
'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/{contactId}"
payload := strings.NewReader("{\n \"firstName\": \"rosan\",\n \"lastName\": \"Deo\",\n \"name\": \"rosan Deo\",\n \"email\": \"rosan@deos.com\",\n \"phone\": \"+1 888-888-8888\",\n \"address1\": \"3535 1st St N\",\n \"city\": \"Dolomite\",\n \"state\": \"AL\",\n \"postalCode\": \"35061\",\n \"website\": \"https://www.tesla.com\",\n \"timezone\": \"America/Chihuahua\",\n \"dnd\": true,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"active\",\n \"message\": \"Do not contact me\"\n }\n },\n \"tags\": [\n \"nisi sint commodo amet\",\n \"consequat\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"my_custom_field\",\n \"fieldValue\": \"My Text\"\n }\n ],\n \"source\": \"public api\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"US\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"active\",\n \"message\": \"Do not call\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://services.leadconnectorhq.com/contacts/{contactId}")
.header("Version", "<version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"rosan\",\n \"lastName\": \"Deo\",\n \"name\": \"rosan Deo\",\n \"email\": \"rosan@deos.com\",\n \"phone\": \"+1 888-888-8888\",\n \"address1\": \"3535 1st St N\",\n \"city\": \"Dolomite\",\n \"state\": \"AL\",\n \"postalCode\": \"35061\",\n \"website\": \"https://www.tesla.com\",\n \"timezone\": \"America/Chihuahua\",\n \"dnd\": true,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"active\",\n \"message\": \"Do not contact me\"\n }\n },\n \"tags\": [\n \"nisi sint commodo amet\",\n \"consequat\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"my_custom_field\",\n \"fieldValue\": \"My Text\"\n }\n ],\n \"source\": \"public api\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"US\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"active\",\n \"message\": \"Do not call\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.leadconnectorhq.com/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Version"] = '<version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"rosan\",\n \"lastName\": \"Deo\",\n \"name\": \"rosan Deo\",\n \"email\": \"rosan@deos.com\",\n \"phone\": \"+1 888-888-8888\",\n \"address1\": \"3535 1st St N\",\n \"city\": \"Dolomite\",\n \"state\": \"AL\",\n \"postalCode\": \"35061\",\n \"website\": \"https://www.tesla.com\",\n \"timezone\": \"America/Chihuahua\",\n \"dnd\": true,\n \"inboundDndSettings\": {\n \"all\": {\n \"status\": \"active\",\n \"message\": \"Do not contact me\"\n }\n },\n \"tags\": [\n \"nisi sint commodo amet\",\n \"consequat\"\n ],\n \"customFields\": [\n {\n \"id\": \"6dvNaf7VhkQ9snc5vnjJ\",\n \"key\": \"my_custom_field\",\n \"fieldValue\": \"My Text\"\n }\n ],\n \"source\": \"public api\",\n \"dateOfBirth\": \"1990-09-25\",\n \"country\": \"US\",\n \"assignedTo\": \"y0BeYjuRIlDwsDcOHOJo\",\n \"dndSettings\": {\n \"call\": {\n \"status\": \"active\",\n \"message\": \"Do not call\"\n },\n \"email\": {\n \"status\": \"inactive\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"succeeded": true,
"contact": {
"id": "seD4PfOuKoVMLkEZqohJ",
"name": "rubika deo",
"email": "rubika@deos.com",
"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"
}Autorizações
Cabeçalhos
Parâmetros de caminho
Corpo
application/json