WhatsApp API
Overview

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 caseExample triggerWhat the customer receives
OTPs and verificationUser creates an account, logs in, or confirms an actionA secure verification code delivered on WhatsApp
Appointment remindersBooking is created, rescheduled, or due soonAppointment date, time, location, and buttons to confirm or reschedule
Order confirmationsCustomer places an order or delivery status changesOrder summary, delivery update, tracking link, or support option
Payment remindersInvoice, loan, subscription, or balance is dueAmount due, due date, pay link, and support contact
Payment confirmationsPayment is received in your payment systemReceipt, account update, next step, or document link
Customer feedbackPurchase, service visit, delivery, or support case is completedFeedback 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 patternBest forExample buttons
Authentication templateOTPs, login verification, account recoveryCopy code
Appointment templateClinics, salons, schools, service teams, field visitsConfirm, Reschedule, Get directions
Order update templateRetail, delivery, ecommerce, asset financingTrack order, Contact support
Payment templateLoans, invoices, subscriptions, school fees, renewalsPay now, Talk to support
Feedback templateNPS, customer satisfaction, service follow-upRate 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.com

Getting Started

You need three things before sending your first WhatsApp message:

  1. API Credentials - Generate your API Key and Secret
  2. Connected WhatsApp Business Account - Link your account in the SMSLeopard dashboard (opens in a new tab)
  3. 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.

  1. Choose a trigger such as account verification, appointment booking, payment confirmation, or order update.
  2. Create a WhatsApp template with the variables and buttons your customer needs.
  3. Fetch your WhatsApp phone number and approved template IDs.
  4. Map your customer data into the template variables.
  5. Call POST /v1/whatsapp/send from your application when the event happens.
  6. 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

StepEndpointDescription
1GET /v1/phone_number_idsFetch your WhatsApp Business phone numbers
2GET /v1/phone_number_ids/{id}/templatesRetrieve approved templates for a phone number
3POST /v1/whatsapp/sendSend 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.

GoalRead this
Get your API credentials workingAuthentication
Confirm which WhatsApp number to send fromPhone Numbers
List your approved WhatsApp templatesTemplates
Upload media for image, video, or document templatesMedia Uploads
Send your first production-style template messageSending Messages
Review complete code examplesExamples