Wetroo API Reference
Welcome to the Wetroo Developer API platform. Wetroo provides enterprise-grade REST APIs to automate WhatsApp messaging, capture incoming leads, sync multi-stage CRM pipelines, query trained Brain AI models, and embed real-time website chatbots.
Core Services Available
- WhatsApp Official API: High-throughput template dispatches, media attachments, delivery callbacks, and chat histories.
- Lead Management API: Direct lead ingestion webhooks, lead list querying with stage filters, and pipeline updates.
- Brain AI Trained API: Natural language knowledge queries, document and URL training, and model inspection.
- OmniChat Chatbot: Embeddable website chat widget and headless visitor messaging APIs.
- AI Voice Calling (Prodloop): Automated dynamic outbound voice calls, AI sales qualifiers, real-time telephony, and instant CRM lead sync webhooks.
https://api.wetroo.com/v1
{
"status": "success",
"message": "Operation completed successfully",
"data": { ... }
}
Authentication
All API requests require authentication via a secret API Key. You can generate multiple API keys with expiration rules in the Wetroo Dashboard.
Your secret API key created in your API Keys Dashboard (e.g. sk_live_...).
Standard Bearer token header: Bearer <YOUR_SECRET_KEY>.
Must be set to application/json for all POST requests.
curl -X GET https://api.wetroo.com/v1/leads/list \
-H "apikey: sk_live_9a8b7c6d5e4f3a2b1c..." \
-H "Content-Type: application/json"
{
"status": "error",
"message": "Invalid or expired API key"
}
WhatsApp: Send Template Message
Dispatch approved WhatsApp Business templates with dynamic variable arrays and optional media header attachments (PDF, JPEG, PNG, MP4).
The approved Meta template ID or name configured in your Wetroo WABA panel.
Recipient's phone number with international country code (e.g. 919876543210).
Ordered array of values for template placeholders: ["John", "INV-2026"].
Direct public URL to document/image to attach to header (e.g. https://domain.com/receipt.pdf).
curl -X POST 'https://api.wetroo.com/v1/whatsapp/template' \
-H 'apikey: sk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "1471191560175876",
"number": "919876543210",
"variable": ["Alex Johnson", "INV-2026-001"],
"attachment": "https://example.com/invoice.pdf"
}'
{
"status": "success",
"message": "Template message queued successfully",
"data": {
"message_id": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQ0...",
"recipient": "919876543210",
"status": "sent"
}
}
WhatsApp: Send Direct Message
Send direct session messages (text, photos, files) to customers with an active 24-hour service conversation window.
Recipient's phone number with country code (e.g. 919876543210).
Message body text. Supports WhatsApp markdown formatting like *bold*, _italics_.
Direct URL to an attachment to dispatch along with the message.
curl -X POST 'https://api.wetroo.com/v1/whatsapp/send' \
-H 'apikey: sk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"number": "919876543210",
"message": "Hello! How can our support team assist you today?"
}'
{
"status": "success",
"message_id": "wamid.HBgMOTE5ODc2NTQ..."
}
WhatsApp: Chat History & Access
Retrieve live conversation transcripts, exchanged attachments, and delivery receipts for any customer.
Recipient's WhatsApp number with international country prefix.
Page number for paginated message history navigation.
Number of message items per page (maximum: 100).
curl -X GET 'https://api.wetroo.com/v1/whatsapp/chats?phone=919876543210&page=1&limit=20' \
-H 'apikey: sk_live_YOUR_API_KEY'
{
"status": "success",
"contact": { "phone": "919876543210", "name": "Sarah Miller" },
"pagination": {
"total": 142,
"page": 1,
"limit": 20,
"total_pages": 8,
"has_next": true,
"has_prev": false
},
"messages": [
{
"id": 1042,
"direction": "incoming",
"body": "Hi, I have a question about enterprise plans.",
"timestamp": "2026-10-05 14:20:10"
}
]
}
Leads: Inbound Lead Ingestion
Ingest customer leads directly into your Wetroo CRM from custom landing pages, Webflow forms, Facebook lead ads, or Zapier integrations. Automatically triggers auto-responders and notifications.
Full contact name of the lead.
Contact phone number with international country prefix.
Email address of the prospect.
Origin source tag (e.g. Website Contact Form, Landing Page B).
Custom key-value metadata: {"company": "Acme Corp", "budget": "$10,000"}.
curl -X POST 'https://api.wetroo.com/v1/leads/create' \
-H 'apikey: sk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "David Martinez",
"phone": "919876543210",
"email": "david@example.com",
"city": "Mumbai",
"source": "Website Demo Request",
"remarks": "Interested in 10 CRM user seats",
"custom_fields": {
"company": "Acme Corp",
"team_size": "25"
}
}'
{
"status": "success",
"message": "Lead captured successfully",
"lead_id": 8421,
"assigned_to": "Sales Team"
}
Leads: Outgoing & Fetch Leads
Query, filter, and export leads from your CRM pipeline for external analytics and BI reporting.
Filter by pipeline stage (e.g. New, Contacted, Qualified, Won).
Page number for paginated results.
Number of leads returned per page (maximum: 100).
curl -X GET 'https://api.wetroo.com/v1/leads/list?status=Qualified&page=1&limit=20' \
-H 'apikey: sk_live_YOUR_API_KEY'
{
"status": "success",
"pagination": {
"total": 128,
"page": 1,
"limit": 20,
"total_pages": 7,
"has_next": true,
"has_prev": false
},
"leads": [
{
"id": 8420,
"name": "Elena Rostova",
"phone": "919876543210",
"email": "elena@example.com",
"status": "Qualified",
"source": "Google Ads",
"created_at": "2026-10-04 11:30:00"
}
]
}
Brain AI: Ask Brain (Chat Query)
Submit queries to your company's custom trained Brain AI model. Brain answers queries with contextual accuracy based on your uploaded documents.
The user's question or natural language prompt.
Unique session ID to maintain multi-turn conversational memory.
curl -X POST 'https://api.wetroo.com/v1/brain/chat' \
-H 'apikey: sk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"query": "What is the warranty policy on your enterprise plan?",
"session_id": "sess_8912739"
}'
{
"status": "success",
"response": "Our enterprise packages include a 12-month full warranty with dedicated 24/7 SLA support.",
"confidence": 0.98,
"sources": ["Enterprise_SLA_2026.pdf"]
}
Brain AI: Train Knowledge Base
Programmatically ingest text documents, product catalogs, PDFs, and website URLs into the Brain AI vector store.
Title or category of the training article.
Payload format to index.
The raw text or public URL to crawl and ingest.
curl -X POST 'https://api.wetroo.com/v1/brain/train' \
-H 'apikey: sk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"title": "Refund Policy 2026",
"content_type": "text",
"content": "Customers can request a 100% refund within 14 days of purchase."
}'
{
"status": "success",
"message": "Knowledge indexed successfully into Brain AI.",
"document_id": 412
}
Chatbot: Website Widget Embed
Embed the OmniChat live chat bot onto any website with a single asynchronous script tag.
<script
src="https://api.wetroo.com/v1/omnichat/widget.js"
data-api-key="YOUR_API_KEY"
data-position="bottom-right"
async>
</script>
Your secret API key or public widget token.
Position where the chat launcher bubble appears on screen.
curl -X POST 'https://api.wetroo.com/v1/omnichat/message' \
-H 'apikey: sk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"session_token": "wv_sess_9a8b7c6d",
"visitor_name": "Michael Chen",
"visitor_email": "mchen@example.com",
"message": "Hi, I would like to schedule a product demo."
}'
{
"status": "success",
"lead_created": true,
"lead_id": 8422,
"bot_reply": "Thanks Michael! We received your request. An agent will connect shortly."
}
AI Voice Calling: Trigger Outbound Call
Dispatch an automated, conversational AI outbound phone call via your configured Prodloop AI Voice Agent. Pass dynamic lead variables, configure automated retry policies, and capture real-time conversational responses.
Recipient's phone number with international country prefix (e.g. +919876543210 or 919876543210).
Prodloop AI Agent ID configured in Wetroo AI Calling Setup (e.g. 2042 or agent_quick_qualifier). Defaults to your active default agent.
Provisioned virtual caller ID phone number (e.g. +14155552671 or +911140845600).
Dynamic key-value context injected into the AI agent prompt: {"customer_name": "David Martinez", "lead_source": "Website Demo", "company": "Acme Corp"}.
Automated retry rules if the call is unanswered or busy: {"enabled": true, "retry_delays_seconds": [1800, 3600]}.
curl -X POST 'https://api.wetroo.com/v1/voice/call' \
-H 'apikey: sk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"phone_number": "+919876543210",
"agent_id": "2042",
"variables": {
"customer_name": "David Martinez",
"lead_source": "Website Demo Request",
"company": "Acme Corp"
},
"retry_config": {
"enabled": true,
"retry_delays_seconds": [1800, 3600]
}
}'
{
"status": "success",
"message": "Outbound AI voice call dispatched successfully",
"call_id": "wf_run_982173489",
"agent_id": 2042,
"recipient": "+919876543210",
"call_status": "queued",
"timestamp": "2026-10-06 11:30:00"
}
AI Voice Calling: Call Logs & Transcript
Query conversation logs, call duration, caller sentiment analysis, audio recording MP3 links, and turn-by-turn conversational transcripts for any AI agent execution.
Prodloop AI Agent ID to fetch execution logs for.
Page number for paginated call log records.
Pagination limit per API call (maximum: 50).
Filter by specific call execution run ID (e.g. wf_run_982173489).
curl -X GET 'https://api.wetroo.com/v1/voice/logs?agent_id=2042&page=1&limit=20' \
-H 'apikey: sk_live_YOUR_API_KEY'
{
"status": "success",
"pagination": {
"total": 45,
"page": 1,
"limit": 20,
"total_pages": 3,
"has_next": true,
"has_prev": false
},
"calls": [
{
"call_id": "wf_run_982173489",
"agent_id": 2042,
"agent_name": "Quick Sales Qualifier",
"recipient": "+919876543210",
"status": "completed",
"duration_seconds": 142,
"lead_qualified": true,
"sentiment": "positive",
"recording_url": "https://media.wetroo.com/recordings/rec_982173489.mp3",
"transcript": [
{ "speaker": "agent", "text": "Hi David! Calling from Wetroo CRM regarding your demo request. Is now a good time?" },
{ "speaker": "user", "text": "Yes, I wanted to check if you support automated voice qualification." },
{ "speaker": "agent", "text": "Yes absolutely! Our AI agents qualify leads dynamically and sync with CRM pipelines." }
]
}
]
}
AI Voice Calling: Prodloop Agent Setup & Webhook
Connect your Prodloop AI Voicebot to Wetroo CRM. When a call concludes, Wetroo captures the full conversational transcript, extracts qualification variables, logs the call recording, and auto-converts prospects into pipeline leads.
Event status: call.completed, call.answered, or call.no_answer.
Dynamic key-value variables parsed by the AI agent during the call (e.g. budget, timeline, decision_maker).
Direct URL to the MP3 call recording file for quality assurance and compliance.
{
"event": "call.completed",
"call_id": "wf_run_982173489",
"agent_id": 2042,
"agent_name": "Quick Sales Qualifier",
"recipient": "+919876543210",
"duration_seconds": 142,
"sentiment": "positive",
"lead_qualified": true,
"extracted_data": {
"customer_name": "David Martinez",
"interest_level": "High",
"budget": "$10,000+",
"demo_requested": true
},
"recording_url": "https://media.wetroo.com/recordings/rec_982173489.mp3",
"crm_synced": true,
"lead_id": 8423
}
{
"status": "success",
"message": "Webhook processed successfully"
}