curl --request POST \
--url https://api.jurichat.com/people/ \
--header 'Content-Type: application/json' \
--header 'x-jurichat-api-key: <api-key>' \
--data '
{
"name": "<string>",
"phoneNumber": "<string>",
"inboxId": "<string>",
"isBlocked": true,
"email": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.jurichat.com/people/"
payload = {
"name": "<string>",
"phoneNumber": "<string>",
"inboxId": "<string>",
"isBlocked": True,
"email": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"tags": ["<string>"]
}
headers = {
"x-jurichat-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-jurichat-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phoneNumber: '<string>',
inboxId: '<string>',
isBlocked: true,
email: '<string>',
document: '<string>',
description: '<string>',
country: '<string>',
city: '<string>',
tags: ['<string>']
})
};
fetch('https://api.jurichat.com/people/', 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/",
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([
'name' => '<string>',
'phoneNumber' => '<string>',
'inboxId' => '<string>',
'isBlocked' => true,
'email' => '<string>',
'document' => '<string>',
'description' => '<string>',
'country' => '<string>',
'city' => '<string>',
'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/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"inboxId\": \"<string>\",\n \"isBlocked\": true,\n \"email\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.jurichat.com/people/")
.header("x-jurichat-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"inboxId\": \"<string>\",\n \"isBlocked\": true,\n \"email\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/people/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-jurichat-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"inboxId\": \"<string>\",\n \"isBlocked\": true,\n \"email\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"isBlocked": true,
"inboxId": "<string>",
"email": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"tags": [
"<string>"
]
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}Criar contato
Cria um novo contato vinculado à inbox informada. As tags devem existir na mesma inbox. Conflito de dados únicos retorna 409.
curl --request POST \
--url https://api.jurichat.com/people/ \
--header 'Content-Type: application/json' \
--header 'x-jurichat-api-key: <api-key>' \
--data '
{
"name": "<string>",
"phoneNumber": "<string>",
"inboxId": "<string>",
"isBlocked": true,
"email": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.jurichat.com/people/"
payload = {
"name": "<string>",
"phoneNumber": "<string>",
"inboxId": "<string>",
"isBlocked": True,
"email": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"tags": ["<string>"]
}
headers = {
"x-jurichat-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-jurichat-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phoneNumber: '<string>',
inboxId: '<string>',
isBlocked: true,
email: '<string>',
document: '<string>',
description: '<string>',
country: '<string>',
city: '<string>',
tags: ['<string>']
})
};
fetch('https://api.jurichat.com/people/', 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/",
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([
'name' => '<string>',
'phoneNumber' => '<string>',
'inboxId' => '<string>',
'isBlocked' => true,
'email' => '<string>',
'document' => '<string>',
'description' => '<string>',
'country' => '<string>',
'city' => '<string>',
'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/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"inboxId\": \"<string>\",\n \"isBlocked\": true,\n \"email\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.jurichat.com/people/")
.header("x-jurichat-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"inboxId\": \"<string>\",\n \"isBlocked\": true,\n \"email\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/people/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-jurichat-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"inboxId\": \"<string>\",\n \"isBlocked\": true,\n \"email\": \"<string>\",\n \"document\": \"<string>\",\n \"description\": \"<string>\",\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"isBlocked": true,
"inboxId": "<string>",
"email": "<string>",
"document": "<string>",
"description": "<string>",
"country": "<string>",
"city": "<string>",
"tags": [
"<string>"
]
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}{
"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.
Body
Nome do contato.
Número de telefone do contato.
ID da inbox à qual o contato será vinculado.
Define se o contato começa bloqueado.
E-mail do contato. Opcional.
CPF ou CNPJ. Aceita formato numérico ou alfanumérico (CNPJ). Opcional.
Anotações sobre o contato. Opcional.
País. Opcional.
Cidade. Opcional.
IDs de tags existentes na inbox. Omitir para criar sem tags.
Response
Default Response
ID do contato criado.
^[cC][^\s-]{8,}$Nome do contato.
Número de telefone do contato.
Indica se o contato está bloqueado.
ID da inbox à qual o contato pertence.
E-mail do contato. Omitido se não informado.
Documento do contato. Omitido se não informado.
Anotações sobre o contato. Omitido se não informado.
País. Omitido se não informado.
Cidade. Omitida se não informada.
IDs das tags associadas ao contato.