Skip to content
DigAI
Developer Reference · v2.6.0

Build on DigAI.

Embeddable loaders, real-time webhooks in and out, and a clean REST API. Zero marketing fluff — everything you need to connect custom websites, mobile apps, and internal databases.

api.digai.in / public / sales-leads
curl -X POST https://api.digai.in/public/sales-leads \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Aarav Sharma",
    "email": "aarav@growthtech.in",
    "countryCode": "+91",
    "phone": "9820123456",
    "company": "GrowthTech Media",
    "teamSize": "6-15",
    "source": "api-landing-page",
    "message": "Interested in WhatsApp Cloud API automation"
  }'
HTTP 201 Created · SSL TLS 1.3UTF-8 · JSON
Integration Architecture

Three ways to integrate with DigAI

Choose the architectural layer that fits your tech stack and deployment model.

Method 01 Zero Backend

Embeddable Loaders

Drop a 2-line asynchronous JavaScript snippet into any website or CMS (WordPress, Shopify, Webflow) to mount live chat widgets or lead forms.

Website Chat Widget (widget-loader.js)
code
<!-- DigAI Unified Inbox Chat Widget -->
<script async src="https://app.digai.in/widget-loader.js" data-widget-uid="WIDGET_UID" data-api-url="https://api.digai.in"></script>
Embeddable Forms (form-loader.js)
code
<!-- DigAI Form Embed -->
<div id="digai-form-container"></div>
<script async src="https://app.digai.in/form-loader.js" data-form-uid="FORM_UID" data-api-url="https://api.digai.in"></script>
Public Booking Page
code
<!-- Direct link or responsive iframe -->
<iframe src="https://app.digai.in/book/your-team-slug" width="100%" height="700" frameborder="0"></iframe>
Method 02 Real-Time

Webhooks In & Out

Listen for events when leads submit, payments capture, or messages arrive. Trigger external APIs from visual workflow nodes using Webhook Advance.

Trigger a workflow from your own site (form submit)
code
// Submitting a DigAI form fires the FORM_SUBMITTED workflow trigger.
// Other triggers: NEW_LEAD, NEW_WABA_LEAD, TAG_ADDED, APPOINTMENT_BOOKED, MANUAL.
POST https://api.digai.in/public/forms/{FORM_UID}/submit
Content-Type: application/json

{
  "values": { "name": "Priya Nair", "phone": "9820011223", "note": "checkout_abandoned" }
}
Outbound Advanced Webhook Action Node
code
// DigAI workflow sends HTTP POST to your backend with merge variables:
POST https://api.yourdomain.com/v1/digai-callback
Authorization: Bearer YOUR_INTERNAL_SECRET
Content-Type: application/json

{
  "contactId": "{{contact.id}}",
  "phone": "{{contact.phone}}",
  "dealValue": "{{deal.value}}",
  "source": "{{contact.source}}"
}
Method 03API Keys · Planned

Public REST Endpoints

Direct JSON HTTP endpoints for marketing leads, plans, active coupons, and booking calendars. Auth is currently session/JWT; standalone API keys are planned.

Authentication Status
code
// Current Auth Model:
// 1. /public/* endpoints require NO authorization header.
// 2. Dashboard endpoints require JWT Bearer token from user login session.
// 3. API Keys (X-DigAI-Key): Planned (see Roadmap)
Step-by-Step Guide

Quickstart in 4 steps

Go from zero to an automated WhatsApp dispatch triggered by your own server.

01

Create an account and obtain your tenant endpoint

Sign up for a free 14-day trial. All public API operations operate against your organization tenant or public router endpoints.

bash
# Verify the public API is accessible
curl -I https://api.digai.in/public/plans
02

Push a lead into your CRM

Send a contact from your custom landing page, custom mobile app, or backend server directly to the sales lead ingestion endpoint.

curl
curl -X POST https://api.digai.in/public/sales-leads \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Rohan Gupta",
    "email": "rohan@fintech.co.in",
    "countryCode": "+91",
    "phone": "9988776655",
    "source": "custom-landing-page"
  }'
03

Receive the contact and verify tags

DigAI deduplicates on email or phone, keeps one contact, and appends each new enquiry to that contact’s history with its source.

json
// Response HTTP 201 Created
{
  "ok": true,
  "reference": "DGA-98A7BC"
}
04

Trigger an automated WhatsApp workflow via webhook

Set your visual workflow trigger to "New Lead" or "Inbound Webhook" to immediately dispatch an approved WhatsApp template with dynamic variables.

json
// Workflow node payload received
{
  "trigger": "lead.created",
  "contact": {
    "name": "Rohan Gupta",
    "phone": "+919988776655"
  },
  "action": "whatsapp_send_template",
  "template": "welcome_instant_brochure",
  "status": "queued"
}
Webhook Telemetry

Event Reference & Payload Catalog

DigAI sends JSON webhooks with cryptographic timestamp headers for every key lifecycle event.

json
{
  "event": "lead.created",
  "timestamp": "2026-10-19T08:30:00Z",
  "tenantId": "tenant_01h8...",
  "contact": {
    "id": "cnt_88192a",
    "fullName": "Vikram Sethi",
    "phone": "+919811223344",
    "email": "vikram@example.com",
    "source": "meta-lead-ads",
    "tags": [
      "festive-promo-q4",
      "mumbai-branch"
    ]
  }
}
Public REST API

