Integrate SMS into your website, mobile application, SaaS platform, or business system using the Textplate REST API. The API allows developers to send OTPs, alerts, appointment reminders, order updates, and other supported business notifications programmatically.
REST API • Bearer authentication • Pre-approved SMS templates • Dynamic variables
Send SMS requests to the following Textplate API endpoint:
POST https://api.textplate.in/v1/send-sms
The endpoint accepts your API token and SMS request parameters. Requests should be sent using the POST method.
Textplate API requests are authenticated using a Bearer API token. Include your API token in the Authorization header of every API request.
Authorization: Bearer YOUR_API_TOKEN
You can obtain your API token from the API keys section of your Textplate account.
To send an SMS, make a POST request to the Textplate send-sms endpoint with your API token and the required SMS parameters.
Textplate uses the template ID to determine the approved message template and the dynamic values supplied with your request.
Endpoint: POST https://api.textplate.in/v1/send-sms
The following parameters can be used when sending an SMS through the Textplate API.
"mobileNumber", "templateId", "otpValue", "expiryValue", "detailValue"
Parameters required for a request depend on the type of approved SMS template being used.
The mobileNumber parameter specifies the recipient mobile number. Use the Indian mobile number format with the +91 country code.
Multiple mobile numbers can be supplied using a comma-separated value.
"mobileNumber": "+919100091000"
"mobileNumber": "+919100091000, +918100081000, +917100071000, +916100061000, ..."
The templateId parameter identifies the Textplate-approved SMS template that should be used for the message.
Select the appropriate template ID from the approved templates available in your Textplate account.
For OTP templates, use otpValue and expiryValue to provide the dynamic OTP and its expiry information.
otpValue accepts a numeric OTP value with a maximum length of 10 digits.
expiryValue accepts the OTP expiry information with a maximum length of 15 characters.
"otpValue": "910910", "expiryValue": "10 minutes"
For non-OTP templates, use detailValue to provide the dynamic information required by the selected template.
The detailValue parameter supports a maximum length of 30 characters.
"detailValue": "ABC Detail"
Choose your preferred programming language below to view an example request for the Textplate SMS API.
var fetch = require("request");
var url = "https://api.textplate.in/v1/send-sms";
var head = {
"Authorization" : "Bearer YOUR_API_TOKEN" // Copy from Textplate API keys
};
var form = {
"mobileNumber" : "YOUR_MOBILE_NUMBER", // +91XXXXXXXXXX, multiple allowed with comma (,)
"templateId" : "YOUR_TEMPLATE_ID", // Select from Textplate approved templates
"otpValue" : "YOUR_OTP_VALUE", // OTP templates only, max 10 digits
"expiryValue" : "YOUR_EXPIRY_VALUE", // OTP templates only, max 15 chars
"detailValue" : "YOUR_DETAIL_VALUE" // Non-OTP templates, max 30 chars
};
var option = {
method : "POST",
url : url,
headers : head,
formData : form
};
fetch(option, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
After submitting an API request, Textplate returns the API response containing the result of the request.
Your application can use the response to determine whether the request was accepted and handle the result within your messaging workflow.
You can integrate the Textplate SMS API into websites, mobile applications, SaaS platforms, CRM systems, booking systems, order management systems, and other business applications.
Once your API token and approved template IDs are available, your application can send SMS programmatically whenever your business workflow requires it.
Textplate provides example requests for Node.js, PHP, Python, Dart, JavaScript, and cURL so developers can integrate the API using the tools and frameworks they already use.
Create your Textplate account, obtain your API access, and start integrating SMS into your application using the Textplate REST API.
Simple integration • Developer-friendly API • Business SMS infrastructure
Contact: 303 R.P. Business Park, Hyderabad, IN - 500008 • Email: support@textplate.in