Auth, bootstrap, onboarding and settings
Create business accounts or 24-hour demo sessions, load initial workspace state, complete onboarding and manage settings.
Authentication
Creates a business user and private workspace and sets the 30-day session cookie. Rate-limited to prevent abuse.
| Field | Type | Constraints |
|---|---|---|
name | string | Required, 1 to 120 chars. |
business_name | string | Required, 1 to 120 chars. |
email | string | Required, valid email, 3 to 200 chars, unique. |
password | string | Required, 10 to 200 chars. |
curl -s -c cookies.txt -X POST https://dhvani.aware.co.in/api/auth/signup \
-H "Content-Type: application/json" \
-d '{"name":"Riya Sharma","business_name":"Sharma Services","email":"riya@example.in","password":"strong-pass-123"}'
{"ok": true, "adopted_local_data": false}
Signs in with email and password and sets the 30-day session cookie. Returns 401 on invalid credentials or 429 after repeated failed attempts.
curl -s -c cookies.txt -X POST https://dhvani.aware.co.in/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"riya@example.in","password":"strong-pass-123"}'
Creates an isolated 24-hour demo workspace pre-loaded with sample data and sets a 24-hour session cookie.
curl -s -c cookies.txt -X POST https://dhvani.aware.co.in/api/auth/demo
Ends the active session and clears the session cookie.
Returns current sign-in status and workspace identity.
{
"signed_in": true,
"auth_required": true,
"demo": false,
"name": "Riya Sharma",
"email": "riya@example.in",
"workspace_name": "Sharma Services",
"is_admin": false
}
Workspace bootstrap, onboarding and settings
Returns the full workspace payload for the app, including settings, agents, contacts, first 200 calls, follow-ups, integrations, knowledge notes, wallet, daily stats, 7-day volume, pricing and greeting presets.
Saves first-run business details, updates the primary agent's language, tone and greeting, optionally adds an initial knowledge note, and marks onboarding complete.
| Field | Default / Validation |
|---|---|
business_name, owner_name | Required, 1 to 120 chars. |
phone | Optional 10-digit Indian mobile/business number (+91 optional). |
city, hours | Optional (max 80 chars). Hours defaults to Mon-Sat, 9:00 AM-7:00 PM. |
language | One of the 12 supported languages (default Hinglish). |
tone | casual (default) or formal. |
knowledge_title, knowledge_text, knowledge_source | Optional initial business note saved across all agents when non-empty. |
{"ok": true, "agent_id": "agent-front-desk"}
Updates business profile, call handling, notification toggles (whatsapp_updates, email_summary) and data_retention_days (1 to 3650). Calls older than the retention window are purged on save.
Restores the default sample dataset inside a demo workspace. Returns 403 for business accounts.
curl -s -b cookies.txt -X POST https://dhvani.aware.co.in/api/demo/reset