Contatos
Create a contact
POST
/
v1
/
contacts
Create a contact
curl --request POST \
--url https://api4.kinbox.com.br/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customFields": {},
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": true,
"externalId": "<string>"
}
'import requests
url = "https://api4.kinbox.com.br/v1/contacts"
payload = {
"customFields": {},
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": True,
"externalId": "<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({
customFields: {},
name: '<string>',
avatar: '<string>',
email: '<string>',
phone: '<string>',
origin: '<string>',
location: '<string>',
notes: '<string>',
isPrivate: true,
externalId: '<string>'
})
};
fetch('https://api4.kinbox.com.br/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://api4.kinbox.com.br/v1/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([
'customFields' => [
],
'name' => '<string>',
'avatar' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'origin' => '<string>',
'location' => '<string>',
'notes' => '<string>',
'isPrivate' => true,
'externalId' => '<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://api4.kinbox.com.br/v1/contacts"
payload := strings.NewReader("{\n \"customFields\": {},\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}")
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://api4.kinbox.com.br/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customFields\": {},\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/contacts")
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 \"customFields\": {},\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}"
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.
Body
application/json
Show child attributes
Show child attributes
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
Response
201 - 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
Create a contact
curl --request POST \
--url https://api4.kinbox.com.br/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customFields": {},
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": true,
"externalId": "<string>"
}
'import requests
url = "https://api4.kinbox.com.br/v1/contacts"
payload = {
"customFields": {},
"name": "<string>",
"avatar": "<string>",
"email": "<string>",
"phone": "<string>",
"origin": "<string>",
"location": "<string>",
"notes": "<string>",
"isPrivate": True,
"externalId": "<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({
customFields: {},
name: '<string>',
avatar: '<string>',
email: '<string>',
phone: '<string>',
origin: '<string>',
location: '<string>',
notes: '<string>',
isPrivate: true,
externalId: '<string>'
})
};
fetch('https://api4.kinbox.com.br/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://api4.kinbox.com.br/v1/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([
'customFields' => [
],
'name' => '<string>',
'avatar' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'origin' => '<string>',
'location' => '<string>',
'notes' => '<string>',
'isPrivate' => true,
'externalId' => '<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://api4.kinbox.com.br/v1/contacts"
payload := strings.NewReader("{\n \"customFields\": {},\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}")
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://api4.kinbox.com.br/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customFields\": {},\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/contacts")
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 \"customFields\": {},\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}"
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
}