Criar tag
curl --request POST \
--url https://api.vendaze.com/v1/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lead Quente",
"key": "lead_quente",
"color_text": "#ffffff",
"color_background": "#ef4444"
}
'import requests
url = "https://api.vendaze.com/v1/tags"
payload = {
"name": "Lead Quente",
"key": "lead_quente",
"color_text": "#ffffff",
"color_background": "#ef4444"
}
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: 'Lead Quente',
key: 'lead_quente',
color_text: '#ffffff',
color_background: '#ef4444'
})
};
fetch('https://api.vendaze.com/v1/tags', 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/tags",
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' => 'Lead Quente',
'key' => 'lead_quente',
'color_text' => '#ffffff',
'color_background' => '#ef4444'
]),
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/tags"
payload := strings.NewReader("{\n \"name\": \"Lead Quente\",\n \"key\": \"lead_quente\",\n \"color_text\": \"#ffffff\",\n \"color_background\": \"#ef4444\"\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/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lead Quente\",\n \"key\": \"lead_quente\",\n \"color_text\": \"#ffffff\",\n \"color_background\": \"#ef4444\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vendaze.com/v1/tags")
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\": \"Lead Quente\",\n \"key\": \"lead_quente\",\n \"color_text\": \"#ffffff\",\n \"color_background\": \"#ef4444\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"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"
}
}{
"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": "conflict",
"message": "A record with this value already exists.",
"fields": {
"key": "Value already in use."
},
"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"
}
}Tags
Criar tag
Cria uma nova tag no workspace.
Escopo necessário
Escopo necessário
tags:write
POST
/
v1
/
tags
Criar tag
curl --request POST \
--url https://api.vendaze.com/v1/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lead Quente",
"key": "lead_quente",
"color_text": "#ffffff",
"color_background": "#ef4444"
}
'import requests
url = "https://api.vendaze.com/v1/tags"
payload = {
"name": "Lead Quente",
"key": "lead_quente",
"color_text": "#ffffff",
"color_background": "#ef4444"
}
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: 'Lead Quente',
key: 'lead_quente',
color_text: '#ffffff',
color_background: '#ef4444'
})
};
fetch('https://api.vendaze.com/v1/tags', 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/tags",
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' => 'Lead Quente',
'key' => 'lead_quente',
'color_text' => '#ffffff',
'color_background' => '#ef4444'
]),
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/tags"
payload := strings.NewReader("{\n \"name\": \"Lead Quente\",\n \"key\": \"lead_quente\",\n \"color_text\": \"#ffffff\",\n \"color_background\": \"#ef4444\"\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/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lead Quente\",\n \"key\": \"lead_quente\",\n \"color_text\": \"#ffffff\",\n \"color_background\": \"#ef4444\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vendaze.com/v1/tags")
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\": \"Lead Quente\",\n \"key\": \"lead_quente\",\n \"color_text\": \"#ffffff\",\n \"color_background\": \"#ef4444\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"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"
}
}{
"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": "conflict",
"message": "A record with this value already exists.",
"fields": {
"key": "Value already in use."
},
"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
application/json
Nome de exibição da tag.
Required string length:
1 - 30Exemplo:
"Lead Quente"
Chave única no workspace. Apenas letras minúsculas, dígitos e underscores entre palavras. Sem espaços, acentos ou pontuação.
Required string length:
1 - 30Pattern:
^[a-z0-9]+(_[a-z0-9]+)*$Exemplo:
"lead_quente"
Cor do texto em formato hex RGB (ex: #ffffff). Se omitido, aplica o padrão do workspace (#374152).
Pattern:
^#[0-9a-fA-F]{6}$Exemplo:
"#ffffff"
Cor de fundo em formato hex RGB (ex: #ef4444). Se omitido, aplica o padrão do workspace (#e4e6eb).
Pattern:
^#[0-9a-fA-F]{6}$Exemplo:
"#ef4444"
Resposta
Tag criada com sucesso.
Show child attributes
Show child attributes
Esta página foi útil?
⌘I