Create Template

Create WhatsApp Template for SMSGatewayCenter APIs

Introduction to SMSGatewayCenter APIs

Welcome to SMSGatewayCenter’s API documentation hub! This guide introduces the Create WhatsApp Template API, a key feature in our messaging suite, including SMS API for bulk messaging, WhatsApp Business API for customer engagement, Voice Call API for automated alerts, and Two-Way SMS API for interactive communication. This API supports only POST methods over HTTP, enabling you to create and submit new WhatsApp templates for Meta’s review and approval. Perfect for developers in India, build engaging templates with our SMS gateway at unify.smsgatewaycenter.com/signup/!

Use the Create WhatsApp Template API to design and submit custom templates (e.g., for order updates, notifications) to WhatsApp’s Business Platform for Meta’s approval. Once submitted, Meta reviews the template based on their policies, typically approving within 24 hours if it complies with guidelines like avoiding spam, ensuring opt-in consent, and using proper formatting for variables and categories.

 

API Endpoint

https://unify.smsgateway.center/WAApi/template

 

Required Parameters

KeyValueDescription
Login Credentials (Required)
Authenticate your API request using userid-password or apiKey—choose one method.
useridYour Registered UsernameYour registered username; use if apiKey isn’t provided. Signup for User ID
passwordYour PasswordURL-encoded password (for special characters); use if apiKey isn’t provided. Signup for API Key
Header (optional) Parameters
apiKeyYour unique apiKeyapiKey needs to be sent as HTTP header when you are not using userid-password method. You can avail this from your user control panel and use instead of userid-password HTTP Request parameter. Please do not disclose this to anyone.
Required Parameters
wabaNumberWABA NumberApproved registered WhatsApp Number
msgTypetext|mediaThe type of message (e.g., text for plain text messages).
categoryUTILITY|MARKETING|AUTHENTICATIONAdd relevant category.
bodystringAdd your content with variables.
templateNamestringName your template. It has to be unique.
languageenEnter language code. (e.g., en for English)
Optional Parameters
headerstringAdd a header content maximum 60 characters. You can add one variable.
headerSamplestringIf you have added variable then sample to be provided in this parameter.
bodySamplestringIf you have added variable then replace variable with sample content.
footerstringAdd a footer content maximum 60 characters. You cannot add any variable.
templateDescriptionstringAdd a template description to remember by.
buttonsJSONButtons Payload in JSON. (e.g., Quick Reply Payload: [ { "text": "RESOLVED", "type": "QUICK_REPLY" }, { "text": "NO", "type": "QUICK_REPLY" }, { "text": "YES", "type": "QUICK_REPLY" } ] CTA Payload: [ { "phone_number": "+1(650) 555-1111", "text": "your-phone-button-text", "type": "PHONE_NUMBER" }, { "text": "your-url-button-text", "type": "URL", "url": "https://www.website.com" } ])
Media Message Parameters (msgType=media)
mediaTypeimage|video|documentType of media which you are sending in the message.
outputplain|json|plainValue for response format.System default is plain. If you need responses in json or plain then you have to give value as json or plain.

 

Sample Request Code
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://unify.smsgateway.center/WAApi/template',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('userid' => 'YourUsername','password' => '********','wabaNumber' => '9170396xxxxx','output' => 'json','msgType' => 'text','header' => 'This is {{1}} header','body' => 'Your account {{1}} is having {{2}} on {{3}}','footer' => 'By XYZ Brand','headerSample' => 'This is New header','bodySample' => 'Your account {{1}} is having {{2}} on Done','templateName' => 'Test1','templateDescription' => 'Testing','language' => 'en','category' => 'UTILITY'),
  CURLOPT_HTTPHEADER => array(
    'Cookie: SERVERID=webC1'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

 

Sample Response Code
{
    "status": "success",
    "templateName": "test1",
    "statusCode": "200",
    "reason": "Accepted for processing."
}
Unlock Real-Time Messaging – Integrate Today!

Unlock Real-Time Messaging – Integrate Today!

Try Our API in a Sandbox Environment Before Going Live!

Join Thousands of Developers – Try Our API Now!

Get in touchSign up

Testimonials

Why do Great Businesses Trust SMS Gateway Center?

K

Kurlon IT

2022-08-04

We have tied up with other SMS providers also, but SMS GatewayCenter is quite good. Good Service from the team. We are very happy with the service be it accounts related or technical issue. We always get good response.

I

INOX Air Products

2018-02-09

We have an excellent experience with SMS Gateway Center. The services and support has been of very high standard.

R

Rohit Singh Rawat

2017-06-05

It is the best SMS gateway to send bulk messages. It's the best and easiest way to reach out to your goals... Planning is everything to attain goal and adding SMS Gateway Center in that plan will definitely help in accomplishing goals... Thanks to the developers...

A

Anil Singh

2018-02-09

We have an excellent experience with SMS Gateway Center. The services and support has been of very high standard.