Contatos
Update a contact
PATCH
/
v1
/
contacts
/
{id}
Update a contact
curl --request PATCH \
--url https://api4.kinbox.com.br/v1/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": true,
"externalId": "<string>",
"customFields": {}
}
'import requests
url = "https://api4.kinbox.com.br/v1/contacts/{id}"
payload = {
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": True,
"externalId": "<string>",
"customFields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
avatar: '<string>',
email: '<string>',
phone: '<string>',
origin: '<string>',
location: '<string>',
notes: '<string>',
isPrivate: true,
externalId: '<string>',
customFields: {}
})
};
fetch('https://api4.kinbox.com.br/v1/contacts/{id}', 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://api4.kinbox.com.br/v1/contacts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'avatar' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'origin' => '<string>',
'location' => '<string>',
'notes' => '<string>',
'isPrivate' => true,
'externalId' => '<string>',
'customFields' => [
]
]),
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://api4.kinbox.com.br/v1/contacts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"avatar\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"origin\": \"<string>\",\n \"location\": \"<string>\",\n \"notes\": \"<string>\",\n \"isPrivate\": true,\n \"externalId\": \"<string>\",\n \"customFields\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api4.kinbox.com.br/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"avatar\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"origin\": \"<string>\",\n \"location\": \"<string>\",\n \"notes\": \"<string>\",\n \"isPrivate\": true,\n \"externalId\": \"<string>\",\n \"customFields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"avatar\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"origin\": \"<string>\",\n \"location\": \"<string>\",\n \"notes\": \"<string>\",\n \"isPrivate\": true,\n \"externalId\": \"<string>\",\n \"customFields\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"externalId": "<string>",
"origin": "<string>",
"location": "<string>",
"facebookId": "<string>",
"instagramId": "<string>",
"telegramId": "<string>",
"isImported": true,
"hasConversation": true,
"newContact": true,
"customFields": {
"cpf": {
"value": "060.715.303-54"
}
},
"crmData": {
"utmCampaigns": {},
"referrals": {
"_bg": "<string>",
"_bt": "<string>",
"gclid": "<string>",
"offer": "<string>",
"utm_ad": "<string>",
"utm_term": "<string>",
"source_id": "<string>",
"gad_source": "<string>",
"media_type": "<string>",
"source_url": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"source_type": "<string>",
"utm_ad_name": "<string>",
"utm_campaign": "<string>",
"utm_ad_collection": "<string>",
"utm_campaign_name": "<string>",
"utm_ad_collection_name": "<string>"
},
"hubspotId": "<string>",
"zohoId": "<string>",
"zohoType": "<string>",
"cloud_api": {}
},
"name": "João Silva",
"email": "joaosilva@gmail.com",
"phone": "5585997281648",
"avatar": "<string>",
"notes": "<string>",
"isPrivate": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
The contact’s full name or business name
Url of the contact image
The contact’s email address
The contact’s phone number
The contact’s notes
Private contacts can only be seen by users who have the permission to view private contacts
An external id to integrate with external systems
Show child attributes
Show child attributes
Response
200 - application/json
Show child attributes
Show child attributes
Example:
{ "cpf": { "value": "060.715.303-54" } }
Show child attributes
Show child attributes
The contact’s full name or business name
Example:
"João Silva"
The contact’s email address
Example:
"joaosilva@gmail.com"
The contact’s phone number
Example:
"5585997281648"
Url of the contact image
The contact’s notes
Private contacts can only be seen by users who have the permission to view private contacts
⌘I
Update a contact
curl --request PATCH \
--url https://api4.kinbox.com.br/v1/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": true,
"externalId": "<string>",
"customFields": {}
}
'import requests
url = "https://api4.kinbox.com.br/v1/contacts/{id}"
payload = {
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": True,
"externalId": "<string>",
"customFields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
avatar: '<string>',
email: '<string>',
phone: '<string>',
origin: '<string>',
location: '<string>',
notes: '<string>',
isPrivate: true,
externalId: '<string>',
customFields: {}
})
};
fetch('https://api4.kinbox.com.br/v1/contacts/{id}', 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://api4.kinbox.com.br/v1/contacts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'avatar' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'origin' => '<string>',
'location' => '<string>',
'notes' => '<string>',
'isPrivate' => true,
'externalId' => '<string>',
'customFields' => [
]
]),
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://api4.kinbox.com.br/v1/contacts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"avatar\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"origin\": \"<string>\",\n \"location\": \"<string>\",\n \"notes\": \"<string>\",\n \"isPrivate\": true,\n \"externalId\": \"<string>\",\n \"customFields\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api4.kinbox.com.br/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"avatar\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"origin\": \"<string>\",\n \"location\": \"<string>\",\n \"notes\": \"<string>\",\n \"isPrivate\": true,\n \"externalId\": \"<string>\",\n \"customFields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"avatar\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"origin\": \"<string>\",\n \"location\": \"<string>\",\n \"notes\": \"<string>\",\n \"isPrivate\": true,\n \"externalId\": \"<string>\",\n \"customFields\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"externalId": "<string>",
"origin": "<string>",
"location": "<string>",
"facebookId": "<string>",
"instagramId": "<string>",
"telegramId": "<string>",
"isImported": true,
"hasConversation": true,
"newContact": true,
"customFields": {
"cpf": {
"value": "060.715.303-54"
}
},
"crmData": {
"utmCampaigns": {},
"referrals": {
"_bg": "<string>",
"_bt": "<string>",
"gclid": "<string>",
"offer": "<string>",
"utm_ad": "<string>",
"utm_term": "<string>",
"source_id": "<string>",
"gad_source": "<string>",
"media_type": "<string>",
"source_url": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"source_type": "<string>",
"utm_ad_name": "<string>",
"utm_campaign": "<string>",
"utm_ad_collection": "<string>",
"utm_campaign_name": "<string>",
"utm_ad_collection_name": "<string>"
},
"hubspotId": "<string>",
"zohoId": "<string>",
"zohoType": "<string>",
"cloud_api": {}
},
"name": "João Silva",
"email": "joaosilva@gmail.com",
"phone": "5585997281648",
"avatar": "<string>",
"notes": "<string>",
"isPrivate": true
}