Integrations
API Reference
Use the SalesIQ REST API to capture leads from any external source programmatically.
Base URL
https://crm.megallow.com/api
Authentication
All API requests require an API key passed in the x-api-key header:
curl -X POST https://crm.megallow.com/api/leads/capture \
-H "Content-Type: application/json" \
-H "x-api-key: sqk_live_your_api_key" \
-d '{"name": "Amit", "phone": "9876543210"}'
POST
/leads/capture
Create a new lead in your workspace. Leads are automatically scored, de-duplicated, and assigned.
Request Headers
| Header | Required | Description |
|---|---|---|
| x-api-key | โ | Your API key from Settings โ Integrations |
| Content-Type | โ | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | โ | Full name of the lead |
| phone | string | โ | 10-digit Indian mobile number |
| string | โ | Email address | |
| source | string | โ | Lead source (default: "Website") |
| sourceDetails | string | โ | Additional source info (e.g., "3BHK Noida ad") |
| city | string | โ | Preferred city |
| propertyType | string | โ | Flat, Villa, Plot, Commercial |
| budgetMin | number | โ | Minimum budget in โน |
| budgetMax | number | โ | Maximum budget in โน |
| notes | string | โ | Free-text notes |
| preferredLocation | string | โ | Preferred area/locality |
| string | โ | WhatsApp number if different from phone |
Response (201 Created)
{
"success": true,
"leadId": "clx1234-abcd-5678",
"leadCode": "LD0042",
"score": 65,
"temperature": "Warm",
"assignedTo": "user-uuid",
"message": "Lead captured successfully"
}Duplicate Response (200)
{
"success": true,
"duplicate": true,
"leadId": "existing-lead-uuid",
"message": "Lead already exists as "Amit Kumar" (9876543210). Activity logged."
}Error Responses
| Code | Meaning |
|---|---|
| 400 | Missing required fields (name or phone) |
| 401 | Missing x-api-key header |
| 403 | Invalid API key |
| 429 | Lead limit reached (upgrade plan) |
| 500 | Internal server error |
GET
/leads/capture
Returns API health status and documentation. No authentication required.
{
"service": "SalesIQ Auto Lead Capture",
"status": "active",
"version": "1.0",
"usage": {
"method": "POST",
"headers": { "x-api-key": "<your-api-key>" },
"requiredFields": ["name", "phone"],
"optionalFields": ["email", "source", "city", ...]
}
}Rate Limits
| Plan | Requests/minute | Max Leads |
|---|---|---|
| Starter | 30 | 500 |
| Team | 60 | 2,000 |
| Pro | 120 | 10,000 |
| Enterprise | Unlimited | Unlimited |