1. Home
  2. Docs
  3. SMS Messaging
  4. Sending Batch SMS

Sending Batch SMS

API URL Endpoint:
https://api.geniqtech.com/rest/v1/batch_sms

PARAMETERFORMATREQUIREDDESCRIPTIONDEFAULT
messagestringYesBody of the SMS message
recipientsintegerYesList of recipient’s mobile number including country code without “+” prefix using comma as separator
referencestringOptionalA unique reference ID for keeping track of requests and responses
originatorstringYesThe originator address for the outgoing SMS message
originatorTonstringOptionalThe originating address’s type of number (TON).

auto: Auto detect
national: Short Number (Max. length=15)
alpha: Alphanumeric (Max. length=11)
international: MSISDN (Max. length=15)
Auto
udhstringOptionalUser Data Header for setting concatenated or binary SMS
dataCodingstringOptionalData coding use for the SMS message.

auto: Auto detect
text: GSM 03.38 character set
unicode: Unicode character set
Auto
validityintegerOptionalRelative validity time in seconds. If message is not delivered within this value, it will be discarded

Sample request using CURL:

$ curl -X POST https://api.geniqtech.com/rest/v1/batch_sms \
-H 'Authorization: Basic dXNlcjE6cGFzczE=' \
-d "recipients=6591234567,6581234567" \
-d "originator=Hello" \
-d "message=Test" \
-d "reference=12345"

Parameters returned in the API response:

PARAMETERFORMATDESCRIPTION
referencestringIf reference parameter is submitted during the API request, the same value will be returned
responseMessagestringResponse message returned from the API call
responseCodeintegerOverall response code returned from the API call. Refer to section “Response Codes” for list of possible values
details.totalintegerTotal number of recipients in batch
details.processedintegerTotal number of recipients processed
details.failedintegerTotal number of recipients failed
details.recipients[].recipientstringMobile number of recipient
details.recipients[].messageIdsarrayA list of unique IDs for each SMS sent for the recipient. If the SMS message length is too long, the API will automatically split it into multiple SMS parts and return the list of messageIds
details.recipients[].responseMessagestringResponse message returned for the recipient
details.recipients[].responseCodeintegerResponse code returned for the recipient. Refer to section “Response Codes” for list of possible values

Sample Response:

{
	"responseMessage":"Success",
	"responseCode":"0",	
	"reference":"12345",
	"details":{
		"total":2,
		"processed":2,
		"failed":0,
		"recipients":[
			{
				"recipient":"6591234567",
				"messageIdList":["d6c5e5b9-847b-488a-bd93-c944ee26fafb"],
				"responseCode":"0",
				"responseMessage":"Success"
			},
			{
				"recipient":"6581234567",
				"messageIdList":["a4c0bce2-0553-44c8-afde-8dada71e5e94"],
				"responseCode":"0",
				"responseMessage":"Success"
			}
		]
	},
}