Public Endpoints Reference

Documented public router endpoints accessible without browser session authentication.

GETPublic, no auth
/public/plans

Active pricing plans. Prices are in paise (divide by 100 for rupees).

Sample Response
json
[
  {
    "key": "basic",
    "name": "Basic",
    "priceMonthly": 99900,
    "priceAnnual": 999900,
    "staffSeatLimit": 5,
    "contactLimit": 2000,
    "emailMonthlyLimit": 5000
  }
]
GETPublic, no auth
/public/coupons/active

The one publicly advertised percent-off coupon, or null when none is running.

Sample Response
json
{
  "coupon": { "code": "LAUNCH50", "percentOff": 50, "endsAt": "2026-11-30T23:59:59.000Z" }
}
POSTPublic, no auth
/public/coupons/validate

Check a coupon code you were given. A failed check never says why.

Sample Response
json
{ "valid": true, "code": "LAUNCH50", "percentOff": 50, "endsAt": null }
// or: { "valid": false }
POSTPublic, no auth
/public/sales-leads

Create (or update) a contact from a website form. Only name and email are required.

Sample Response
json
{ "ok": true, "reference": "DGA-33918A" }
POSTPublic, no auth
/public/newsletter

Subscribe an email address to the DigAI newsletter.

Sample Response
json
{ "ok": true }
GETPublic, no auth
/public/status

Live system status. Components the API cannot measure are reported as "unknown".

Sample Response
json
{
  "overall": "operational",
  "updatedAt": "10:42:07 am IST",
  "components": [
    { "id": "api", "name": "Public API & Webhooks", "status": "operational" },
    { "id": "database", "name": "Database", "status": "operational" }
  ],
  "incidents": [],
  "hasLiveUptimeData": false
}
GETPublic, no auth
/public/calendar/:slug?from=ISO&to=ISO

Booking-page configuration for an event type plus the slots already booked in the range.

Sample Response
json
// JSON: the event type's public config (hours, duration, buffers) and "bookedSlots".
// The shape follows the dashboard's booking page and is not yet versioned.
POSTPublic, no auth
/public/calendar/:slug/book

Book a slot on a public booking page.

Sample Response
json
// JSON: the created appointment.
GETPublic, no auth
/public/chat-widgets/:uid

Chat widget theme, greeting and status, used by widget-loader.js.

Sample Response
json
// JSON: widget settings and status ("ACTIVE" widgets only render).
POSTPublic, no auth
/public/chat-widgets/:uid/leads

Start a chat: creates the contact and a conversation, returns the conversation id.

Sample Response
json
{ "conversationId": "..." }
GETPublic, no auth
/public/forms/:uid

Form definition (fields and settings) for an embeddable form.

Sample Response
json
// JSON: the form's public definition, used by form-loader.js.
POSTPublic, no auth
/public/forms/:uid/submit

Submit a response. Creates a contact and fires the FORM_SUBMITTED workflow trigger.

Sample Response
json
// JSON confirmation for the submission.
GETPublic, no auth
/public/products/:slug

A published product (or digital course) page by slug.

Sample Response
json
// JSON: the published product.
POSTPublic, no auth
/public/products/:slug/enquire

Send an enquiry for a product; creates a contact.

Sample Response
json
// JSON confirmation for the enquiry.

Rate Limits, CORS & Technical Specifications

Rate Limits

Every public endpoint is rate limited per IP address. Typical limits per minute: plans 120, coupon check 15, sales-leads 8, newsletter 5, applications 5, form submit 20, booking 10. When exceeded the API returns HTTP 429 Too Many Requests.

CORS Policy

CORS is enabled (Access-Control-Allow-Origin: *) on all /public/* endpoints to allow seamless client-side submissions from your custom frontend websites.

Error Structure

Errors use standard HTTP status codes with a JSON body such as { "statusCode": 400, "message": ["Phone must be 7-12 digits."], "error": "Bad Request" }.

SDKs & Official Tooling Roadmap
TypeScript / Node SDK Planned
Python SDK Planned
Postman Collection & OpenAPI 3.1 Spec Planned
Official Zapier App Planned

Latest Platform Updates

Recently deployed engine enhancements and API changes.

Full Changelog →
v2.6.0October 12, 2026 {{DATE}}

Visual Workflow Engine with 26 Native Action Nodes

A completely revamped drag-and-drop workflow canvas supporting conditional branches, time delays, dynamic contact merge fields, and 26 native actions.

v2.5.2September 28, 2026 {{DATE}}

WhatsApp Cloud API Interactive Templates & Read Analytics

Direct Meta Cloud API sync with instant template approval checking, quick-reply button triggers, and per-message Sent / Delivered / Read tracking.

v2.5.0September 14, 2026 {{DATE}}

Zero-Middleman Meta Lead Ads Webhook Ingestion

Instant sub-second lead capture from Facebook and Instagram instant lead forms without requiring Zapier or third-party webhooks.

Developer Support

Need custom API assistance?

Our engineering team assists paying teams and agencies with custom webhook testing, field mappings, and sandbox setup.

Ready to build your automation flow?

Sign up for a free 14-day trial and start sending test webhooks within minutes.