WhatsApp API
Build reliable WhatsApp messaging into your product, website, CRM, payment system, or internal workflows.
Use the SMSLeopard WhatsApp API to send approved WhatsApp templates for OTPs, appointments, order updates, payment communication, customer feedback, and other high-value customer journeys.
What You Can Build
WhatsApp works best when it is connected to real customer events. The API helps you trigger useful, personalized messages from the systems your business already uses.
| Use case | Example trigger | What the customer receives |
|---|---|---|
| OTPs and verification | User creates an account, logs in, or confirms an action | A secure verification code delivered on WhatsApp |
| Appointment reminders | Booking is created, rescheduled, or due soon | Appointment date, time, location, and buttons to confirm or reschedule |
| Order confirmations | Customer places an order or delivery status changes | Order summary, delivery update, tracking link, or support option |
| Payment reminders | Invoice, loan, subscription, or balance is due | Amount due, due date, pay link, and support contact |
| Payment confirmations | Payment is received in your payment system | Receipt, account update, next step, or document link |
| Customer feedback | Purchase, service visit, delivery, or support case is completed | Feedback request with a survey link, rating action, or reply prompt |
Template Experiences Customers Recognize
WhatsApp templates can include personalized text, media headers, and buttons that make the message easier to act on.
| Template pattern | Best for | Example buttons |
|---|---|---|
| Authentication template | OTPs, login verification, account recovery | Copy code |
| Appointment template | Clinics, salons, schools, service teams, field visits | Confirm, Reschedule, Get directions |
| Order update template | Retail, delivery, ecommerce, asset financing | Track order, Contact support |
| Payment template | Loans, invoices, subscriptions, school fees, renewals | Pay now, Talk to support |
| Feedback template | NPS, customer satisfaction, service follow-up | Rate experience, Give feedback |
WhatsApp business-initiated messages must use Meta-approved templates. Once approved, you can fill template variables dynamically from your customer data or business systems.
API Capability Map
The WhatsApp API gives your application the building blocks needed to send production WhatsApp messages.
- Authenticate securely with your SMSLeopard API Key and Secret.
- Fetch WhatsApp phone numbers connected to your business account.
- Retrieve approved templates for each WhatsApp Business phone number.
- Personalize template variables such as customer name, amount, appointment date, order number, or branch.
- Send media templates with image, video, or document headers where your template supports them.
- Use interactive buttons such as website links, phone calls, quick replies, or copy-code actions.
- Trigger messages automatically from events in your CRM, payment platform, ecommerce system, mobile app, or backend.
- Track message responses so your team can monitor delivery, troubleshoot issues, and improve customer journeys.
Base URL
https://whatsapp.smsleopard.comGetting Started
You need three things before sending your first WhatsApp message:
- API Credentials - Generate your API Key and Secret
- Connected WhatsApp Business Account - Link your account in the SMSLeopard dashboard (opens in a new tab)
- Approved Templates - Create and get templates approved in the dashboard before sending
Recommended First Integration
Start with one customer journey that already matters to your business.
- Choose a trigger such as account verification, appointment booking, payment confirmation, or order update.
- Create a WhatsApp template with the variables and buttons your customer needs.
- Fetch your WhatsApp phone number and approved template IDs.
- Map your customer data into the template variables.
- Call
POST /v1/whatsapp/sendfrom your application when the event happens. - Save the response ID and status in your system for support, reporting, and follow-up.
Key Features
- Template-based WhatsApp messaging for business-initiated communication
- Authentication templates for OTPs and verification codes
- Dynamic variables for personalization
- Media headers for image, video, and document templates
- Button support for actions such as pay now, visit website, call, confirm, or reschedule
- Delivery visibility for operational follow-up
- Sandbox mode for testing without sending real messages
Quick Reference
| Step | Endpoint | Description |
|---|---|---|
| 1 | GET /v1/phone_number_ids | Fetch your WhatsApp Business phone numbers |
| 2 | GET /v1/phone_number_ids/{id}/templates | Retrieve approved templates for a phone number |
| 3 | POST /v1/whatsapp/send | Send a template message |
Where To Go Next
If you already know your use case, jump straight to the implementation guide that matches your next step.
| Goal | Read this |
|---|---|
| Get your API credentials working | Authentication |
| Confirm which WhatsApp number to send from | Phone Numbers |
| List your approved WhatsApp templates | Templates |
| Upload media for image, video, or document templates | Media Uploads |
| Send your first production-style template message | Sending Messages |
| Review complete code examples | Examples |