curl -X POST "https://api.leavo.ai/backend/tags" \
-H "Authorization: Bearer sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium",
"description": "Cliente Premium",
"color": "#fd7e14"
}'
const response = await fetch('https://api.leavo.ai/backend/tags', {
method: 'POST',
headers: {
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Premium',
description: 'Cliente Premium',
color: '#fd7e14'
})
});
const tag = await response.json();
{
"id": "880e8400-e29b-41d4-a716-446655440002",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Premium",
"description": "Cliente Premium",
"color": "#fd7e14",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Tags
Criar Tag
Cria uma nova tag
POST
/
backend
/
tags
curl -X POST "https://api.leavo.ai/backend/tags" \
-H "Authorization: Bearer sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium",
"description": "Cliente Premium",
"color": "#fd7e14"
}'
const response = await fetch('https://api.leavo.ai/backend/tags', {
method: 'POST',
headers: {
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Premium',
description: 'Cliente Premium',
color: '#fd7e14'
})
});
const tag = await response.json();
{
"id": "880e8400-e29b-41d4-a716-446655440002",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Premium",
"description": "Cliente Premium",
"color": "#fd7e14",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Request Body
string
obrigatório
Nome da tag
string
Descrição da tag
string
obrigatório
Cor em formato hexadecimal (#RRGGBB)
curl -X POST "https://api.leavo.ai/backend/tags" \
-H "Authorization: Bearer sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium",
"description": "Cliente Premium",
"color": "#fd7e14"
}'
const response = await fetch('https://api.leavo.ai/backend/tags', {
method: 'POST',
headers: {
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Premium',
description: 'Cliente Premium',
color: '#fd7e14'
})
});
const tag = await response.json();
{
"id": "880e8400-e29b-41d4-a716-446655440002",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Premium",
"description": "Cliente Premium",
"color": "#fd7e14",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
⌘I