WhatsApp Business API Documentation
Connect your application to WhatsApp using Leniia's enterprise-ready WhatsApp Business API.
Getting Started
Leniia's WhatsApp Business API provides two simple methods for developers: REST endpoints and SDK integration. Before you begin, you must:
- Have a registered WhatsApp Business API account
- Generate an API key in your Leniia dashboard
- Ensure your app complies with WhatsApp policy requirements
Authentication
Authentication Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Replace YOUR_API_KEY
with your Leniia-provided API token.
Endpoints
Send Message
Send text messages to WhatsApp contacts
POST /whatsapp/v1/messages
Request Body
{ "to": "+1234567890", "text": "Hi there! This is a test message." }
Message Status
Check delivery status of sent messages
GET /whatsapp/v1/message/status?message_id=123456
Response Example
{ "message_id": "123456", "status": "delivered", "timestamp": "2025-09-22T10:34:22Z" }
Code Examples
Python Example
import requests
URL = 'https://api.leniia.com/whatsapp/v1/messages'
HEADERS = {
'Authorization': 'Bearer your_api_token',
'Content-Type': 'application/json'
}
DATA = {
'to': '+12345678901',
'text': 'Test message'
}
response = requests.post(URL, json=DATA, headers=HEADERS)
print(response.json())
Security & Compliance
Encryption
All requests use TLS 1.3 encryption with 256-bit AES for data in transit.
Rate Limiting
Free tier: 10,000 messages/month. Enterprise tiers available with higher limits.