Atualizar contato
curl --request PATCH \
--url https://api.jurichat.com/people/{peopleId} \
--header 'Content-Type: application/json' \
--header 'x-jurichat-api-key: <api-key>' \
--data '
{
"inboxId": "<string>",
"name": "<string>",
"imageUrl": "<string>",
"phoneNumber": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"email": "<string>",
"isBlocked": true,
"tags": [
"<string>"
]
}
'import requests
url = "https://api.jurichat.com/people/{peopleId}"
payload = {
"inboxId": "<string>",
"name": "<string>",
"imageUrl": "<string>",
"phoneNumber": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"email": "<string>",
"isBlocked": True,
"tags": ["<string>"]
}
headers = {
"x-jurichat-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-jurichat-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inboxId: '<string>',
name: '<string>',
imageUrl: '<string>',
phoneNumber: '<string>',
document: '<string>',
description: '<string>',
country: '<string>',
city: '<string>',
email: '<string>',
isBlocked: true,
tags: ['<string>']
})
};
fetch('https://api.jurichat.com/people/{peopleId}', 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.jurichat.com/people/{peopleId}",
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([
'inboxId' => '<string>',
'name' => '<string>',
'imageUrl' => '<string>',
'phoneNumber' => '<string>',
'document' => '<string>',
'description' => '<string>',
'country' => '<string>',
'city' => '<string>',
'email' => '<string>',
'isBlocked' => true,
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-jurichat-api-key: <api-key>"
],
]);
$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.jurichat.com/people/{peopleId}"
payload := strings.NewReader("{\n \"inboxId\": \"<string>\",\n \"name\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"isBlocked\": true,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-jurichat-api-key", "<api-key>")
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://api.jurichat.com/people/{peopleId}")
.header("x-jurichat-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inboxId\": \"<string>\",\n \"name\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"isBlocked\": true,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/people/{peopleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-jurichat-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inboxId\": \"<string>\",\n \"name\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"isBlocked\": true,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}Contacts
Atualizar contato
Atualização parcial: campos omitidos não são zerados. tags, quando presente, redefine todas as associações na inbox.
PATCH
/
people
/
{peopleId}
Atualizar contato
curl --request PATCH \
--url https://api.jurichat.com/people/{peopleId} \
--header 'Content-Type: application/json' \
--header 'x-jurichat-api-key: <api-key>' \
--data '
{
"inboxId": "<string>",
"name": "<string>",
"imageUrl": "<string>",
"phoneNumber": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"email": "<string>",
"isBlocked": true,
"tags": [
"<string>"
]
}
'import requests
url = "https://api.jurichat.com/people/{peopleId}"
payload = {
"inboxId": "<string>",
"name": "<string>",
"imageUrl": "<string>",
"phoneNumber": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"email": "<string>",
"isBlocked": True,
"tags": ["<string>"]
}
headers = {
"x-jurichat-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-jurichat-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inboxId: '<string>',
name: '<string>',
imageUrl: '<string>',
phoneNumber: '<string>',
document: '<string>',
description: '<string>',
country: '<string>',
city: '<string>',
email: '<string>',
isBlocked: true,
tags: ['<string>']
})
};
fetch('https://api.jurichat.com/people/{peopleId}', 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.jurichat.com/people/{peopleId}",
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([
'inboxId' => '<string>',
'name' => '<string>',
'imageUrl' => '<string>',
'phoneNumber' => '<string>',
'document' => '<string>',
'description' => '<string>',
'country' => '<string>',
'city' => '<string>',
'email' => '<string>',
'isBlocked' => true,
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-jurichat-api-key: <api-key>"
],
]);
$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.jurichat.com/people/{peopleId}"
payload := strings.NewReader("{\n \"inboxId\": \"<string>\",\n \"name\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"isBlocked\": true,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-jurichat-api-key", "<api-key>")
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://api.jurichat.com/people/{peopleId}")
.header("x-jurichat-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inboxId\": \"<string>\",\n \"name\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"isBlocked\": true,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/people/{peopleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-jurichat-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inboxId\": \"<string>\",\n \"name\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"isBlocked\": true,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}Authorizations
Chave de API do escritório (criada no painel). Envie o valor no header x-jurichat-api-key.
Path Parameters
ID do contato.
Pattern:
^[cC][^\s-]{8,}$Body
application/json
ID da inbox. Usado para localizar o contato corretamente.
Novo nome do contato.
Nova URL de avatar.
Novo número de telefone.
Novo documento (CPF ou CNPJ, numérico ou alfanumérico).
Novas anotações sobre o contato.
Novo país.
Nova cidade.
Novo e-mail.
Altera o status de bloqueio do contato.
Substitui todas as tags do contato pelos IDs enviados.
Response
Confirmação da operação.
Confirmação da operação.
⌘I