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

Sending Batch SMS

API URL Endpoint:

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)
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
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.geniq.io/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:

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: