Send SMS Batch

Send SMS Batch for SMSGatewayCenter APIs

Introduction to SMSGatewayCenter APIs

Welcome to SMSGatewayCenter’s API documentation hub! This guide helps you send SMS in batches using our powerful Send SMS Batch API, part of 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. Our API supports POST and GET methods over HTTP, offering scalability for bulk SMS, single messages, or comma-separated numbers. Ideal for developers in India, start integrating with our SMS gateway at unify.smsgateway.center/signup/!

Send SMS in batches to efficiently manage single SMS or lists of comma-separated mobile numbers. Include country codes for international messaging to ensure global reach. This endpoint enhances your bulk SMS campaigns with real-time delivery reports and Unicode support.

 

API Endpoint

https://unify.smsgateway.center/SMSApi/send

 

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
sendMethodquickMethod needs to be defined as quick to send SMS in batches.
mobile919999999999Mobile with country code.
msgHello WorldYour message content.
senderidSENDERYour registered and approved sender name,
msgTypeunicode|textunicode for regional and text for English message content.
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.
Optional Parameters
duplicatechecktrue|falseEnable to remove duplicate mobile numbers. Default is true.
scheduleTimeSchedule TimeDate format YYYY-MM-DD HH:MM:SS
trackLinktrue|falseEnable true to track links from your SMS content.
smartLinkTitleTitle for the link trackingA brief title to recognise your smart link campaign.
testMessagetrue|falseEnable true to test your message and messages wont be delivered when enabled true.

 

Sample Request Code
<?php
	$curl = curl_init();
	curl_setopt_array($curl, array(
		CURLOPT_URL => "https://unify.smsgateway.center/SMSApi/send",
		CURLOPT_RETURNTRANSFER => true,
		CURLOPT_ENCODING => "",
		CURLOPT_MAXREDIRS => 10,
		CURLOPT_TIMEOUT => 30,
		CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
		CURLOPT_CUSTOMREQUEST => "POST",
		CURLOPT_POSTFIELDS => "userid=YourUsername&password=YourPassword&&sendMethod=quick&mobile=919xxxxxxxxx&msg=Hello+World&senderid=SENDER&msgType=text&duplicatecheck=true&output=json",
		CURLOPT_HTTPHEADER => array(
			"apikey: XXXXXXXXXXXXXXXXXXXX",
			"cache-control: no-cache",
			"content-type: application/x-www-form-urlencoded"
		),
	));

	$response = curl_exec($curl);
	$err = curl_error($curl);

	curl_close($curl);

	if ($err) {
		echo "cURL Error #:" . $err;
	} else {
		echo $response;
	}
curl --location 'https://unify.smsgateway.center/SMSApi/send' \
--header 'Content-Type: application/json' \
--header 'Cookie: SERVERID=webC2' \
--data '{
    "userid": "YourUsername",
    "password": "********",
    "senderid": "SENDER",
    "msgType": "text",
    "dltEntityId": "xxxxxxxxxxxxx",
    "dltTemplateId": "xxxxxxxxxxxxx",
    "duplicatecheck": "true",
    "sendMethod": "quick",
    "sms": [
        {
            "mobile": [
                "919xxxxxxxx1"
            ],
            "msg": "hello world again"
        },
        {
            "mobile": [
                "919xxxxxxxx2"
            ],
            "msg": "Final last msg"
        }
    ]
}'
curl --location 'https://unify.smsgateway.center/SMSApi/send' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Cookie: SERVERID=webC2' \
--data '<data>
    <userid>YourUsername</userid>
    <password>********</password>
    <senderid>SENDER</senderid>
    <msgType>text</msgType>
    <dltEntityId>xxxxxxxxxxxxx</dltEntityId>
    <dltTemplateId>xxxxxxxxxxxxx</dltTemplateId>
    <duplicatecheck>true</duplicatecheck>
    <sendMethod>quick</sendMethod>
    <sms>
        <mobile>919xxxxxxxx1</mobile>
        <msg>hello world again</msg>
    </sms>
    <sms>
        <mobile>919xxxxxxxx2</mobile>
        <msg>hello world again</msg>
    </sms>
</data>'
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Date;
public class SMSGatewayCenterAPI{
    public static void main(String[] args){
        try{
            Date mydate = new Date(System.currentTimeMillis());
            String data = "";
            data += "sendMethod=quick";
            data += "&userid=YourUsername";
            data += "&password=" + URLEncoder.encode("********", "UTF-8");
            data += "&msg=" + URLEncoder.encode("SMS Gateway message " + mydate.toString(), "UTF - 8 ");
            data += "&mobile=" + URLEncoder.encode("919xxxxxxxxx", "UTF-8");
            data += "&msgType=text";
            data += "&senderid=SENDER";
            data += "&duplicatecheck=true";
            data += "&dltEntityId=xxxxxxxxxxxx";
            data += "&dltTemplateId=xxxxxxxxxxxx";
            data += "&output=json";
            URL url = new URL("https://unify.smsgateway.center/SMSApi/send?" + data);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");
            conn.setDoOutput(true);
            conn.setDoInput(true);
            conn.setUseCaches(false); conn.connect();
            BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String line;
            StringBuffer buffer = new StringBuffer();
            while((line = rd.readLine()) != null){
                buffer.append(line).append("\n");
            }
            System.out.println(buffer.toString());
            rd.close();
            conn.disconnect();
        }
        catch (Exception e){
            e.printStackTrace();
        }
    }
}
import http.client

conn = http.client.HTTPSConnection("unify.smsgateway.center")

payload = "userid=YourUsername&password=********&senderid=SENDER&sendMethod=quick&msgType=text&mobile=919xxxxxxxxx9&msg=This%20is%20my%20first%20message%20with%20SMSGateway.Center&duplicateCheck=true&output=json&scheduleTime=2017-06-13%2020%3A22%3A00"

headers = {
    'apikey': "somerandomuniquekey",
    'content-type': "application/x-www-form-urlencoded",
    'cache-control': "no-cache"
    }

conn.request("POST", "/SMSApi/send", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text.RegularExpressions
Imports System.Web
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Resources

Namespace Rextester
    Public Module Program
        Public Sub Main(args() As string)
            Dim userid = "YourUsername"
            Dim password = "YourPassword"
            Dim sendMethod = "quick"
            Dim msgType = "text"
            Dim msg = "Hello World"
            Dim mobile = "919xxxxxxxxx"
            Dim senderid = "SENDER"
            Dim url As String = "https://unify.smsgateway.center/SMSApi/send?"
            Dim strGet As String

            strGet = url + "userid=" + userid _
            + "&password=" + password _
            + "&sendMethod=" + sendMethod _
            + "&msgType=" + msgType _
            + "&mobile=" + mobile _
            + "&msg=" + WebUtility.UrlEncode(msg) _
            + "&senderid=" + senderid

            Dim webClient As New System.Net.WebClient
            Dim result As String = webClient.DownloadString(strGet)
            Console.WriteLine(result)

        End Sub
    End Module
End Namespace
<%
	username = "YourUsername"
	password = "********"
	apiurl = "https://unify.smsgateway.center/SMSApi/send?"
	message = "Hello World"
	message = Server.urlencode(message)
	mobile = "919xxxxxxxxx"
	'10 digit number
	sendername = "SENDER"
	'My SMS Sender Name
	msgType = "text" 
	'text|unicode
	url = apiurl & "userid=" & username & "&password=" & password & "&mobile=" & mobile & "&msg=" & message & "&senderid=" & sendername &"&sendMethod=quick&msgType=" & msgType
	set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
	xmlhttp.open "POST", url, false
	'use GET for get method
	xmlhttp.send ""
	msg = xmlhttp.responseText
	response.write(msg)
	set xmlhttp = nothing
%>
curl -X POST \
  https://unify.smsgateway.center/SMSApi/send \
  -H 'apikey: secretkey' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'userid=user&password=userpass&senderid=SENDER&sendMethod=quick&msgType=text&mobile=919xxxxxxxxx9&msg=This%20is%20my%20first%20message%20with%20SMSGateway.Center&duplicateCheck=true&output=json&scheduletime=2017-06-13%2020%3A22%3A00'
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use HTTP::Request::Common;
 
my $username = '';
my $password = '********';
my $sendername = "SENDER";
my $mobile = "919xxxxxxxxx";
my $message = "Hello World!";
my $type = "quick";
my $msgtype = "text";
my $output = "json";
my $sendsms = LWP::UserAgent->new();
 
my $result = $sendsms->request
(
POST 'https://unify.smsgateway.center/SMSApi/send?',
Content_Type  => 'application/x-www-form-urlencoded',
Content       => [
	'userid'    => $username,
	'password'    => $password,
	'mobile'        => $mobile,
	'sendMethod'        => $type,
	'senderid'        => $sendername,
	'msgType'    => $msgtype,
	'output'    => $output,
	'msg'    => $message
]
);
 
if ($result->is_error){        
	die "HTTP Error\n";
}
print "Response:\n\n" . $result->content . "\n\n";
require 'uri'
require 'net/http'

url = URI("https://unify.smsgateway.center/SMSApi/send")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/x-www-form-urlencoded'
request["cache-control"] = 'no-cache'
request.body = "userid=YourUsername&password=********&senderid=SENDER&sendMethod=quick&msgType=text&mobile=919xxxxxxxxx%2C%20919999999998&msg=This%20is%20my%20first%20message%20with%20SMSGateway.Center&duplicateCheck=true&output=json"

response = http.request(request)
puts response.read_body
import Foundation

let headers = ["cache-control": "no-cache"]

let request = NSMutableURLRequest(url: NSURL(string: "https://unify.smsgateway.center/SMSApi/send?userid=YourUsername&password=********&senderid=SENDER&sendMethod=quick&msgType=text&mobile=919xxxxxxxxx9%2C919xxxxxxxxx8&msg=This%20is%20my%20first%20message%20with%20SMSGateway.Center&duplicateCheck=true&output=json")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
var qs = require("querystring");
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "unify.smsgateway.center",
  "port": null,
  "path": "/SMSApi/send",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({ userid: 'YourUsername',
  password: '********',
  senderid: 'SENDER',
  sendMethod: 'quick',
  msgType: 'text',
  mobile: '919xxxxxxxxx, 919999999998',
  msg: 'This is my first message with SMSGateway.Center',
  duplicateCheck: 'true',
  output: 'json' }));
req.end();
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://unify.smsgateway.center/SMSApi/send?userIi=YourUsername&password=********&senderid=SENDER&sendMethod=quick&msgType=text&mobile=919xxxxxxxxx9%2C919xxxxxxxxx8&msg=This%20is%20my%20first%20message%20with%20SMSGateway.Center&duplicateCheck=true&output=json");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
//Save the following code in a .gs file
//Registered Username
var myusername = 'YourUsernmae';
//Your password
var mypassword = '********';
//SMS Sending Method.
var smsmethod = 'quick';
//Approved and whitelisted Sender ID
var sendername = 'SENDER';
//Define message type
var msgtype = 'text';
//SMS content
var textmessage = 'Hello World';
var mobile = '919xxxxxxxxx';
var output = 'json';
var duplicateCheck = 'true';
//Prepare your POST parameters
var payload = {
    'userid': myusername,
    'password': mypassword,
    'sendMethod': smsmethod,
    'msgType': msgtype,
    'senderid': sendername,
    'msg': textmessage,
	'duplicateCheck': duplicateCheck,
	'output': output
};
var options = {
    "method": "post",
    "payload": payload
};
var result = UrlFetchApp.fetch("https://unify.smsgateway.center/SMSApi/send?", options);
var response = '' + result + '';
Logger.log(response)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://unify.smsgateway.center/SMSApi/send"

	payload := strings.NewReader("userid=YourUsername&password=********&senderid=SENDER&sendMethod=quick&msgType=text&mobile=919xxxxxxxxx%2C%20919999999998&msg=This%20is%20my%20first%20message%20with%20SMSGateway.Center&duplicateCheck=true&output=json")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/x-www-form-urlencoded")
	req.Header.Add("cache-control", "no-cache")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
//Your Login Credentials
String username = "YourUserName";
String password = "********";

//Single or Multiple mobiles numbers separated by comma
String to = "919xxxxxxxxx";

//method
String smsmethod = "quick";

//Message type 
String msgtype = "text";

//Your approved sender name
String sendername = "SENDER";

//Your message to send, Add URL encoding here.
String textmessage = "Hello World";


URLConnection myURLConnection=null;
URL myURL=null;
BufferedReader reader=null;

//encode the message content
String encoded_message=URLEncoder.encode(textmessage);

//Send SMS API
String apiUrl="https://unify.smsgateway.center/SMSApi/send?";

StringBuilder sgcPostContent= new StringBuilder(apiUrl);
sgcPostContent.append("userid="+username);
sgcPostContent.append("password="+password);
sgcPostContent.append("sendMethod="+smsmethod);
sgcPostContent.append("msgType="+msgtype);
sgcPostContent.append("senderid="+sendername);
sgcPostContent.append("&mobile="+to);
sgcPostContent.append("&msg="+encoded_message);
sgcPostContent.append("&duplicateCheck=true");
sgcPostContent.append("&output=json");

apiUrl = sgcPostContent.toString();
try
{
    //prepare connection
    myURL = new URL(apiUrl);
    myURLConnection = myURL.openConnection();
    myURLConnection.connect();
    reader= new BufferedReader(new InputStreamReader(myURLConnection.getInputStream()));

    //read the output
    String output;
    while ((output = reader.readLine()) != null)
    //print output
    Log.d("OUTPUT", ""+output);

    //Close connection
    reader.close();
}
catch (IOException e)
{
	e.printStackTrace();
}

 

Sample Response Code
{
  "status": "success",
  "mobile": "919999999999",
  "invalidMobile": "",
  "transactionId": "6305583318236810379",
  "statusCode": "200",
  "reason": "success"
}
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.