curl --request POST \
--url https://api.g1.datacrazy.io/api/v1/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Guilherme Gavazzoni",
"image": "https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b",
"phone": "+55 (47) 991331190",
"email": "guilherme@datacrazy.com.br",
"source": "Google ads",
"company": "Apple",
"taxId": "108.154.702-92",
"site": "www.meulead.com.br",
"instagram": "@guilhermegavazzoni",
"address": {
"zip": "88338-130",
"address": "Avenida Brasil",
"block": "Centro",
"city": "Balneário Camboriú",
"state": "SC",
"country": "BR"
},
"sourceReferral": {
"sourceId": "2bc3d979-93a4-4e64-8903-5d9379d3de91",
"sourceUrl": "https://example.com/artigo-de-origem",
"ctwaId": "849fefab-e697-4720-9303-e788c23790cc"
},
"tags": [
{
"id": [
"<string>"
]
}
],
"lists": [
{
"id": [
"<string>"
]
}
],
"attendant": {
"id": "<string>"
},
"notes": {
"id": "<string>"
}
}
'import requests
url = "https://api.g1.datacrazy.io/api/v1/leads"
payload = {
"name": "Guilherme Gavazzoni",
"image": "https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b",
"phone": "+55 (47) 991331190",
"email": "guilherme@datacrazy.com.br",
"source": "Google ads",
"company": "Apple",
"taxId": "108.154.702-92",
"site": "www.meulead.com.br",
"instagram": "@guilhermegavazzoni",
"address": {
"zip": "88338-130",
"address": "Avenida Brasil",
"block": "Centro",
"city": "Balneário Camboriú",
"state": "SC",
"country": "BR"
},
"sourceReferral": {
"sourceId": "2bc3d979-93a4-4e64-8903-5d9379d3de91",
"sourceUrl": "https://example.com/artigo-de-origem",
"ctwaId": "849fefab-e697-4720-9303-e788c23790cc"
},
"tags": [{ "id": ["<string>"] }],
"lists": [{ "id": ["<string>"] }],
"attendant": { "id": "<string>" },
"notes": { "id": "<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({
name: 'Guilherme Gavazzoni',
image: 'https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b',
phone: '+55 (47) 991331190',
email: 'guilherme@datacrazy.com.br',
source: 'Google ads',
company: 'Apple',
taxId: '108.154.702-92',
site: 'www.meulead.com.br',
instagram: '@guilhermegavazzoni',
address: {
zip: '88338-130',
address: 'Avenida Brasil',
block: 'Centro',
city: 'Balneário Camboriú',
state: 'SC',
country: 'BR'
},
sourceReferral: {
sourceId: '2bc3d979-93a4-4e64-8903-5d9379d3de91',
sourceUrl: 'https://example.com/artigo-de-origem',
ctwaId: '849fefab-e697-4720-9303-e788c23790cc'
},
tags: [{id: ['<string>']}],
lists: [{id: ['<string>']}],
attendant: {id: '<string>'},
notes: {id: '<string>'}
})
};
fetch('https://api.g1.datacrazy.io/api/v1/leads', 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.g1.datacrazy.io/api/v1/leads",
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' => 'Guilherme Gavazzoni',
'image' => 'https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b',
'phone' => '+55 (47) 991331190',
'email' => 'guilherme@datacrazy.com.br',
'source' => 'Google ads',
'company' => 'Apple',
'taxId' => '108.154.702-92',
'site' => 'www.meulead.com.br',
'instagram' => '@guilhermegavazzoni',
'address' => [
'zip' => '88338-130',
'address' => 'Avenida Brasil',
'block' => 'Centro',
'city' => 'Balneário Camboriú',
'state' => 'SC',
'country' => 'BR'
],
'sourceReferral' => [
'sourceId' => '2bc3d979-93a4-4e64-8903-5d9379d3de91',
'sourceUrl' => 'https://example.com/artigo-de-origem',
'ctwaId' => '849fefab-e697-4720-9303-e788c23790cc'
],
'tags' => [
[
'id' => [
'<string>'
]
]
],
'lists' => [
[
'id' => [
'<string>'
]
]
],
'attendant' => [
'id' => '<string>'
],
'notes' => [
'id' => '<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://api.g1.datacrazy.io/api/v1/leads"
payload := strings.NewReader("{\n \"name\": \"Guilherme Gavazzoni\",\n \"image\": \"https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b\",\n \"phone\": \"+55 (47) 991331190\",\n \"email\": \"guilherme@datacrazy.com.br\",\n \"source\": \"Google ads\",\n \"company\": \"Apple\",\n \"taxId\": \"108.154.702-92\",\n \"site\": \"www.meulead.com.br\",\n \"instagram\": \"@guilhermegavazzoni\",\n \"address\": {\n \"zip\": \"88338-130\",\n \"address\": \"Avenida Brasil\",\n \"block\": \"Centro\",\n \"city\": \"Balneário Camboriú\",\n \"state\": \"SC\",\n \"country\": \"BR\"\n },\n \"sourceReferral\": {\n \"sourceId\": \"2bc3d979-93a4-4e64-8903-5d9379d3de91\",\n \"sourceUrl\": \"https://example.com/artigo-de-origem\",\n \"ctwaId\": \"849fefab-e697-4720-9303-e788c23790cc\"\n },\n \"tags\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"lists\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"attendant\": {\n \"id\": \"<string>\"\n },\n \"notes\": {\n \"id\": \"<string>\"\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.g1.datacrazy.io/api/v1/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Guilherme Gavazzoni\",\n \"image\": \"https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b\",\n \"phone\": \"+55 (47) 991331190\",\n \"email\": \"guilherme@datacrazy.com.br\",\n \"source\": \"Google ads\",\n \"company\": \"Apple\",\n \"taxId\": \"108.154.702-92\",\n \"site\": \"www.meulead.com.br\",\n \"instagram\": \"@guilhermegavazzoni\",\n \"address\": {\n \"zip\": \"88338-130\",\n \"address\": \"Avenida Brasil\",\n \"block\": \"Centro\",\n \"city\": \"Balneário Camboriú\",\n \"state\": \"SC\",\n \"country\": \"BR\"\n },\n \"sourceReferral\": {\n \"sourceId\": \"2bc3d979-93a4-4e64-8903-5d9379d3de91\",\n \"sourceUrl\": \"https://example.com/artigo-de-origem\",\n \"ctwaId\": \"849fefab-e697-4720-9303-e788c23790cc\"\n },\n \"tags\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"lists\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"attendant\": {\n \"id\": \"<string>\"\n },\n \"notes\": {\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.g1.datacrazy.io/api/v1/leads")
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\": \"Guilherme Gavazzoni\",\n \"image\": \"https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b\",\n \"phone\": \"+55 (47) 991331190\",\n \"email\": \"guilherme@datacrazy.com.br\",\n \"source\": \"Google ads\",\n \"company\": \"Apple\",\n \"taxId\": \"108.154.702-92\",\n \"site\": \"www.meulead.com.br\",\n \"instagram\": \"@guilhermegavazzoni\",\n \"address\": {\n \"zip\": \"88338-130\",\n \"address\": \"Avenida Brasil\",\n \"block\": \"Centro\",\n \"city\": \"Balneário Camboriú\",\n \"state\": \"SC\",\n \"country\": \"BR\"\n },\n \"sourceReferral\": {\n \"sourceId\": \"2bc3d979-93a4-4e64-8903-5d9379d3de91\",\n \"sourceUrl\": \"https://example.com/artigo-de-origem\",\n \"ctwaId\": \"849fefab-e697-4720-9303-e788c23790cc\"\n },\n \"tags\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"lists\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"attendant\": {\n \"id\": \"<string>\"\n },\n \"notes\": {\n \"id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyCriar lead
Cadastrar um novo lead
curl --request POST \
--url https://api.g1.datacrazy.io/api/v1/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Guilherme Gavazzoni",
"image": "https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b",
"phone": "+55 (47) 991331190",
"email": "guilherme@datacrazy.com.br",
"source": "Google ads",
"company": "Apple",
"taxId": "108.154.702-92",
"site": "www.meulead.com.br",
"instagram": "@guilhermegavazzoni",
"address": {
"zip": "88338-130",
"address": "Avenida Brasil",
"block": "Centro",
"city": "Balneário Camboriú",
"state": "SC",
"country": "BR"
},
"sourceReferral": {
"sourceId": "2bc3d979-93a4-4e64-8903-5d9379d3de91",
"sourceUrl": "https://example.com/artigo-de-origem",
"ctwaId": "849fefab-e697-4720-9303-e788c23790cc"
},
"tags": [
{
"id": [
"<string>"
]
}
],
"lists": [
{
"id": [
"<string>"
]
}
],
"attendant": {
"id": "<string>"
},
"notes": {
"id": "<string>"
}
}
'import requests
url = "https://api.g1.datacrazy.io/api/v1/leads"
payload = {
"name": "Guilherme Gavazzoni",
"image": "https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b",
"phone": "+55 (47) 991331190",
"email": "guilherme@datacrazy.com.br",
"source": "Google ads",
"company": "Apple",
"taxId": "108.154.702-92",
"site": "www.meulead.com.br",
"instagram": "@guilhermegavazzoni",
"address": {
"zip": "88338-130",
"address": "Avenida Brasil",
"block": "Centro",
"city": "Balneário Camboriú",
"state": "SC",
"country": "BR"
},
"sourceReferral": {
"sourceId": "2bc3d979-93a4-4e64-8903-5d9379d3de91",
"sourceUrl": "https://example.com/artigo-de-origem",
"ctwaId": "849fefab-e697-4720-9303-e788c23790cc"
},
"tags": [{ "id": ["<string>"] }],
"lists": [{ "id": ["<string>"] }],
"attendant": { "id": "<string>" },
"notes": { "id": "<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({
name: 'Guilherme Gavazzoni',
image: 'https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b',
phone: '+55 (47) 991331190',
email: 'guilherme@datacrazy.com.br',
source: 'Google ads',
company: 'Apple',
taxId: '108.154.702-92',
site: 'www.meulead.com.br',
instagram: '@guilhermegavazzoni',
address: {
zip: '88338-130',
address: 'Avenida Brasil',
block: 'Centro',
city: 'Balneário Camboriú',
state: 'SC',
country: 'BR'
},
sourceReferral: {
sourceId: '2bc3d979-93a4-4e64-8903-5d9379d3de91',
sourceUrl: 'https://example.com/artigo-de-origem',
ctwaId: '849fefab-e697-4720-9303-e788c23790cc'
},
tags: [{id: ['<string>']}],
lists: [{id: ['<string>']}],
attendant: {id: '<string>'},
notes: {id: '<string>'}
})
};
fetch('https://api.g1.datacrazy.io/api/v1/leads', 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.g1.datacrazy.io/api/v1/leads",
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' => 'Guilherme Gavazzoni',
'image' => 'https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b',
'phone' => '+55 (47) 991331190',
'email' => 'guilherme@datacrazy.com.br',
'source' => 'Google ads',
'company' => 'Apple',
'taxId' => '108.154.702-92',
'site' => 'www.meulead.com.br',
'instagram' => '@guilhermegavazzoni',
'address' => [
'zip' => '88338-130',
'address' => 'Avenida Brasil',
'block' => 'Centro',
'city' => 'Balneário Camboriú',
'state' => 'SC',
'country' => 'BR'
],
'sourceReferral' => [
'sourceId' => '2bc3d979-93a4-4e64-8903-5d9379d3de91',
'sourceUrl' => 'https://example.com/artigo-de-origem',
'ctwaId' => '849fefab-e697-4720-9303-e788c23790cc'
],
'tags' => [
[
'id' => [
'<string>'
]
]
],
'lists' => [
[
'id' => [
'<string>'
]
]
],
'attendant' => [
'id' => '<string>'
],
'notes' => [
'id' => '<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://api.g1.datacrazy.io/api/v1/leads"
payload := strings.NewReader("{\n \"name\": \"Guilherme Gavazzoni\",\n \"image\": \"https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b\",\n \"phone\": \"+55 (47) 991331190\",\n \"email\": \"guilherme@datacrazy.com.br\",\n \"source\": \"Google ads\",\n \"company\": \"Apple\",\n \"taxId\": \"108.154.702-92\",\n \"site\": \"www.meulead.com.br\",\n \"instagram\": \"@guilhermegavazzoni\",\n \"address\": {\n \"zip\": \"88338-130\",\n \"address\": \"Avenida Brasil\",\n \"block\": \"Centro\",\n \"city\": \"Balneário Camboriú\",\n \"state\": \"SC\",\n \"country\": \"BR\"\n },\n \"sourceReferral\": {\n \"sourceId\": \"2bc3d979-93a4-4e64-8903-5d9379d3de91\",\n \"sourceUrl\": \"https://example.com/artigo-de-origem\",\n \"ctwaId\": \"849fefab-e697-4720-9303-e788c23790cc\"\n },\n \"tags\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"lists\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"attendant\": {\n \"id\": \"<string>\"\n },\n \"notes\": {\n \"id\": \"<string>\"\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.g1.datacrazy.io/api/v1/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Guilherme Gavazzoni\",\n \"image\": \"https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b\",\n \"phone\": \"+55 (47) 991331190\",\n \"email\": \"guilherme@datacrazy.com.br\",\n \"source\": \"Google ads\",\n \"company\": \"Apple\",\n \"taxId\": \"108.154.702-92\",\n \"site\": \"www.meulead.com.br\",\n \"instagram\": \"@guilhermegavazzoni\",\n \"address\": {\n \"zip\": \"88338-130\",\n \"address\": \"Avenida Brasil\",\n \"block\": \"Centro\",\n \"city\": \"Balneário Camboriú\",\n \"state\": \"SC\",\n \"country\": \"BR\"\n },\n \"sourceReferral\": {\n \"sourceId\": \"2bc3d979-93a4-4e64-8903-5d9379d3de91\",\n \"sourceUrl\": \"https://example.com/artigo-de-origem\",\n \"ctwaId\": \"849fefab-e697-4720-9303-e788c23790cc\"\n },\n \"tags\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"lists\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"attendant\": {\n \"id\": \"<string>\"\n },\n \"notes\": {\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.g1.datacrazy.io/api/v1/leads")
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\": \"Guilherme Gavazzoni\",\n \"image\": \"https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b\",\n \"phone\": \"+55 (47) 991331190\",\n \"email\": \"guilherme@datacrazy.com.br\",\n \"source\": \"Google ads\",\n \"company\": \"Apple\",\n \"taxId\": \"108.154.702-92\",\n \"site\": \"www.meulead.com.br\",\n \"instagram\": \"@guilhermegavazzoni\",\n \"address\": {\n \"zip\": \"88338-130\",\n \"address\": \"Avenida Brasil\",\n \"block\": \"Centro\",\n \"city\": \"Balneário Camboriú\",\n \"state\": \"SC\",\n \"country\": \"BR\"\n },\n \"sourceReferral\": {\n \"sourceId\": \"2bc3d979-93a4-4e64-8903-5d9379d3de91\",\n \"sourceUrl\": \"https://example.com/artigo-de-origem\",\n \"ctwaId\": \"849fefab-e697-4720-9303-e788c23790cc\"\n },\n \"tags\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"lists\": [\n {\n \"id\": [\n \"<string>\"\n ]\n }\n ],\n \"attendant\": {\n \"id\": \"<string>\"\n },\n \"notes\": {\n \"id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Array de ID de tags
"Guilherme Gavazzoni"
Url da Imagem do lead
"https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/1163f5c2-62f4-443f-a84f-9c223b05ae3b"
Telefone do lead
"+55 (47) 991331190"
Email do lead
"guilherme@datacrazy.com.br"
Origem do lead
"Google ads"
Empresa do lead
"Apple"
Documento de identificação
"108.154.702-92"
Site do lead
"www.meulead.com.br"
Instagram do lead
"@guilhermegavazzoni"
Endereço vinculado ao lead
Show child attributes
Show child attributes
{ "zip": "88338-130", "address": "Avenida Brasil", "block": "Centro", "city": "Balneário Camboriú", "state": "SC", "country": "BR" }
Fonte de referencia do lead
Show child attributes
Show child attributes
Array de ID de tags
Show child attributes
Show child attributes
Array de ID de listas
Show child attributes
Show child attributes
ID do atendente
Show child attributes
Show child attributes
Notas
Show child attributes
Show child attributes