Back to Docs

WhatsApp API

Business messaging with templates, media, and OTP

180+ Countries

Global WhatsApp delivery

Rich Media

Images, videos, docs

End-to-End

Encrypted messaging

Business API

Verified accounts

Dual-Key Authentication

All WhatsApp API requests require both keys:

API KeyPermanent
X-Smsly-Key-Id: sk_live_xxx
SDK KeyRotatable
X-SMSLY-SDK-KEY: sdk_live_xxx

Quick Start

Choose your language. Languages without SDK use raw HTTP.

Python
from smsly import SMSly

# === DUAL KEY SECURITY ===
client = SMSly(
    api_key="sk_live_xxx",
    sdk_key="sdk_live_xxx"
)

# Send WhatsApp OTP
response = client.whatsapp.otp("+1234567890", "123456")
print(f"Message ID: {response.message_id}")

# Send template message
client.whatsapp.template(
    "+1234567890",
    template="order_confirmation",
    params={"order_id": "12345", "status": "shipped"}
)

# Send media message
client.whatsapp.media(
    "+1234567890",
    media_url="https://example.com/image.jpg",
    caption="Check this out!"
)

API Endpoints

POST/v1/whatsapp/otpSend OTP via WhatsApp
POST/v1/whatsapp/templateSend template message
POST/v1/whatsapp/textSend text message
POST/v1/whatsapp/mediaSend media message
POST/v1/whatsapp/locationSend location
GET/v1/whatsapp/:idGet message status

Ready to send WhatsApp messages?