Logowa-api.me

WA-API Reference

API Documentation

Full examples for MCP integration, sending WhatsApp messages (text/template/media/document), and OTP delivery.

Authentication

Every API request needs Bearer token in headers.

Authorization: Bearer YOUR_API_TOKEN

MCP Server

Add this in your MCP client config to connect WA API MCP server.

{
  "mcpServers": {
    "WA API MCP SERVER": {
      "url": "https://wa-api.me/api/ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Endpoint: POST https://wa-api.me/api/ai/mcp

curl -X POST "https://wa-api.me/api/ai/mcp" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Send Message API

Use this endpoint for text, template, media, and document messages.

POST https://wa-api.me/api/wa-accounts/messages

Text Example

curl -X POST "https://wa-api.me/api/wa-accounts/messages" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [{ "number": "919876543210" }],
    "messageType": "text",
    "message": "Hello from WA-API"
  }'

Template Example

curl -X POST "https://wa-api.me/api/wa-accounts/messages" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [{ "number": "919876543210" }],
    "messageType": "template",
    "template": {
      "name": "auth_otp",
      "language": { "code": "en" },
      "components": [
        {
          "type": "body",
          "parameters": [{ "type": "text", "text": "482901" }]
        }
      ]
    }
  }'

Media Example (Image/Video/Audio)

curl -X POST "https://wa-api.me/api/wa-accounts/messages" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [{ "number": "919876543210" }],
    "messageType": "media",
    "media": {
      "mediaType": "IMAGE",
      "link": "https://example.com/product.jpg",
      "caption": "Latest offer"
    }
  }'

Document Example

curl -X POST "https://wa-api.me/api/wa-accounts/messages" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [{ "number": "919876543210" }],
    "messageType": "media",
    "media": {
      "mediaType": "DOCUMENT",
      "link": "https://example.com/invoice.pdf",
      "filename": "invoice.pdf",
      "caption": "Your invoice"
    }
  }'

Send OTP API

Send OTP using default auth_otp template or pass custom template name/language.

POST https://wa-api.me/api/wa-accounts/messages/send-otp
curl -X POST "https://wa-api.me/api/wa-accounts/messages/send-otp" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "919876543210",
    "code": "482901",
    "templateName": "auth_otp",
    "language": "en"
  }'
Need API token? Open API Token Management.
WhatsAppChat with support