API URL Endpoint: https://api.geniq.io/rest/v1/batch_sms
PARAMETER | FORMAT | REQUIRED | DESCRIPTION | DEFAULT |
message | string | Yes | Body of the SMS message | |
recipients | integer | Yes | List of recipient’s mobile number including country code without “+” prefix using comma as separator | |
reference | string | Optional | A unique reference ID for keeping track of requests and responses | |
originator | string | Yes | The originator address for the outgoing SMS message | |
originatorTon | string | Optional | Data coding use for the SMS message. auto: Auto-detect text: GSM 03.38 character set unicode: Unicode character set | Auto |
udh | string | Optional | User Data Header for setting concatenated or binary SMS | |
dataCoding | string | Optional | Data coding use for the SMS message. auto: Auto-detect text: GSM 03.38 character set unicode: Unicode character set | Auto |
validity | integer | Optional | Relative 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: Bearer [TOKEN]' \
-d "recipients=6591234567,6581234567" \
-d "originator=Hello" \
-d "message=Test" \
-d "reference=12345"
Parameters returned in the API response:
PARAMETER | FORMAT | DESCRIPTION |
reference | string | If reference parameter is submitted during the API request, the same value will be returned |
responseMessage | string | Response message returned from the API call |
responseCode | integer | Overall response code returned from the API call. Refer to section “Response Codes” for list of possible values |
details.total | integer | Total number of recipients in batch |
details.processed | integer | Total number of recipients processed |
details.failed | integer | Total number of recipients failed |
details.recipients[].recipient | string | Mobile number of recipient |
details.recipients[].messageIds | array | A 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[].responseMessage | string | Response message returned for the recipient |
details.recipients[].responseCode | integer | Response 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"
}
]
}
}