curl --request POST \
--url https://api.vendaze.com/v1/companies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Acme Corp",
"emails": [
{
"email": "contato@acme.com",
"type": "work"
}
],
"phones": [
{
"phone": "+551130000000",
"type": "work"
}
],
"owner_email": "joao@empresa.com",
"avatar_image": "data:image/png;base64,iVBORw0KGgo...",
"tags": [
"<string>"
],
"list_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"custom_fields": [
{
"field_key": "setor",
"value": "<string>"
}
]
}
'import requests
url = "https://api.vendaze.com/v1/companies"
payload = {
"full_name": "Acme Corp",
"emails": [
{
"email": "contato@acme.com",
"type": "work"
}
],
"phones": [
{
"phone": "+551130000000",
"type": "work"
}
],
"owner_email": "joao@empresa.com",
"avatar_image": "data:image/png;base64,iVBORw0KGgo...",
"tags": ["<string>"],
"list_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_fields": [
{
"field_key": "setor",
"value": "<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({
full_name: 'Acme Corp',
emails: [{email: 'contato@acme.com', type: 'work'}],
phones: [{phone: '+551130000000', type: 'work'}],
owner_email: 'joao@empresa.com',
avatar_image: 'data:image/png;base64,iVBORw0KGgo...',
tags: ['<string>'],
list_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_fields: [{field_key: 'setor', value: '<string>'}]
})
};
fetch('https://api.vendaze.com/v1/companies', 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.vendaze.com/v1/companies",
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([
'full_name' => 'Acme Corp',
'emails' => [
[
'email' => 'contato@acme.com',
'type' => 'work'
]
],
'phones' => [
[
'phone' => '+551130000000',
'type' => 'work'
]
],
'owner_email' => 'joao@empresa.com',
'avatar_image' => 'data:image/png;base64,iVBORw0KGgo...',
'tags' => [
'<string>'
],
'list_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_fields' => [
[
'field_key' => 'setor',
'value' => '<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.vendaze.com/v1/companies"
payload := strings.NewReader("{\n \"full_name\": \"Acme Corp\",\n \"emails\": [\n {\n \"email\": \"contato@acme.com\",\n \"type\": \"work\"\n }\n ],\n \"phones\": [\n {\n \"phone\": \"+551130000000\",\n \"type\": \"work\"\n }\n ],\n \"owner_email\": \"joao@empresa.com\",\n \"avatar_image\": \"data:image/png;base64,iVBORw0KGgo...\",\n \"tags\": [\n \"<string>\"\n ],\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"field_key\": \"setor\",\n \"value\": \"<string>\"\n }\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.vendaze.com/v1/companies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Acme Corp\",\n \"emails\": [\n {\n \"email\": \"contato@acme.com\",\n \"type\": \"work\"\n }\n ],\n \"phones\": [\n {\n \"phone\": \"+551130000000\",\n \"type\": \"work\"\n }\n ],\n \"owner_email\": \"joao@empresa.com\",\n \"avatar_image\": \"data:image/png;base64,iVBORw0KGgo...\",\n \"tags\": [\n \"<string>\"\n ],\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"field_key\": \"setor\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vendaze.com/v1/companies")
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 \"full_name\": \"Acme Corp\",\n \"emails\": [\n {\n \"email\": \"contato@acme.com\",\n \"type\": \"work\"\n }\n ],\n \"phones\": [\n {\n \"phone\": \"+551130000000\",\n \"type\": \"work\"\n }\n ],\n \"owner_email\": \"joao@empresa.com\",\n \"avatar_image\": \"data:image/png;base64,iVBORw0KGgo...\",\n \"tags\": [\n \"<string>\"\n ],\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"field_key\": \"setor\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "Acme Corp",
"emails": [
{
"email": "contato@acme.com",
"type": "work"
}
],
"phones": [
{
"phone": "+551130000000",
"type": "work"
}
],
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "João Silva",
"email": "joao@empresa.com.br"
},
"avatar_url": "https://storage.vendaze.com/client/workspaces/abc/companies/xyz/avatar/avatar_WWT1BGs9ma.webp",
"entity_id": "g7wwkh0",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Lead Quente",
"key": "lead_quente",
"color_text": "#ffffff",
"color_background": "#ef4444",
"created_at": "2023-11-07T05:31:56Z"
}
],
"lists": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<unknown>",
"field": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"key": "<string>",
"type": "<string>"
}
}
]
}
}{
"error": {
"code": "bad_request",
"message": "Request body must be valid JSON.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid Authorization header.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This endpoint requires the 'webhooks:read' scope.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "validation_error",
"message": "Validation failed.",
"fields": {
"url": "url must use HTTPS.",
"events": "At least one event is required."
},
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Criar empresa
Cria uma nova empresa no workspace.
Escopo necessário
Escopo necessário
companies:write
curl --request POST \
--url https://api.vendaze.com/v1/companies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "Acme Corp",
"emails": [
{
"email": "contato@acme.com",
"type": "work"
}
],
"phones": [
{
"phone": "+551130000000",
"type": "work"
}
],
"owner_email": "joao@empresa.com",
"avatar_image": "data:image/png;base64,iVBORw0KGgo...",
"tags": [
"<string>"
],
"list_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"custom_fields": [
{
"field_key": "setor",
"value": "<string>"
}
]
}
'import requests
url = "https://api.vendaze.com/v1/companies"
payload = {
"full_name": "Acme Corp",
"emails": [
{
"email": "contato@acme.com",
"type": "work"
}
],
"phones": [
{
"phone": "+551130000000",
"type": "work"
}
],
"owner_email": "joao@empresa.com",
"avatar_image": "data:image/png;base64,iVBORw0KGgo...",
"tags": ["<string>"],
"list_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_fields": [
{
"field_key": "setor",
"value": "<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({
full_name: 'Acme Corp',
emails: [{email: 'contato@acme.com', type: 'work'}],
phones: [{phone: '+551130000000', type: 'work'}],
owner_email: 'joao@empresa.com',
avatar_image: 'data:image/png;base64,iVBORw0KGgo...',
tags: ['<string>'],
list_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_fields: [{field_key: 'setor', value: '<string>'}]
})
};
fetch('https://api.vendaze.com/v1/companies', 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.vendaze.com/v1/companies",
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([
'full_name' => 'Acme Corp',
'emails' => [
[
'email' => 'contato@acme.com',
'type' => 'work'
]
],
'phones' => [
[
'phone' => '+551130000000',
'type' => 'work'
]
],
'owner_email' => 'joao@empresa.com',
'avatar_image' => 'data:image/png;base64,iVBORw0KGgo...',
'tags' => [
'<string>'
],
'list_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_fields' => [
[
'field_key' => 'setor',
'value' => '<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.vendaze.com/v1/companies"
payload := strings.NewReader("{\n \"full_name\": \"Acme Corp\",\n \"emails\": [\n {\n \"email\": \"contato@acme.com\",\n \"type\": \"work\"\n }\n ],\n \"phones\": [\n {\n \"phone\": \"+551130000000\",\n \"type\": \"work\"\n }\n ],\n \"owner_email\": \"joao@empresa.com\",\n \"avatar_image\": \"data:image/png;base64,iVBORw0KGgo...\",\n \"tags\": [\n \"<string>\"\n ],\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"field_key\": \"setor\",\n \"value\": \"<string>\"\n }\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.vendaze.com/v1/companies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Acme Corp\",\n \"emails\": [\n {\n \"email\": \"contato@acme.com\",\n \"type\": \"work\"\n }\n ],\n \"phones\": [\n {\n \"phone\": \"+551130000000\",\n \"type\": \"work\"\n }\n ],\n \"owner_email\": \"joao@empresa.com\",\n \"avatar_image\": \"data:image/png;base64,iVBORw0KGgo...\",\n \"tags\": [\n \"<string>\"\n ],\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"field_key\": \"setor\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vendaze.com/v1/companies")
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 \"full_name\": \"Acme Corp\",\n \"emails\": [\n {\n \"email\": \"contato@acme.com\",\n \"type\": \"work\"\n }\n ],\n \"phones\": [\n {\n \"phone\": \"+551130000000\",\n \"type\": \"work\"\n }\n ],\n \"owner_email\": \"joao@empresa.com\",\n \"avatar_image\": \"data:image/png;base64,iVBORw0KGgo...\",\n \"tags\": [\n \"<string>\"\n ],\n \"list_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"field_key\": \"setor\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "Acme Corp",
"emails": [
{
"email": "contato@acme.com",
"type": "work"
}
],
"phones": [
{
"phone": "+551130000000",
"type": "work"
}
],
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "João Silva",
"email": "joao@empresa.com.br"
},
"avatar_url": "https://storage.vendaze.com/client/workspaces/abc/companies/xyz/avatar/avatar_WWT1BGs9ma.webp",
"entity_id": "g7wwkh0",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Lead Quente",
"key": "lead_quente",
"color_text": "#ffffff",
"color_background": "#ef4444",
"created_at": "2023-11-07T05:31:56Z"
}
],
"lists": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<unknown>",
"field": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"key": "<string>",
"type": "<string>"
}
}
]
}
}{
"error": {
"code": "bad_request",
"message": "Request body must be valid JSON.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid Authorization header.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This endpoint requires the 'webhooks:read' scope.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "validation_error",
"message": "Validation failed.",
"fields": {
"url": "url must use HTTPS.",
"events": "At least one event is required."
},
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Autorizações
Access token OAuth 2.1.
Corpo
70"Acme Corp"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
E-mail do membro do workspace a definir como responsável. A API resolve internamente para o ID do usuário. Deve ser membro deste workspace.
"joao@empresa.com"
URL HTTPS pública da imagem ou Data URI base64 completo (ex: data:image/png;base64,...). Formatos aceitos: JPEG, PNG, WebP, GIF, BMP, TIFF.
"data:image/png;base64,iVBORw0KGgo..."
Nomes (keys) das tags a associar à empresa. Se a tag não existir, será criada automaticamente.
1 - 30IDs de listas para associar à empresa.
Valores de campos adicionais para definir na empresa. Identificados por field_key. Se o campo não existir, é criado automaticamente com tipo text.
Show child attributes
Show child attributes
Resposta
Empresa criada com sucesso.
Show child attributes
Show child attributes
Esta página foi útil?