Send WhatsApp Template Messages Using API
Introduction
Sending WhatsApp template messages using API allows you to automate communication and reach customers instantly with approved messages. This is especially useful for sending transactional updates, notifications, and alerts directly from your system.
In this article, you’ll learn how to use the API to send WhatsApp template messages, including selecting templates, configuring request details, and ensuring successful message delivery.
Note: Ensure that the WhatsApp template has already been created. To learn how to create a WhatsApp template,
click here.
Here are the steps to send WhatsApp template messages using API:
Note: Ensure that you have generated the server side api key. To learn how to generate,
click here.
Step 2: Now, you get the various options to send WhatsApp messages through API.

Select a Template: Choose the template you want to send from the dropdown. It shows the template name, category (e.g., marketing), and language. Make sure the selected template is active and approved.
Endpoint: API request method: POST. This is the URL you will use in your system to send the message.
Headers: These are required for every API request:
-
Content-Type:
application/json → Defines the request format
-
Authorization:
pk_... → Your unique API key for authentication
-
Without correct headers, the request will fail.
Request Body (JSON Payload): This contains the message details you want to send.
Now, this setup enables you to send WhatsApp template messages directly from your system using AiTrillion’s API.
Api Logs
This section displays the history of WhatsApp template messages sent via API. It helps you track message status, delivery, and errors for troubleshooting and monitoring.
The available filters or logs are:
Filters
-
Status Filter (All statuses): Filter logs based on message status (e.g., sent, delivered, read).
-
Date Range (Start date – End date): View logs within a specific time period.
-
Refresh: Reload the latest log data.
Date: Shows when the message was triggered via API.
Template: Displays the template name used for the message. Also shows the category and type (e.g., marketing · image).
Recipient: The phone number of the customer who received the message.
Status: Indicates the message delivery stage:
-
Sent: Message has been sent from the system
-
Delivered: Message successfully delivered to the user
-
Read: User has opened/read the message
Error: Displays any issue if the message fails. A “-” means no error occurred.
Related Articles
Send Automated WhatsApp Messages Using Workflows
Introduction Automated WhatsApp messages help businesses engage with customers at the right moment without manual effort. By using workflows, you can automatically send WhatsApp messages based on specific customer actions or events, such as signing ...
Request for WhatsApp Business API for Workflows and Campaigns
Introduction WhatsApp has become one of the most effective channels for engaging with customers in real time. By enabling the WhatsApp Business API, you can automate messages, send campaign broadcasts, and build personalized communication workflows ...
Manage WhatsApp Conversations with Team Inbox
Introduction The Team Inbox (WhatsApp) enables you to efficiently manage all customer conversations from a single, centralized dashboard. It allows your team to view, organize, assign, and respond to WhatsApp messages in real time, ensuring no ...
Edit Saved WhatsApp Template
Introduction Editing a saved WhatsApp template allows you to update message content, refine wording, or adjust variables to better suit your communication needs. This helps ensure your templates stay relevant, accurate, and aligned with your current ...
Send WhatsApp Messages Only to Customers Who Have Opted In
Introduction Sending messages only to customers who have explicitly opted in is essential for maintaining trust and complying with messaging regulations. The Send WhatsApp Messages Only to Customers Who Have Opted In setting ensures that WhatsApp ...