Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create a new lead
/backend/leads
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": "john@example.com", "company": "XYZ Company", "status_id": "status-uuid", "tag_ids": ["tag-uuid-1", "tag-uuid-2"], "custom_fields": { "source": "website", "interest": "product-a" } }'
const response = await fetch('https://api.leavo.ai/backend/leads', { method: 'POST', headers: { 'Authorization': 'Bearer your_api_key_here', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'John Smith', phone: '+15551234567', email: 'john@example.com', company: 'XYZ Company', status_id: 'status-uuid', tag_ids: ['tag-uuid-1', 'tag-uuid-2'], custom_fields: { source: 'website', interest: 'product-a' } }) });
{ "success": true, "data": { "id": "new-lead-uuid", "name": "John Smith", "phone": "+15551234567", "email": "john@example.com", "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" } }
VALIDATION_ERROR
ALREADY_EXISTS
NOT_FOUND