{"openapi":"3.1.0","info":{"title":"WACM Developer & WhatsApp Business API","version":"1.0.0","description":"Meta Cloud API Partner WhatsApp Messaging, Contacts CRM, Broadcast Campaigns, eCommerce Storefront, and Multi-Channel Identity Verification.","contact":{"name":"WACM Developer Support","url":"https://wacm.in/contact","email":"support@wacm.in"}},"servers":[{"url":"https://app.wacm.in","description":"Production API Server"}],"paths":{"/api/v1/me":{"get":{"summary":"Get authenticated profile and company context","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Profile information","content":{"application/json":{}}}}}},"/api/v1/contacts":{"get":{"summary":"List all contacts with pagination","security":[{"BearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"group_id","in":"query","schema":{"type":"integer"}},{"name":"tag_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Paginated contacts list"}}},"post":{"summary":"Create or update a contact","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","example":"+919876543210"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"city":{"type":"string"},"company_name":{"type":"string"},"subscribed":{"type":"boolean","default":true},"enabled_ai_bot":{"type":"boolean"},"groups":{"type":"array","items":{"type":"integer"}},"tags":{"type":"array","items":{"type":"integer"}},"fields":{"type":"object"}}}}}},"responses":{"200":{"description":"Contact record"}}}},"/api/v1/contacts/bulk-sync":{"post":{"summary":"Bulk sync contacts and assign to group or tag","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","items":{"type":"object","required":["phone"],"properties":{"phone":{"type":"string"},"name":{"type":"string"}}}},"country_code":{"type":"string","example":"91"},"group_id":{"type":"integer"},"tag_id":{"type":"integer"}}}}}},"responses":{"200":{"description":"Bulk sync statistics"}}}},"/api/v1/messages/text":{"post":{"summary":"Send text, media, or quick-reply button message","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","example":"+919876543210"},"message":{"type":"string"},"media_url":{"type":"string","format":"uri"},"header":{"type":"string"},"footer":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Message queued / sent"}}}},"/api/v1/messages/template":{"post":{"summary":"Send approved WhatsApp template message","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["phone","template_name"],"properties":{"phone":{"type":"string"},"template_name":{"type":"string"},"template_language":{"type":"string","default":"en"},"components":{"type":"array","items":{"type":"object"}},"scheduled_at":{"type":"string"},"timezone":{"type":"string"}}}}}},"responses":{"200":{"description":"Template message queued"}}}},"/api/v1/campaigns":{"post":{"summary":"Create and dispatch broadcast campaign","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","template_id","audience_type"],"properties":{"name":{"type":"string"},"template_id":{"type":"integer"},"audience_type":{"type":"string","enum":["all","group","contact"]},"group_id":{"type":"integer"},"contact_id":{"type":"integer"},"send_now":{"type":"boolean","default":true},"prevent_template_duplicates":{"type":"boolean"},"paramvalues":{"type":"object"}}}}}},"responses":{"200":{"description":"Campaign created"}}}},"/api/v1/campaigns/{id}/retry":{"post":{"summary":"Retry failed messages for a campaign","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Campaign ID"}],"responses":{"200":{"description":"Failed messages re-queued for delivery","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"message":{"type":"string"},"data":{"type":"object","properties":{"campaign_id":{"type":"integer"},"retried":{"type":"integer"},"skipped":{"type":"integer"}}}}}}}}}}},"/v1/shop/products":{"get":{"summary":"List catalog products","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Products list"}}},"post":{"summary":"Create catalog product","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","price","category_id"],"properties":{"name":{"type":"string"},"price":{"type":"number"},"category_id":{"type":"integer"},"sku":{"type":"string"},"inventory":{"type":"integer"}}}}}},"responses":{"200":{"description":"Product created"}}}},"/v1/shop/categories":{"post":{"summary":"Create category","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"}}}}}},"responses":{"200":{"description":"Category created"}}}},"/v1/verification/request":{"post":{"summary":"Request OTP verification via WhatsApp or Email","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"string","example":"+919876543210"},"channel":{"type":"string","enum":["whatsapp","email"],"default":"whatsapp"},"profile_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Verification requested"}}}},"/v1/verification/verify":{"post":{"summary":"Verify OTP code","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["request_id","code"],"properties":{"request_id":{"type":"string"},"code":{"type":"string"}}}}}},"responses":{"200":{"description":"Verification status result"}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Sanctum Token"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Public-Key"}}}}