# WACM.in - WhatsApp Business API Platform WACM.in is India's #1 WhatsApp Business API platform and an official Meta Business Partner. It helps businesses reach 500M+ WhatsApp users with 98% open rates through automated campaigns, AI chatbots, bulk messaging, and omnichannel communication. Headquartered in Ahmedabad, Gujarat, India. ## Overview - **Name**: WACM.in (WhatsApp Campaign Manager) - **Parent Company**: CodingMantra - **Website**: https://wacm.in - **App URL**: https://app.wacm.in - **API Docs**: https://wacm.in/docs/api - **Contact**: wacm@codingmantra.com | +91-7201080909 - **WhatsApp**: https://wa.me/917201080909 - **Status**: Official Meta Business Partner, WhatsApp Business Solution Provider ## Quick Facts - Official Meta Business Partner for WhatsApp Business API - One-click embedded signup (Facebook) to connect in 60 seconds - Keep existing WhatsApp number with parallel mode (zero downtime) - 98% WhatsApp message open rate vs 20% email - Businesses automate 70-80% of routine customer inquiries - Recover 25%+ of abandoned cart sales via WhatsApp - 70-80% reduction in appointment no-shows - 100+ languages supported via AI translation - 38+ node types in visual AI Flow Builder - 300+ AI models available through OpenRouter integration - Pricing starts at ₹299/month, scales with business needs ## Core Features ### AI Flow Builder Visual drag-and-drop tool to build intelligent WhatsApp chatbots without code. 38+ node types across 7 categories (Input, Output, Commerce, Integration, AI, Flow Control, Knowledge). Upload PDFs, DOCX, websites, FAQs to train AI via vector embeddings for semantic search. Integrates with OpenRouter for 300+ AI models (GPT-4, Claude, Llama, etc.). Per-tenant API keys for complete control. Supports payment links, conditional branches, delays, API calls, sub-flows, and error handling. - URL: https://wacm.in/features/ai-flow-builder ### eCommerce Store (Shop) Complete storefront inside WhatsApp with product catalog, AI-powered natural language search ("show me red shirts under 1000"), cart & checkout within chat, order management, and payment integration (Razorpay, COD, bank transfer). Native sync with Shopify and WooCommerce via webhooks. Custom ERP integrations via REST API (v1/shop). Real-time inventory tracking with low-stock alerts. - URL: https://wacm.in/features/shop-ecommerce-storefront ### One-Click API Onboarding (Embedded Signup) Connect WhatsApp Business API in under 60 seconds via Facebook's embedded signup. Handles authentication, token exchange, WABA discovery (5-layer fallback strategy), phone registration, and webhook subscription automatically. Parallel mode lets you use existing WhatsApp Business number alongside API with zero downtime. No developer needed. - URL: https://wacm.in/features/embedded-signup-whatsapp-api ### Bulk Messaging & Campaigns Send targeted campaigns to tens of thousands of contacts simultaneously. Pre-approved WhatsApp templates with dynamic variable substitution (contact name, phone, custom fields, order IDs). Configurable batch sizes, database/Redis-backed queues, real-time tracking (sent/delivered/read/failed), automatic retry for failed messages. Bot campaigns trigger automated replies by keywords. Google Maps visualization for delivery analytics. - URL: https://wacm.in/features/whatsapp-bulk-messaging ### Audience Segmentation Unlimited custom segments based on behavior, attributes, purchase history, and engagement. Contact groups, custom fields, behavioral targeting (message engagement, last reply time, subscription status), AI bot status, language preferences. Dynamic lists auto-update when contact data changes. Excel import/export with smart deduplication. - URL: https://wacm.in/features/whatsapp-audience-segmentation ### AI Chatbot Builder No-code chatbot creation with quick replies, exact match, contains match, welcome messages, chain replies (multi-step), and AI-powered responses via OpenRouter. Interactive buttons, lists, and reply buttons. Configurable agent handover with trigger keywords ("Talk to a human"). Multi-language support via AI translation. - URL: https://wacm.in/features/whatsapp-chatbots-automation ### Team Inbox & Collaboration Shared inbox for unlimited agents on a single WhatsApp number. Chat assignment, private internal notes, real-time sync via Pusher WebSockets, resolved chat tracking, live chat list updates. Performance reports: open conversations, conversation traffic, conversation-by-agent breakdown, response times, message volume, resolution rates. - URL: https://wacm.in/features/whatsapp-team-inbox ### Analytics Dashboard Track sent/delivered/read/replied rates, click-through rates, agent response times, conversation volume, credit usage, campaign ROI. Report types: Open Conversations, Conversation Traffic (interactive charts), Conversation by Agent, Campaign Analytics (with Google Maps), Credit Usage. Message lifecycle tracking: Scheduled → Sending → Sent → Delivered → Read. Failed message flagging with error details. - URL: https://wacm.in/features/whatsapp-analytics-reporting ### Automated Reminders Appointment reminders, payment reminders, subscription renewals, event notifications, shipping confirmations, multi-step follow-up sequences. Use Flow Builder delay nodes for timed sequences (e.g., 24h before + 1h before appointment). Queue system for large-scale campaigns. 98% open rate vs 20% for email reminders. 70-80% reduction in no-shows. - URL: https://wacm.in/features/automated-whatsapp-reminders ### Web Widget Customizable WhatsApp chat widget for websites. Click-to-chat, custom design (colors, size, position), pre-filled welcome message, mobile optimized. Single script tag installation (asynchronous loading, no page speed impact). Compatible with WordPress, Shopify, Wix, Squarespace, custom websites. Free with all plans. - URL: https://wacm.in/features/whatsapp-chat-widget-for-website ### eCommerce Integrations (Shopify & WooCommerce) Abandoned cart recovery (25%+ recovered sales), automated order confirmations, shipping updates with tracking links, post-delivery review requests, reorder reminders. Real-time product and order sync via webhooks. WhatsApp Catalog integration for native in-app product browsing. Custom ERP sync via REST API. - URL: https://wacm.in/features/whatsapp-ecommerce-integrations ### Omnichannel Integrations Twilio SMS (fallback when WhatsApp unavailable), email platform sync, CRM integration, webhooks for custom endpoints, OneSignal web push notifications. Cross-channel customer journeys (email → WhatsApp → SMS). Contact synchronization across platforms. Fallback messaging ensures critical messages always reach customers. - URL: https://wacm.in/features/omnichannel-integrations-sms-email ### Commerce & Payment Lifecycle Razorpay payment links generated from AI flows and sent via WhatsApp. 7 event-driven trigger nodes: Payment Received, Payment Failed, Subscription Activated, Subscription Renewed, Subscription Cancelled, Subscription Expired, Refund Processed. HMAC-SHA256 webhook verification, encrypted API keys, deduplication, retry logic. 30+ data points per payment event. Auto contact creation for new payers. Full subscription lifecycle tracking. - URL: https://wacm.in/features/commerce-payment-lifecycle ### Green Tick Verification Official WhatsApp verified badge application support as Meta Business Partner. Requirements: Two-factor authentication, brand notability, WhatsApp Business API, verified Facebook Business Manager. Services: Application review, notability guidance, submission assistance, follow-up support. 2-4 week Meta review process. Verified accounts see higher open and response rates. - URL: https://wacm.in/features/whatsapp-green-tick-verification ### Developer API & Webhooks Full REST API (v1) for contacts, messages, templates, groups, campaigns, conversations, products, categories, orders, AI search, ERP sync. Bearer token authentication via Sanctum personal access tokens. Rate limits: Starter (60/min, 10K/day), Professional (300/min, 100K/day), Enterprise (1000/min, unlimited). Real-time webhooks for incoming messages, delivery updates, status changes, payment events. Complete documentation at /docs/api. - URL: https://wacm.in/features/whatsapp-api-for-developers - API Docs: https://wacm.in/docs/api ### Voice Calls Make and receive voice calls through WhatsApp Business API. Direct calling from business number, call logging (duration, status, timestamp, notes), escalation triggers from AI flows, call history with search/filter, missed call alerts. Use cases: support escalations, sales consultations, appointment confirmations, feedback collection. - URL: https://wacm.in/features/whatsapp-voice-calls ### Customer Journey Tracking Kanban-style sales pipeline visualization with customizable stages (New Lead → Engaged → Qualified → Proposal → Customer → Loyal → Advocate). Automated stage transitions with triggers and campaigns. Drag-and-drop contact management. Conversion rate tracking between stages. Custom stages matching unique sales processes. - URL: https://wacm.in/features/customer-journey-tracking ### AI Chat Translation Real-time bidirectional message translation in 100+ languages (Hindi, Tamil, Bengali, Marathi, Gujarati, etc.). Auto language detection, agent display language preference, contact language preference storage. Original message preservation alongside translation. AI chat summaries, style analysis, Q&A about conversations, sentiment analysis. - URL: https://wacm.in/features/chat-translation-ai ### Credits & Billing Dashboard Transparent credit-based pricing. 1 credit per outbound message, variable credits for AI flows, credits per campaign message, credits by call duration. Complete transaction logs (action, amount, timestamp). Progress bars, usage tracking, credit expiration monitoring. Subscription history with plan switches. Stripe and Razorpay payment records. No hidden fees. - URL: https://wacm.in/features/credits-billing-transactions ### Import/Export Contacts Excel (.xlsx) and CSV (.csv) import wizard with column mapping, custom fields, intelligent deduplication by phone number, preview & validate, batch processing for large files. Export options: full export, filtered by groups/segments, custom fields included, Excel or CSV format, optional message history. - URL: https://wacm.in/features/import-export-contacts ### Knowledge Base & AI Training Train AI chatbots with business content. Supported formats: PDF, DOCX, TXT, website URLs, FAQ entries. Vector embedding process: upload → chunk → embed → index → retrieve. Semantic search understands intent, not just keywords. Add/edit/remove content anytime. Immediate reflection in AI responses. - URL: https://wacm.in/features/knowledge-base-builder ## Pricing Two-part pricing structure: 1. **WACM Platform Fee** — Plan price covers software: team inbox, AI automation, campaigns, integrations, support tools. 2. **Meta Conversation Fees** — WhatsApp charges per-conversation fees (marketing, utility, authentication, service). Billed directly by Meta based on actual usage. Plans start at ₹299/month. Transparent pricing, no setup fees, no hidden charges. Upgrade anytime. Monthly and annual billing available. Credits included per plan tier. - Pricing page: https://wacm.in/pricing - Meta pricing reference: https://business.whatsapp.com/products/platform-pricing ## Integrations - **Payment**: Razorpay (payment links, subscription lifecycle), Stripe (subscription billing) - **eCommerce**: Shopify (product sync, order webhooks, abandoned cart), WooCommerce (product sync, order status) - **Communication**: Twilio (SMS fallback), OneSignal (web push), Email platforms (contact sync) - **AI**: OpenRouter (300+ models including GPT-4, Claude, Llama) - **Custom**: REST API, webhooks, HMAC-SHA256 verified webhook processing ## Technical Details - **Multi-tenant architecture** with company-level data isolation - **Real-time updates** via Pusher WebSockets - **Queue system**: Database or Redis-backed async processing - **Vector embeddings** for semantic AI search - **HMAC-SHA256** webhook signature verification - **Encrypted secrets** (API keys stored encrypted at rest) - **Deduplication** logic prevents duplicate webhook processing - **Sanctum** bearer token authentication for API - **Pusher** real-time event broadcasting for team inbox ## Target Use Cases - D2C brands and e-commerce businesses - Local businesses reaching customers via WhatsApp - Restaurants (food orders, reservations) - Healthcare (appointments, reminders, teleconsultations) - Education (course updates, enrollment, reminders) - Real estate (lead qualification, property inquiries) - Financial services (payment reminders, subscription renewals) - Service providers (booking management, follow-ups) - SaaS companies (onboarding, support, engagement) - Agencies managing multiple client WhatsApp accounts ## Contact & Support - **Email**: wacm@codingmantra.com - **Phone/WhatsApp**: +91-7201080909 - **Website**: https://wacm.in - **App**: https://app.wacm.in - **Contact Form**: https://wacm.in/contact - **Documentation**: https://wacm.in/docs - **Features**: https://wacm.in/features - **Pricing**: https://wacm.in/pricing - **Blog**: https://wacm.in/blog ### Office Locations - **Ahmedabad**: A 315, Celebration City Center, South Bopal, Bopal, Ahmedabad, Gujarat 380058 (India) ### Social - Facebook: https://www.facebook.com/CodingMantra.IN - LinkedIn: https://www.linkedin.com/company/codingmantra - Instagram: https://www.instagram.com/codingmantra_com - Twitter: https://twitter.com/CodingMantra ## Key Differentiators - Official Meta Business Partner (not a reseller) - One-click setup in 60 seconds, keep existing number - Visual AI Flow Builder with 38+ node types (no coding) - Native eCommerce store inside WhatsApp with AI search - Complete payment lifecycle management in flows - 100+ language translation with AI summaries - Voice calls through WhatsApp Business API - Kanban-style customer journey tracking - Transparent credit-based billing, no hidden fees - 20+ features and growing # Full API Documentation ## API Documentation - WhatsApp Business & eCommerce APIs ### Endpoints - **GET** `/contacts`: List all contacts - **POST** `/contacts`: Create a new contact - **GET** `/contacts/{id}`: Get contact details - **PUT** `/contacts/{id}`: Update contact information - **DELETE** `/contacts/{id}`: Delete contact - **POST** `/messages/text`: Send text message - **POST** `/messages/template`: Send template message - **POST** `/messages/list`: Send list message - **GET** `/templates`: List message templates - **GET** `/campaigns`: List campaigns - **POST** `/campaigns/send`: Send campaign - **GET** `/products`: List all products - **POST** `/products`: Create a new product - **GET** `/products/{id}`: Get product details - **PUT** `/products/{id}`: Update product - **DELETE** `/products/{id}`: Delete product - **GET** `/categories`: List categories - **POST** `/categories`: Create category - **GET** `/orders`: List orders - **GET** `/orders/{id}`: Get order details - **PUT** `/orders/{id}/status`: Update order status - **GET** `/v1/contacts`: List all contacts (paginated) - **POST** `/v1/contacts`: Create a new contact - **GET** `/v1/contacts/{id}`: Get contact details - **PUT** `/v1/contacts/{id}`: Update contact - **DELETE** `/v1/contacts/{id}`: Delete contact - **POST** `/v1/verification/request`: Request OTP verification - **POST** `/v1/verification/verify`: Verify OTP code - **GET** `/v1/verification/status/{id}`: Check verification status - **POST** `/v1/verification/resend`: Resend OTP code - **POST** `/ai/flowmaker/generate`: Generate flow from prompt (preview) - **POST** `/ai/flowmaker/generate-and-create`: Generate and save flow ### Request Header ```http GET /api/v1/contacts HTTP/1.1 Host: api.wacm.in Authorization: Bearer your_api_token_here Accept: application/json ``` ### cURL ```bash curl "https://api.wacm.in/api/v1/contacts?token=your_api_token_here" ``` ### Base URL ```text https://api.wacm.in/api/v1 ``` ### Paginated Response ```json { "data": [...], "links": { "first": "https://api.wacm.in/api/v1/contacts?page=1", "last": "https://api.wacm.in/api/v1/contacts?page=5", "prev": null, "next": "https://api.wacm.in/api/v1/contacts?page=2" }, "meta": { "current_page": 1, "last_page": 5, "per_page": 15, "total": 75 } } ``` ## WhatsApp Business API Documentation - Contacts, Messages & Campaigns ### Endpoints - **GET** `/me`: Get authenticated user profile - **GET** `/contacts`: List all contacts with pagination (page, limit, search) - **POST** `/contacts`: Create a new contact - **GET** `/contacts/{id}`: Get contact details with groups and fields - **PUT** `/contacts/{id}`: Update contact information - **DELETE** `/contacts/{id}`: Delete contact - **GET** `/contacts/{id}/groups-and-fields`: Get contact groups and custom fields - **GET** `/contacts/{id}/notes`: Get contact notes - **POST** `/contacts/check-phone`: Check if phone number exists on WhatsApp - **POST** `/messages/text`: Send a text message - **GET** `/messages/text`: Send a text message (GET) - **POST** `/messages/template`: Send an approved template message - **GET** `/messages/template`: Send template message (GET) - **POST** `/messages/list`: Send an interactive list message - **GET** `/messages/list`: Send list message (GET) - **GET** `/templates`: List all approved templates - **GET** `/templates/{id}`: Get template details - **GET** `/groups`: List all contact groups - **GET** `/campaigns`: List all campaigns with pagination (page, limit, search) - **POST** `/campaigns`: Create a new campaign - **GET** `/campaigns/{id}`: Get campaign statistics and details - **PUT** `/campaigns/{id}`: Update campaign status (pause/resume) - **DELETE** `/campaigns/{id}`: Delete a campaign - **POST** `/campaigns/send`: Dispatch a campaign message to a contact dynamically - **GET** `/conversations`: List all conversations with pagination (page, limit, search) - **GET** `/conversations/{id}/messages`: Get conversation messages with pagination (limit, before_id, search) ### Paginated Request ```bash curl -H "Authorization: Bearer YOUR_TOKEN" \\ "https://api.wacm.in/api/v1/contacts?page=2&limit=20" ``` ### Paginated Response ```json { "data": [...], "links": { "first": "...", "last": "...", "prev": "...", "next": "..." }, "meta": { "current_page": 2, "last_page": 5, "per_page": 20, "total": 100 } } ``` ### Example Request ```bash curl -X GET "https://api.wacm.in/api/v1/contacts" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Accept: application/json" ``` ### Webhook URL ```text https://yourdomain.com/api/wpbox/{your_sanctum_token} ``` ### Text Message Payload ```json { "entry": [{ "id": "WABA_ID", "changes": [{ "value": { "messaging_product": "whatsapp", "messages": [{ "from": "919876543210", "id": "wamid.XXX", "timestamp": "1234567890", "type": "text", "text": { "body": "Hello" } }], "contacts": [{ "profile": { "name": "John Doe" }, "wa_id": "919876543210" }] } }] }] } ``` ### Status Update Payload ```json { "entry": [{ "changes": [{ "value": { "messaging_product": "whatsapp", "statuses": [{ "id": "wamid.XXX", "status": "delivered", "timestamp": "1234567890", "recipient_id": "919876543210" }] } }] }] } ``` ### Response ```json { "id": 1, "name": "John Doe", "email": "john@example.com", "company_id": 1, "role": "owner" } ``` ### Request ```bash curl -X POST "https://api.wacm.in/api/v1/contacts" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "name": "John Doe", "phone": "+919876543210", "email": "john@example.com" }' ``` ### 201 Created ```json { "id": 123, "name": "John Doe", "phone": "+919876543210", "email": "john@example.com", "avatar": null, "enabled_ai_bot": true, "subscribed": true, "created_at": "2025-01-15T10:30:00.000000Z" } ``` ### Request ```bash curl -X POST "https://api.wacm.in/api/v1/messages/text" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "phone": "+919876543210", "message": "Hello! This is a test message from WACM API." }' ``` ### Request ```bash curl -X POST "https://api.wacm.in/api/v1/messages/template" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "phone": "+919876543210", "template_name": "order_confirmation", "language": "en", "variables": { "1": "John Doe", "2": "ORD-12345" } }' ``` ### Request ```bash curl -X POST "https://api.wacm.in/api/v1/messages/list" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "phone": "+919876543210", "header": "Choose an option", "body": "Please select from the options below:", "footer": "Powered by WACM", "button_text": "View Options", "sections": [ { "title": "Main Menu", "rows": [ { "id": "opt1", "title": "Check Order Status" }, { "id": "opt2", "title": "Talk to Support" } ] } ] }' ``` ### 200 OK ```json { "data": [ { "id": 1, "name": "order_confirmation", "status": "APPROVED", "category": "UTILITY", "language": "en", "components": [...], "created_at": "2025-01-15T10:30:00.000000Z" } ] } ``` ### Response ```json { "data": [ { "id": 1, "name": "VIP Customers", "contact_count": 150, "created_at": "2025-01-15T10:30:00.000000Z" } ] } ``` ### Request ```bash curl -X POST "https://api.wacm.in/api/v1/campaigns" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "name": "Summer Sale 2025", "template_id": 1, "group_id": null, "send_now": true, "paramvalues": { "1": "Summer Sale", "2": "50% OFF" } }' ``` ### Response ```json { "data": [ { "id": 1, "contact_id": 123, "value": "Hello! How can I help you?", "is_message_by_contact": 0, "message_type": 1, "status": 4, "created_at": "2025-01-15T10:30:00.000000Z" }, { "id": 2, "contact_id": 123, "value": "I need help with my order", "is_message_by_contact": 1, "message_type": 1, "status": 4, "created_at": "2025-01-15T10:31:00.000000Z" } ] } ``` ### Error Response ```json { "message": "The phone number is required.", "errors": { "phone": ["The phone field is required."] } } ``` ### Request Body | Name | Type | Required | Description | |---|---|---|---| | name | string | true | Contact full name | | phone | string | true | WhatsApp phone number with country code | | email | string | false | Contact email address | | country_id | integer | false | Country ID reference | | user_id | integer | false | Assigned agent/user ID | ### Request Body | Name | Type | Required | Description | |---|---|---|---| | phone | string | true | Recipient WhatsApp number | | message | string | true | Message text content | ### Request Body | Name | Type | Required | Description | |---|---|---|---| | name | string | true | Campaign name | | template_id | integer | true | WhatsApp template ID | | group_id | integer | false | Target group ID (null = all contacts) | | send_now | boolean | false | Send immediately (true) or schedule later (false) | | send_time | string | false | Time to send if send_now is false | | paramvalues | object | false | Template variable mapping values | | pdf | file | false | Multipart form data for PDF attachments | | imageupload | file | false | Multipart form data for Image/Video attachments | ## Contacts API Documentation - Manage Contacts & Custom Fields ### Authorization Header ```bash curl -H "Authorization: Bearer YOUR_API_TOKEN" \\ https://api.wacm.in/api/v1/contacts ``` ### Example Request ```bash curl -H "Authorization: Bearer YOUR_TOKEN" \\ "https://api.wacm.in/api/v1/contacts?limit=10&page=1" ``` ### 200 OK ```json { "data": [ { "id": 1, "name": "John Doe", "phone": "+1234567890", "email": "john@example.com", "avatar": null, "country_id": 1, "enabled_ai_bot": true, "subscribed": true, "credits": 0, "catalog_token": "abc123...", "catalog_link": "https://app.wacm.in/s/abc123...", "created_at": "2026-07-14T10:00:00.000000Z", "updated_at": "2026-07-14T10:00:00.000000Z", "first_name": "John", "company_name": "Acme Inc" } ], "links": { "first": "...", "last": "...", "prev": null, "next": "..." }, "meta": { "current_page": 1, "last_page": 5, "per_page": 15, "total": 75 } } ``` ### Example Request ```bash curl -X POST https://api.wacm.in/api/v1/contacts \\ -H "Authorization: Bearer YOUR_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "name": "Jane Smith", "phone": "+1234567890", "email": "jane@example.com", "company_name": "Acme Inc" }' ``` ### 201 Created ```json { "message": "Contact created successfully", "contact": { "id": 2, "name": "Jane Smith", "phone": "+1234567890", "email": "jane@example.com", "enabled_ai_bot": true, "subscribed": true, "created_at": "2026-07-14T10:00:00.000000Z" } } ``` ### Example Request ```bash curl -H "Authorization: Bearer YOUR_TOKEN" \\ https://api.wacm.in/api/v1/contacts/1 ``` ### 200 OK ```json { "contact": { "id": 1, "name": "John Doe", "phone": "+1234567890", "email": "john@example.com", "avatar": null, "country_id": 1, "enabled_ai_bot": true, "subscribed": true, "credits": 0, "catalog_token": "abc123...", "catalog_link": "https://app.wacm.in/s/abc123...", "created_at": "2026-07-14T10:00:00.000000Z", "updated_at": "2026-07-14T10:00:00.000000Z" } } ``` ### Example Request ```bash curl -X PUT https://api.wacm.in/api/v1/contacts/1 \\ -H "Authorization: Bearer YOUR_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "name": "John Updated", "enabled_ai_bot": false }' ``` ### 200 OK ```json { "message": "Contact updated successfully", "contact": { "id": 1, "name": "John Updated", "phone": "+1234567890", "enabled_ai_bot": false, "updated_at": "2026-07-14T12:00:00.000000Z" } } ``` ### Example Request ```bash curl -X DELETE https://api.wacm.in/api/v1/contacts/1 \\ -H "Authorization: Bearer YOUR_TOKEN" ``` ### 200 OK ```json { "message": "Contact deleted successfully" } ``` ### Error Response ```json { "error": "No active company" } ``` ## eCommerce Store API Documentation - Products, Orders & Integrations ### Endpoints - **GET** `/products`: List all products - **POST** `/products`: Create a new product - **GET** `/products/{'{id}'}`: Get product details - **PUT** `/products/{'{id}'}`: Update product - **DELETE** `/products/{'{id}'}`: Delete product - **GET** `/categories`: List all categories - **POST** `/categories`: Create a new category - **GET** `/categories/{'{id}'}`: Get category details - **PUT** `/categories/{'{id}'}`: Update category - **DELETE** `/categories/{'{id}'}`: Delete category - **GET** `/orders`: List all orders - **GET** `/orders/{'{id}'}`: Get order details - **PUT** `/orders/{'{id}'}/status`: Update order status - **POST** `/erp/sync`: Sync products and inventory from ERP - **POST** `/ai/search`: Search products using AI - **POST** `/webhooks/shopify/{company_id}`: Shopify webhook receiver - **POST** `/webhooks/woo/{company_id}`: WooCommerce webhook receiver - **POST** `/webhooks/custom/{token}`: Custom webhook receiver ### Authenticated Request ```bash curl -X GET "https://api.wacm.in/api/v1/shop/products" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Accept: application/json" ``` ### Request ```bash curl -X GET "https://api.wacm.in/api/v1/shop/products" \\ -H "Authorization: Bearer YOUR_API_TOKEN" ``` ### Request ```bash curl -X POST "https://api.wacm.in/api/v1/shop/products" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "name": "Premium Wireless Headphones", "description": "High-quality wireless headphones with noise cancellation", "price": 2999.00, "compare_at_price": 4999.00, "currency": "INR", "stock_quantity": 100, "status": "Active", "external_id": "SKU-WH-001", "shop_category_id": 1 }' ``` ### 201 Created ```json { "id": 1, "name": "Premium Wireless Headphones", "description": "High-quality wireless headphones with noise cancellation", "price": 2999.00, "compare_at_price": 4999.00, "currency": "INR", "stock_quantity": 100, "status": "Active", "external_id": "SKU-WH-001", "image": null, "shop_category_id": 1, "created_at": "2025-01-15T10:30:00.000000Z", "updated_at": "2025-01-15T10:30:00.000000Z" } ``` ### Request ```bash curl -X POST "https://api.wacm.in/api/v1/shop/categories" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "name": "Electronics", "description": "Electronic devices and accessories" }' ``` ### Request ```bash curl -X GET "https://api.wacm.in/shop/{company_id}/categories" ``` ### Request ```bash curl -X PUT "https://api.wacm.in/api/v1/shop/orders/123/status" \\ -H "Authorization: Bearer YOUR_API_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "status": "Shipped" }' ``` ### Request ```bash curl -X POST "https://api.wacm.in/shop/erp/sync" \\ -H "Content-Type: application/json" \\ -d '{ "company_id": 1, "products": [ { "external_id": "ERP-001", "stock_quantity": 50, "price": 1999.00 } ] }' ``` ### Request ```bash curl -X POST "https://api.wacm.in/shop/ai/search" \\ -H "Content-Type: application/json" \\ -d '{ "company_id": 1, "query": "wireless headphones under 3000", "limit": 10 }' ``` ### Shopify Webhook URL ```bash https://api.wacm.in/shop/webhooks/shopify/{your_company_id} ``` ### WooCommerce Webhook URL ```bash https://api.wacm.in/shop/webhooks/woo/{your_company_id} ``` ### Verification Process ```text 1. Receive webhook request with HMAC signature header 2. Compute HMAC-SHA256 using your shared secret 3. Compare computed signature with received signature 4. Process request only if signatures match ``` ### Request Body | Name | Type | Required | Description | |---|---|---|---| | name | string | true | Product name | | price | number | true | Product price | | description | string | false | Product description | | compare_at_price | number | false | Original price (for showing discounts) | | currency | string | false | Currency code (default: INR) | | stock_quantity | integer | false | Available stock quantity | | status | string | false | Product status: Active, Draft, Archived | | external_id | string | false | External SKU or product ID | | image | string | false | Product image URL | | shop_category_id | integer | false | Category ID reference | ### Request Body | Name | Type | Required | Description | |---|---|---|---| | name | string | true | Category name | | description | string | false | Category description | | parent_id | integer | false | Parent category ID for subcategories | ### Request Body | Name | Type | Required | Description | |---|---|---|---| | status | string | true | New order status | ## Verification API Documentation - OTP & Magic Link Verification ### HMAC Signature (Node.js) ```javascript const crypto = require('crypto'); function computeSignature(timestamp, method, path, body, secretKey) { const payload = \`\${timestamp}.\${method}.\${path}.\${body}\`; return crypto .createHmac('sha256', secretKey) .update(payload) .digest('base64'); } const timestamp = Math.floor(Date.now() / 1000).toString(); const signature = computeSignature(timestamp, 'POST', 'v1/verification/request', requestBody, secretKey); ``` ### HMAC Signature (PHP) ```php $timestamp = time(); $payload = $timestamp . '.' . $method . '.' . $path . '.' . $body; $signature = base64_encode(hash_hmac('sha256', $payload, $secretKey, true)); ``` ### Example Request ```bash curl -X POST https://api.wacm.in/v1/verification/request \\ -H "X-Public-Key: YOUR_PUBLIC_KEY" \\ -H "X-Signature: COMPUTED_SIGNATURE" \\ -H "X-Timestamp: 1721000000" \\ -H "Content-Type: application/json" \\ -d '{ "profile_id": "550e8400-e29b-41d4-a716-446655440000", "identifier": "+1234567890", "channel": "whatsapp", "purpose": "LOGIN" }' ``` ### 200 OK ```json { "request_id": "660e8400-e29b-41d4-a716-446655440001", "status": "pending", "expires_at": "2026-07-14T10:15:00.000000Z" } ``` ### Example Request ```bash curl -X POST https://api.wacm.in/v1/verification/verify \\ -H "X-Public-Key: YOUR_PUBLIC_KEY" \\ -H "Content-Type: application/json" \\ -d '{ "request_id": "660e8400-e29b-41d4-a716-446655440001", "code": "123456" }' ``` ### 200 OK — Verified ```json { "verified": true, "request_id": "660e8400-e29b-41d4-a716-446655440001", "trust_key": "session_abc123", "identifier": "+1234567890", "channel": "whatsapp", "verified_at": "2026-07-14T10:05:00.000000Z" } ``` ### 200 OK — Failed ```json { "verified": false, "request_id": "660e8400-e29b-41d4-a716-446655440001" } ``` ### Example Request ```bash curl -H "X-Public-Key: YOUR_PUBLIC_KEY" \\ https://api.wacm.in/v1/verification/status/660e8400-e29b-41d4-a716-446655440001 ``` ### 200 OK — Pending ```json { "status": "pending" } ``` ### 200 OK — Verified ```json { "status": "verified", "trust_key": "session_abc123", "identifier": "+1234567890", "channel": "whatsapp", "verified_at": "2026-07-14T10:05:00.000000Z" } ``` ### Example Request ```bash curl -X POST https://api.wacm.in/v1/verification/resend \\ -H "X-Public-Key: YOUR_PUBLIC_KEY" \\ -H "Content-Type: application/json" \\ -d '{ "request_id": "660e8400-e29b-41d4-a716-446655440001" }' ``` ### 200 OK ```json { "success": true, "message": "Resend initiated" } ``` ### Validation Error (422) ```json { "error": "Validation failed", "details": { "profile_id": ["The selected profile id is invalid."], "channel": ["The selected channel is invalid."] } } ``` ### Fraud Prevention (429) ```json { "error": "Too many verification attempts. Please try again later." } ``` ## AI Flow API Documentation - Generate Flows with Natural Language ### Authorization Header ```bash curl -H "Authorization: Bearer YOUR_API_TOKEN" \\ https://api.wacm.in/ai/flowmaker/generate ``` ### Example Request ```bash curl -X POST https://api.wacm.in/ai/flowmaker/generate \\ -H "Authorization: Bearer YOUR_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "prompt": "When someone sends a message with the word hello, reply with a welcome message and ask for their name" }' ``` ### 200 OK ```json { "success": true, "data": { "nodes": [ { "id": "node_1", "type": "keyword_trigger", "data": { "settings": { "keywords": [ { "id": "kw1", "value": "hello", "matchType": "contains" } ] } }, "position": { "x": 100, "y": 200 } }, { "id": "node_2", "type": "message", "data": { "settings": { "message": "Welcome! What is your name?" } }, "position": { "x": 400, "y": 200 } }, { "id": "node_3", "type": "question", "data": { "settings": { "question": "Please enter your name:", "variableName": "user_name" } }, "position": { "x": 700, "y": 200 } }, { "id": "node_4", "type": "message", "data": { "settings": { "message": "Nice to meet you, {{user_name}}!" } }, "position": { "x": 1000, "y": 200 } }, { "id": "node_5", "type": "end", "data": {}, "position": { "x": 1300, "y": 200 } } ], "edges": [ { "id": "e1", "source": "node_1", "target": "node_2", "sourceHandle": "kw1" }, { "id": "e2", "source": "node_2", "target": "node_3" }, { "id": "e3", "source": "node_3", "target": "node_4" }, { "id": "e4", "source": "node_4", "target": "node_5" } ] } } ``` ### Example Request ```bash curl -X POST https://api.wacm.in/ai/flowmaker/generate-and-create \\ -H "Authorization: Bearer YOUR_TOKEN" \\ -H "Content-Type: application/json" \\ -d '{ "prompt": "Create an abandoned cart recovery flow that sends a reminder 1 hour after cart abandonment, then a discount offer after 24 hours", "name": "Abandoned Cart Recovery" }' ``` ### 201 Created ```json { "success": true, "data": { "flow_id": 42, "redirect_url": "/flowmaker/42/edit" } } ``` ### Error Response ```json { "success": false, "message": "You have reached the maximum number of flows allowed by your plan." } ``` ## Reminders & Reservations Documentation - Scheduled Messaging & Booking System ### Template Example ```text Hi {{1}}, This is a reminder for your appointment on {{-4}}. Source: {{-6}} External Reference: {{-7}} See you soon! ```