curl -X POST "https://api.leavo.ai/backend/leads" \
-H "Authorization: Bearer sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"name": "Maria Santos",
"email": "maria@exemplo.com",
"phone": "+5511988888888",
"company": "Tech Corp"
}'
const response = await fetch('https://api.leavo.ai/backend/leads', {
method: 'POST',
headers: {
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Maria Santos',
email: 'maria@exemplo.com',
phone: '+5511988888888',
company: 'Tech Corp'
})
});
const lead = await response.json();
import requests
response = requests.post(
'https://api.leavo.ai/backend/leads',
headers={
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
json={
'name': 'Maria Santos',
'email': 'maria@exemplo.com',
'phone': '+5511988888888',
'company': 'Tech Corp'
}
)
lead = response.json()
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Maria Santos",
"email": "maria@exemplo.com",
"phone": "+5511988888888",
"company": "Tech Corp",
"status_id": "770e8400-e29b-41d4-a716-446655440000",
"status": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"name": "Novo",
"description": "Lead novo",
"color": "#007bff",
"default": true
},
"tags": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Phone number is required"
}
}
Leads
Criar Lead
Cria um novo lead
POST
/
backend
/
leads
curl -X POST "https://api.leavo.ai/backend/leads" \
-H "Authorization: Bearer sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"name": "Maria Santos",
"email": "maria@exemplo.com",
"phone": "+5511988888888",
"company": "Tech Corp"
}'
const response = await fetch('https://api.leavo.ai/backend/leads', {
method: 'POST',
headers: {
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Maria Santos',
email: 'maria@exemplo.com',
phone: '+5511988888888',
company: 'Tech Corp'
})
});
const lead = await response.json();
import requests
response = requests.post(
'https://api.leavo.ai/backend/leads',
headers={
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
json={
'name': 'Maria Santos',
'email': 'maria@exemplo.com',
'phone': '+5511988888888',
'company': 'Tech Corp'
}
)
lead = response.json()
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Maria Santos",
"email": "maria@exemplo.com",
"phone": "+5511988888888",
"company": "Tech Corp",
"status_id": "770e8400-e29b-41d4-a716-446655440000",
"status": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"name": "Novo",
"description": "Lead novo",
"color": "#007bff",
"default": true
},
"tags": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Phone number is required"
}
}
Request Body
string
obrigatório
Nome completo do lead
string
Email do lead
string
obrigatório
Telefone do lead (formato internacional recomendado)
string
Empresa do lead
string
ID do status inicial (usa o status padrão se não informado)
Response
object
O lead criado com todos os campos preenchidos
curl -X POST "https://api.leavo.ai/backend/leads" \
-H "Authorization: Bearer sua_chave_aqui" \
-H "Content-Type: application/json" \
-d '{
"name": "Maria Santos",
"email": "maria@exemplo.com",
"phone": "+5511988888888",
"company": "Tech Corp"
}'
const response = await fetch('https://api.leavo.ai/backend/leads', {
method: 'POST',
headers: {
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Maria Santos',
email: 'maria@exemplo.com',
phone: '+5511988888888',
company: 'Tech Corp'
})
});
const lead = await response.json();
import requests
response = requests.post(
'https://api.leavo.ai/backend/leads',
headers={
'Authorization': 'Bearer sua_chave_aqui',
'Content-Type': 'application/json'
},
json={
'name': 'Maria Santos',
'email': 'maria@exemplo.com',
'phone': '+5511988888888',
'company': 'Tech Corp'
}
)
lead = response.json()
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Maria Santos",
"email": "maria@exemplo.com",
"phone": "+5511988888888",
"company": "Tech Corp",
"status_id": "770e8400-e29b-41d4-a716-446655440000",
"status": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"name": "Novo",
"description": "Lead novo",
"color": "#007bff",
"default": true
},
"tags": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Phone number is required"
}
}
⌘I