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

HeaderRequiredDescription
x-api-keyโœ…Your API key from Settings โ†’ Integrations
Content-Typeโœ…application/json

Request Body

FieldTypeRequiredDescription
namestringโœ…Full name of the lead
phonestringโœ…10-digit Indian mobile number
emailstringโ€”Email address
sourcestringโ€”Lead source (default: "Website")
sourceDetailsstringโ€”Additional source info (e.g., "3BHK Noida ad")
citystringโ€”Preferred city
propertyTypestringโ€”Flat, Villa, Plot, Commercial
budgetMinnumberโ€”Minimum budget in โ‚น
budgetMaxnumberโ€”Maximum budget in โ‚น
notesstringโ€”Free-text notes
preferredLocationstringโ€”Preferred area/locality
whatsappstringโ€”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

CodeMeaning
400Missing required fields (name or phone)
401Missing x-api-key header
403Invalid API key
429Lead limit reached (upgrade plan)
500Internal 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

PlanRequests/minuteMax Leads
Starter30500
Team602,000
Pro12010,000
EnterpriseUnlimitedUnlimited