ECODrIx API Documentation
The complete backend powering multi-tenant SaaS applications with CRM, automations, WhatsApp messaging, Google Meet scheduling, email marketing, lead scoring, AI-powered lead generation, and more β all via a single unified API.
CRM Engine
Leads, pipelines, scoring, activities, and deal tracking for any business.
Automations
Event-driven rules, delayed actions, multi-step workflows, and sequences.
Template messaging, broadcasts, incoming webhooks, and two-way chat.
Email Marketing
Template campaigns, open/click tracking, unsubscribe, and SES integration.
Google Meet
Auto-create meetings, reminders at 1h/15min before, reschedule & cancel.
LAIE AI Engine
Web scraping, lead enrichment, competitor analysis, and AI-driven outreach.
Multi-Tenant
Per-tenant DB isolation, API key auth, usage metering, and rate limiting.
Job Queue
Distributed task processing via erix-store with priority, retries, and DLQ.
Authentication
All API requests require two headers for tenant identification and authorization:
x-api-key: your_api_key_here x-client-code: ERIX_CLNT_XXXXXX
The
x-client-code
header identifies your tenant. The
x-api-key
authenticates the request. Both are issued during onboarding.
Base URL & routing. Every endpoint lives under a
single canonical prefix β
/v1/api
β organised by domain:
/v1/api/platform/*
(billing, auth, admin),
/v1/api/product/erix/*
(CRM, automations, chat, commerce),
/v1/api/product/laie/*
(lead-gen engine), and
/v1/api/infra/*
(connect channels, storage, webhooks). The system health dashboard is
the one exception, served at the root
/health.
Rate limits: 100 req/min per tenant (burst: 200). Exceeding returns HTTP 429.
Quick Start
Install the official SDK to get started in seconds:
npm install @ecodrix/erix-api
import { ErixAPI } from '@ecodrix/erix-api';
const erix = new ErixAPI({
baseUrl: 'https://api.ecodrix.com',
apiKey: 'your_api_key',
clientCode: 'ERIX_CLNT_XXXXXX',
});
// Create a lead
const lead = await erix.crm.leads.create({
firstName: 'John',
phone: '+919876543210',
source: 'website',
});
// Fire an automation trigger
await erix.crm.automations.trigger({
trigger: 'order_created',
phone: '+919876543210',
variables: { orderId: 'ORD-001', amount: '999' },
createLeadIfMissing: true,
});
Leads
Full lifecycle management for contacts β create, update, move through pipelines, score, tag, archive, and convert.
lead_created
event for automation matching.
| Param | Type | Required | Description |
|---|---|---|---|
| firstName | string | β | Contact's first name |
| phone | string | β | E.164 phone number |
| string | Email address | ||
| source | enum | website, whatsapp, manual, product, service, doctor | |
| pipelineId | ObjectId | Override default pipeline |
stage_enter
/
stage_exit
events for automation rules.
tag_added
/
tag_removed
events.
Pipelines & Stages
Configure multiple sales funnels with custom stages. Each tenant can have unlimited pipelines (Sales, Support, Onboarding, etc.).
Lead Scoring
Automatic engagement scoring based on activity density, response time, and deal progression. Configurable per tenant.
score_refresh
event if threshold crossed.
Activities & Notes
Log calls, emails, meetings, and internal notes against leads. Full activity timeline per contact.
CRM Analytics
Conversion funnels, pipeline velocity, source attribution, and team performance metrics.
Automations β Rules & Triggers
The automation engine matches incoming events against configured rules and executes actions (WhatsApp, email, webhook, internal ops). Supports instant, delayed, and event-relative timing.
Supported Triggers
-
lead_createdβ New lead enters the system -
stage_enter/stage_exitβ Lead moves in pipeline -
tag_added/tag_removedβ Tag modification -
deal_won/deal_lostβ Deal outcome -
payment_capturedβ Payment confirmed -
whatsapp_incomingβ Inbound WhatsApp message -
meeting_created/meeting.rescheduledβ Calendar events -
appointment_reminderβ Time-relative meeting reminders -
score_refreshβ Lead scoring threshold crossed -
Custom events β Any user-defined event name (e.g.
order_created,service_enrolled)
Action Types
- send_whatsapp β Send a WhatsApp template with mapped variables
- send_email β Send an email (template or custom HTML)
- webhook β HTTP callback to external service
- move_stage β Auto-move lead to a different pipeline stage
- add_tag / remove_tag β Tag operations
- assign_to β Auto-assign to team member
- create_task β Internal task creation
Timing Modes
- Instant (delay: 0) β Fires immediately when event occurs
- After trigger (delay: N minutes) β Fires N minutes after the event
- Before event β Fires N minutes before a scheduled event (meetings/appointments)
- At event β Fires at the exact time of the scheduled event
- After event β Fires N minutes after the scheduled event
delayMinutes
and
runAt
for scheduled execution.
| Param | Type | Required | Description |
|---|---|---|---|
| trigger | string | β | Event name (e.g. "order_created") |
| phone | string | β | Lead's phone number |
| variables | object | Key/value context for template resolution | |
| createLeadIfMissing | boolean | Auto-create lead if not found | |
| delayMinutes | number | Defer execution by N minutes | |
| runAt | ISO string | Schedule for exact time |
Workflows
Multi-step automation flows with branching logic, delays, and conditional actions.
Sequences
Time-based drip sequences for nurturing leads over days/weeks.
Custom Events
Define and manage custom event triggers that your application can fire to invoke automations.
Send template messages, manage broadcasts, receive inbound webhooks, and power two-way conversations via the WhatsApp Business API.
Email & Marketing
Send transactional and marketing emails via Amazon SES with open/click tracking, unsubscribe management, and template support.
Notifications
In-app and push notifications for team members β new leads, assignments, reminders, and system alerts.
Google Meet
Schedule, reschedule, and cancel Google Meet meetings. Automatic calendar event creation with meet links.
meeting.rescheduled
event.
Smart Reminders
Automatic reminders at 1 hour and 15 minutes before meetings via WhatsApp or email. Configurable per automation rule.
Media & Storage
Upload and manage files (images, documents, videos) with S3-backed storage and CDN delivery.
Checkout & Payments
Generate payment links, track transactions, and handle Razorpay/Stripe webhooks for payment confirmation.
Job Queue
Distributed task processing with priority levels, retry policies, dead-letter queues, and real-time status tracking.
Health & Monitoring
System health checks, dependency status, and uptime monitoring.
LAIE β Lead Generation
AI-powered web scraping, lead enrichment, and competitor analysis for automated outbound prospecting.
LAIE β AI & Intelligence
AI-driven insights β competitor analysis, message generation, and intelligent lead prioritization.
LAIE β Voice & Transcription
Voice call recording, transcription, and AI summarization for sales calls.
API Explorer
Try any endpoint directly from the browser. Provide your API key and client code to make live requests.
// Response will appear here