🚀 Getting Started
The LeadsPredict API allows you to analyze leads, retrieve predictions, and integrate our AI engine directly into your sales pipeline. All requests use HTTPS and return JSON.
📌 Base URL: https://api.leadspredict.com/v1
🔒 Protocol: HTTPS only (TLS 1.3)
📦 Format: JSON request/response
Quick Example
curl https://api.leadspredict.com/v1/leads/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"leads": [
{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"company": "TechCorp"
}
]
}'
🔐 Authentication
All API requests require an API key. Include your key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
⚠️ Security: Never expose your API key in client-side code. Always make requests from your backend server.
Getting Your API Key
- Sign up for a LeadsPredict account at leadspredict.com
- Navigate to Dashboard → API Settings
- Generate a new API key
- Store it securely in your environment variables
⏱️ Rate Limits
| Plan | Requests/Hour | Requests/Day |
|---|---|---|
| Starter | 1,000 | 10,000 |
| Growth | 10,000 | 100,000 |
| Enterprise | Unlimited | Unlimited |
Rate limit information is included in response headers:
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9950
X-RateLimit-Reset: 1699459200
📡 POST /leads/analyze
Analyze Leads
POSTAnalyze leads and get AI-powered scoring and predictions.
Request Body
{
"leads": [
{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"company": "TechCorp",
"industry": "Technology",
"revenue": 5000000,
"employees": 50,
"engagement_score": 75,
"last_interaction": "2025-11-01"
}
],
"options": {
"include_predictions": true,
"include_recommendations": true
}
}
Response
{
"status": "success",
"data": {
"leads": [
{
"id": "lead_abc123",
"score": 98,
"category": "hot",
"conversion_probability": 0.87,
"predicted_revenue": 125000,
"churn_risk": "low",
"recommendations": [
"Contact within 24 hours",
"Personalize outreach with industry insights"
],
"next_actions": [
{
"action": "schedule_demo",
"priority": "high",
"deadline": "2025-11-10"
}
]
}
],
"summary": {
"total_leads": 1,
"hot_leads": 1,
"avg_score": 98,
"total_predicted_revenue": 125000
}
}
}
📊 GET /leads/:id
Get Lead Details
GETRetrieve detailed information about a specific lead.
Request
curl https://api.leadspredict.com/v1/leads/lead_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"status": "success",
"data": {
"id": "lead_abc123",
"score": 98,
"created_at": "2025-11-08T10:00:00Z",
"updated_at": "2025-11-08T15:30:00Z",
"history": [
{
"timestamp": "2025-11-08T10:00:00Z",
"event": "lead_created",
"score": 85
},
{
"timestamp": "2025-11-08T15:30:00Z",
"event": "engagement_increased",
"score": 98
}
]
}
}
🔄 POST /leads/batch
Batch Processing
POSTProcess up to 1000 leads in a single request.
Request Body
{
"leads": [...], // Array of up to 1000 leads
"async": true, // Process asynchronously
"webhook_url": "https://your-app.com/webhook"
}
🔔 Webhooks
Subscribe to real-time events when lead scores change, predictions are updated, or actions are recommended.
Available Events
| Event | Description |
|---|---|
lead.scored | Lead has been scored |
lead.hot | Lead marked as hot (score >= 90) |
prediction.updated | Prediction recalculated |
churn.risk_high | High churn risk detected |
Webhook Payload
{
"event": "lead.hot",
"timestamp": "2025-11-08T16:00:00Z",
"data": {
"lead_id": "lead_abc123",
"score": 98,
"previous_score": 85,
"recommendations": [...]
}
}
⚠️ Error Handling
| Code | Meaning |
|---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn't exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Error Response Format
{
"status": "error",
"error": {
"code": "invalid_request",
"message": "Missing required field: email",
"details": {
"field": "email",
"reason": "required"
}
}
}
📦 Official SDKs
Node.js
npm install @leadspredict/node
const LeadsPredict = require('@leadspredict/node');
const client = new LeadsPredict('YOUR_API_KEY');
const result = await client.leads.analyze({
leads: [...]
});
Python
pip install leadspredict
from leadspredict import Client
client = Client('YOUR_API_KEY')
result = client.leads.analyze(
leads=[...]
)
📞 Need Help?
Contact Epsylon Systems
📍 1000 Brickell Avenue, Suite #715
PMB 345, Miami, FL 33131 USA
📧 Email: support@epsylonsystems.com