Criar um cliente
curl --request POST \
--url https://api.olie.ai/api/management/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Cliente Exemplo - Filial Rio Preto",
"document_type": 2,
"customer_type": 1,
"company_name": "Cliente Exemplo Comércio LTDA",
"document": "12.345.678/0002-71",
"email": "[email protected]",
"phone": "(91) 99999-0000",
"address": "Av. Exemplo, 456 - Campinas/SP",
"status": true,
"parent_id": null,
"tags": {
"to_add": [],
"to_rem": []
}
}
'import requests
url = "https://api.olie.ai/api/management/customers"
payload = {
"name": "Cliente Exemplo - Filial Rio Preto",
"document_type": 2,
"customer_type": 1,
"company_name": "Cliente Exemplo Comércio LTDA",
"document": "12.345.678/0002-71",
"email": "[email protected]",
"phone": "(91) 99999-0000",
"address": "Av. Exemplo, 456 - Campinas/SP",
"status": True,
"parent_id": None,
"tags": {
"to_add": [],
"to_rem": []
}
}
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({
name: 'Cliente Exemplo - Filial Rio Preto',
document_type: 2,
customer_type: 1,
company_name: 'Cliente Exemplo Comércio LTDA',
document: '12.345.678/0002-71',
email: '[email protected]',
phone: '(91) 99999-0000',
address: 'Av. Exemplo, 456 - Campinas/SP',
status: true,
parent_id: null,
tags: {to_add: [], to_rem: []}
})
};
fetch('https://api.olie.ai/api/management/customers', 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.olie.ai/api/management/customers",
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' => 'Cliente Exemplo - Filial Rio Preto',
'document_type' => 2,
'customer_type' => 1,
'company_name' => 'Cliente Exemplo Comércio LTDA',
'document' => '12.345.678/0002-71',
'email' => '[email protected]',
'phone' => '(91) 99999-0000',
'address' => 'Av. Exemplo, 456 - Campinas/SP',
'status' => true,
'parent_id' => null,
'tags' => [
'to_add' => [
],
'to_rem' => [
]
]
]),
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://api.olie.ai/api/management/customers"
payload := strings.NewReader("{\n \"name\": \"Cliente Exemplo - Filial Rio Preto\",\n \"document_type\": 2,\n \"customer_type\": 1,\n \"company_name\": \"Cliente Exemplo Comércio LTDA\",\n \"document\": \"12.345.678/0002-71\",\n \"email\": \"[email protected]\",\n \"phone\": \"(91) 99999-0000\",\n \"address\": \"Av. Exemplo, 456 - Campinas/SP\",\n \"status\": true,\n \"parent_id\": null,\n \"tags\": {\n \"to_add\": [],\n \"to_rem\": []\n }\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://api.olie.ai/api/management/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Cliente Exemplo - Filial Rio Preto\",\n \"document_type\": 2,\n \"customer_type\": 1,\n \"company_name\": \"Cliente Exemplo Comércio LTDA\",\n \"document\": \"12.345.678/0002-71\",\n \"email\": \"[email protected]\",\n \"phone\": \"(91) 99999-0000\",\n \"address\": \"Av. Exemplo, 456 - Campinas/SP\",\n \"status\": true,\n \"parent_id\": null,\n \"tags\": {\n \"to_add\": [],\n \"to_rem\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/customers")
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 \"name\": \"Cliente Exemplo - Filial Rio Preto\",\n \"document_type\": 2,\n \"customer_type\": 1,\n \"company_name\": \"Cliente Exemplo Comércio LTDA\",\n \"document\": \"12.345.678/0002-71\",\n \"email\": \"[email protected]\",\n \"phone\": \"(91) 99999-0000\",\n \"address\": \"Av. Exemplo, 456 - Campinas/SP\",\n \"status\": true,\n \"parent_id\": null,\n \"tags\": {\n \"to_add\": [],\n \"to_rem\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"id": "019bc7f9-f586-7386-a27d-a070e8ae5ac2",
"name": "Cliente Exemplo - Filial Rio Preto",
"headquarter": "Cliente Exemplo - Filial Rio Preto",
"branch": null,
"company_name": "Cliente Exemplo Comércio LTDA",
"document_type": 2,
"customer_type": 1,
"document": "12.345.678/0000-00",
"main_activity": null,
"email": "[email protected]",
"phone": "(91) 99999-0000",
"address": "Av. Exemplo, 456 - Campinas/SP",
"description": null,
"custom_fields": null,
"status": true,
"form_answers": [],
"parent_id": null,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"created_at": "2026-01-16T18:03:25.000000Z",
"updated_at": "2026-01-16T18:03:25.000000Z",
"deleted_at": null,
"created_by": "019b329a-3f1f-7198-89e5-008dc4e2bd60"
},
"response": true
}customers
Criar um cliente
Criar um novo cliente.
POST
/
api
/
management
/
customers
Criar um cliente
curl --request POST \
--url https://api.olie.ai/api/management/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Cliente Exemplo - Filial Rio Preto",
"document_type": 2,
"customer_type": 1,
"company_name": "Cliente Exemplo Comércio LTDA",
"document": "12.345.678/0002-71",
"email": "[email protected]",
"phone": "(91) 99999-0000",
"address": "Av. Exemplo, 456 - Campinas/SP",
"status": true,
"parent_id": null,
"tags": {
"to_add": [],
"to_rem": []
}
}
'import requests
url = "https://api.olie.ai/api/management/customers"
payload = {
"name": "Cliente Exemplo - Filial Rio Preto",
"document_type": 2,
"customer_type": 1,
"company_name": "Cliente Exemplo Comércio LTDA",
"document": "12.345.678/0002-71",
"email": "[email protected]",
"phone": "(91) 99999-0000",
"address": "Av. Exemplo, 456 - Campinas/SP",
"status": True,
"parent_id": None,
"tags": {
"to_add": [],
"to_rem": []
}
}
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({
name: 'Cliente Exemplo - Filial Rio Preto',
document_type: 2,
customer_type: 1,
company_name: 'Cliente Exemplo Comércio LTDA',
document: '12.345.678/0002-71',
email: '[email protected]',
phone: '(91) 99999-0000',
address: 'Av. Exemplo, 456 - Campinas/SP',
status: true,
parent_id: null,
tags: {to_add: [], to_rem: []}
})
};
fetch('https://api.olie.ai/api/management/customers', 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.olie.ai/api/management/customers",
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' => 'Cliente Exemplo - Filial Rio Preto',
'document_type' => 2,
'customer_type' => 1,
'company_name' => 'Cliente Exemplo Comércio LTDA',
'document' => '12.345.678/0002-71',
'email' => '[email protected]',
'phone' => '(91) 99999-0000',
'address' => 'Av. Exemplo, 456 - Campinas/SP',
'status' => true,
'parent_id' => null,
'tags' => [
'to_add' => [
],
'to_rem' => [
]
]
]),
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://api.olie.ai/api/management/customers"
payload := strings.NewReader("{\n \"name\": \"Cliente Exemplo - Filial Rio Preto\",\n \"document_type\": 2,\n \"customer_type\": 1,\n \"company_name\": \"Cliente Exemplo Comércio LTDA\",\n \"document\": \"12.345.678/0002-71\",\n \"email\": \"[email protected]\",\n \"phone\": \"(91) 99999-0000\",\n \"address\": \"Av. Exemplo, 456 - Campinas/SP\",\n \"status\": true,\n \"parent_id\": null,\n \"tags\": {\n \"to_add\": [],\n \"to_rem\": []\n }\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://api.olie.ai/api/management/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Cliente Exemplo - Filial Rio Preto\",\n \"document_type\": 2,\n \"customer_type\": 1,\n \"company_name\": \"Cliente Exemplo Comércio LTDA\",\n \"document\": \"12.345.678/0002-71\",\n \"email\": \"[email protected]\",\n \"phone\": \"(91) 99999-0000\",\n \"address\": \"Av. Exemplo, 456 - Campinas/SP\",\n \"status\": true,\n \"parent_id\": null,\n \"tags\": {\n \"to_add\": [],\n \"to_rem\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/customers")
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 \"name\": \"Cliente Exemplo - Filial Rio Preto\",\n \"document_type\": 2,\n \"customer_type\": 1,\n \"company_name\": \"Cliente Exemplo Comércio LTDA\",\n \"document\": \"12.345.678/0002-71\",\n \"email\": \"[email protected]\",\n \"phone\": \"(91) 99999-0000\",\n \"address\": \"Av. Exemplo, 456 - Campinas/SP\",\n \"status\": true,\n \"parent_id\": null,\n \"tags\": {\n \"to_add\": [],\n \"to_rem\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"id": "019bc7f9-f586-7386-a27d-a070e8ae5ac2",
"name": "Cliente Exemplo - Filial Rio Preto",
"headquarter": "Cliente Exemplo - Filial Rio Preto",
"branch": null,
"company_name": "Cliente Exemplo Comércio LTDA",
"document_type": 2,
"customer_type": 1,
"document": "12.345.678/0000-00",
"main_activity": null,
"email": "[email protected]",
"phone": "(91) 99999-0000",
"address": "Av. Exemplo, 456 - Campinas/SP",
"description": null,
"custom_fields": null,
"status": true,
"form_answers": [],
"parent_id": null,
"frame_id": "019b329a-4346-7064-bba3-e7c19057cda4",
"created_at": "2026-01-16T18:03:25.000000Z",
"updated_at": "2026-01-16T18:03:25.000000Z",
"deleted_at": null,
"created_by": "019b329a-3f1f-7198-89e5-008dc4e2bd60"
},
"response": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Nome do contato
Maximum string length:
255Cargo do contato
E-mail do contato
Maximum string length:
254Telefone do contato
Maximum string length:
30Descrição do contato
Maximum string length:
255Clientes vinculados ao contato. Envie to_add (clientes a adicionar) e to_rem (clientes a remover).
Show child attributes
Show child attributes
Etiquetas do contato. Envie to_add (etiquetas a adicionar) e to_rem (etiquetas a remover).
Show child attributes
Show child attributes
Respostas do formulário dinâmico
Show child attributes
Show child attributes
Response
Sucesso (CNPJ)
Was this page helpful?
⌘I