Endpoint
Body Parameters
Phone with country code (E.164 format)
Request Example
curl -X POST "https://api.leavo.ai/backend/leads" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "John Smith",
"phone": "+15551234567",
"email": "[email protected]",
"company": "XYZ Company",
"status_id": "status-uuid",
"tag_ids": ["tag-uuid-1", "tag-uuid-2"],
"custom_fields": {
"source": "website",
"interest": "product-a"
}
}'
Response
{
"success": true,
"data": {
"id": "new-lead-uuid",
"name": "John Smith",
"phone": "+15551234567",
"email": "[email protected]",
"company": "XYZ Company",
"status": {
"id": "status-uuid",
"name": "New",
"color": "#10B981"
},
"tags": [
{
"id": "tag-uuid-1",
"name": "VIP",
"color": "#F59E0B"
}
],
"custom_fields": {
"source": "website",
"interest": "product-a"
},
"created_at": "2024-01-15T10:30:00Z"
}
}
Possible Errors
| Code | Description |
|---|
VALIDATION_ERROR | Invalid data |
ALREADY_EXISTS | Phone already registered |
NOT_FOUND | Status or tag not found |