Authentication & Security Standards
All REST requests to Elcorn must be authenticated using an API Key passed in the HTTP Authorization header. API keys inherit role-based access controls (RBAC) defined in the Elcorn Admin Console.
Authorization: Bearer elcorn_live_sk_948f21e0ab88c42...
Core API Endpoints
POST
/api/v1/whatsapp/send-template
Dispatch an approved Meta WhatsApp Cloud API template message with quick-reply buttons and dynamic variables.
curl -X POST "https://crm.elcorn.com/api/v1/whatsapp/send-template" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "919876543210",
"template_name": "lead_qualification_greeting_v2",
"language_code": "en",
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Rahul" },
{ "type": "text", "text": "PropEdge Residences" }
]
}
]
}'
POST
/api/v1/leads
Ingest new prospect records directly from Google Ads, Meta Lead Forms, 99acres, MagicBricks, or custom website forms with automatic lead assignment.
curl -X POST "https://crm.elcorn.com/api/v1/leads" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"full_name": "Priya Sharma",
"phone": "919811223344",
"email": "priya.sharma@example.com",
"source": "Meta_Ads_Campaign_2026",
"stage": "New Lead",
"custom_fields": {
"budget": "1.2 Cr",
"property_type": "3BHK Luxury"
}
}'
GET
/api/v1/leads/:id
Retrieve complete customer timeline including WhatsApp messages, SIM call logs, deal stage history, and active inventory quotes.
Real-Time Webhook Events
Subscribe to HTTPS webhooks to trigger external ERP workflows, billing systems, or notifications upon sales milestone events:
- •
whatsapp.message_received: Fired immediately when an inbound customer message hits the official Cloud API.
- •
lead.stage_changed: Emitted when a lead progresses to Qualified, Proposal Sent, or Deal Closed.
- •
call.completed: Dispatched from the Android dialer with duration and SIM recording metadata.