Wetroo Logo Wetroo. v1.0 API Reference

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.

Need developer API keys?
Create multiple keys with customizable expiration in your portal.
Open API Key Manager

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.
API Base URL
https://api.wetroo.com/v1
Standard Success Response
JSON FORMAT 200 OK
{
  "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.

Required Headers
apikey
required
string

Your secret API key created in your API Keys Dashboard (e.g. sk_live_...).

Authorization
alternative
string

Standard Bearer token header: Bearer <YOUR_SECRET_KEY>.

Content-Type
required
string

Must be set to application/json for all POST requests.

Security Recommendation: Always keep your API keys secret. Never commit them to version control or expose them in client-side applications.
Authentication Example
curl -X GET https://api.wetroo.com/v1/leads/list \
  -H "apikey: sk_live_9a8b7c6d5e4f3a2b1c..." \
  -H "Content-Type: application/json"
Unauthorized Response
ERROR RESPONSE 401 UNAUTHORIZED
{
  "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).

POST https://api.wetroo.com/v1/whatsapp/template
Body Parameters
template_id
required
string | integer

The approved Meta template ID or name configured in your Wetroo WABA panel.

number
required
string

Recipient's phone number with international country code (e.g. 919876543210).

variable
optional
array

Ordered array of values for template placeholders: ["John", "INV-2026"].

attachment
optional
string (url)

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"
  }'
RESPONSE 200 OK
{
  "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.

POST https://api.wetroo.com/v1/whatsapp/send
Body Parameters
number
required
string

Recipient's phone number with country code (e.g. 919876543210).

message
required
string

Message body text. Supports WhatsApp markdown formatting like *bold*, _italics_.

media_url
optional
string (url)

Direct URL to an attachment to dispatch along with the message.

Dispatch Session 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?"
  }'
RESPONSE 200 OK
{
  "status": "success",
  "message_id": "wamid.HBgMOTE5ODc2NTQ..."
}

WhatsApp: Chat History & Access

Retrieve live conversation transcripts, exchanged attachments, and delivery receipts for any customer.

GET https://api.wetroo.com/v1/whatsapp/chats?phone=919876543210&page=1&limit=20
Query Parameters
phone
required
string

Recipient's WhatsApp number with international country prefix.

page
optional (default: 1)
integer

Page number for paginated message history navigation.

limit
optional (default: 20)
integer

Number of message items per page (maximum: 100).

Fetch Chat History
curl -X GET 'https://api.wetroo.com/v1/whatsapp/chats?phone=919876543210&page=1&limit=20' \
  -H 'apikey: sk_live_YOUR_API_KEY'
RESPONSE 200 OK
{
  "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.

POST https://api.wetroo.com/v1/leads/create
Payload Parameters
name
required
string

Full contact name of the lead.

phone
required
string

Contact phone number with international country prefix.

email
optional
string

Email address of the prospect.

source
optional
string

Origin source tag (e.g. Website Contact Form, Landing Page B).

custom_fields
optional
object

Custom key-value metadata: {"company": "Acme Corp", "budget": "$10,000"}.

Ingest Lead Payload
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"
    }
  }'
RESPONSE 200 OK
{
  "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.

GET https://api.wetroo.com/v1/leads/list?status=Qualified&page=1&limit=20
Filter Parameters
status
optional
string

Filter by pipeline stage (e.g. New, Contacted, Qualified, Won).

page
optional (default: 1)
integer

Page number for paginated results.

limit
optional (default: 20)
integer

Number of leads returned per page (maximum: 100).

Query Leads
curl -X GET 'https://api.wetroo.com/v1/leads/list?status=Qualified&page=1&limit=20' \
  -H 'apikey: sk_live_YOUR_API_KEY'
RESPONSE 200 OK
{
  "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.

POST https://api.wetroo.com/v1/brain/chat
Request Parameters
query
required
string

The user's question or natural language prompt.

session_id
optional
string

Unique session ID to maintain multi-turn conversational memory.

Ask Brain AI Query
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"
  }'
RESPONSE 200 OK
{
  "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.

POST https://api.wetroo.com/v1/brain/train
Body Parameters
title
required
string

Title or category of the training article.

content_type
required
enum ('text', 'pdf_url', 'web_url')

Payload format to index.

content
required
string

The raw text or public URL to crawl and ingest.

Train Ingestion Payload
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."
  }'
RESPONSE 200 OK
{
  "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.

HTML EMBED CODE:
<script 
  src="https://api.wetroo.com/v1/omnichat/widget.js" 
  data-api-key="YOUR_API_KEY" 
  data-position="bottom-right" 
  async>
</script>
Widget Attributes
data-api-key
required
string

Your secret API key or public widget token.

data-position
optional
string ('bottom-right' | 'bottom-left')

Position where the chat launcher bubble appears on screen.

Headless Visitor API
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."
  }'
RESPONSE 200 OK
{
  "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.

POST https://api.wetroo.com/v1/voice/call
Body Parameters
phone_number
required
string

Recipient's phone number with international country prefix (e.g. +919876543210 or 919876543210).

agent_id
optional
string | integer

Prodloop AI Agent ID configured in Wetroo AI Calling Setup (e.g. 2042 or agent_quick_qualifier). Defaults to your active default agent.

from_number
optional
string

Provisioned virtual caller ID phone number (e.g. +14155552671 or +911140845600).

variables
optional
object

Dynamic key-value context injected into the AI agent prompt: {"customer_name": "David Martinez", "lead_source": "Website Demo", "company": "Acme Corp"}.

retry_config
optional
object

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]
    }
  }'
RESPONSE 200 OK
{
  "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.

GET https://api.wetroo.com/v1/voice/logs?agent_id=2042&page=1&limit=20
Query Parameters
agent_id
required
string | integer

Prodloop AI Agent ID to fetch execution logs for.

page
optional (default: 1)
integer

Page number for paginated call log records.

limit
optional (default: 20)
integer

Pagination limit per API call (maximum: 50).

call_id
optional
string

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'
RESPONSE 200 OK
{
  "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.

POST https://api.wetroo.com/v1/voice/webhook
Webhook Event Properties
event
event type
string

Event status: call.completed, call.answered, or call.no_answer.

extracted_data
structured
object

Dynamic key-value variables parsed by the AI agent during the call (e.g. budget, timeline, decision_maker).

recording_url
audio
string (url)

Direct URL to the MP3 call recording file for quality assurance and compliance.

Webhook Payload Event
{
  "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
}
WEBHOOK ACK RESPONSE 200 OK
{
  "status": "success",
  "message": "Webhook processed successfully"
}