API URL Endpoint: https://api.geniq.io/rest/v1/sms
PARAMETER | FORMAT | REQUIRED | DESCRIPTION | DEFAULT |
message | string | Yes | Body of the SMS message | |
recipient | integer | Yes | Recipient’s mobile number including country code without “+” prefix | |
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 | The 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 |
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/sms \
-H 'Authorization: Basic dXNlcjE6cGFzczE=' \
-d "recipient=6591234567" \
-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 | Response code returned from the API call. Refer to section “Response Codes” for list of possible values |
messageIds | array | A list of unique IDs for each SMS sent. If the SMS message length is too long, the API will automatically split it into multiple SMS parts and return the list of messageIds |
Sample Response:
{
"reference":"12345",
"responseMessage":"Success",
"responseCode":"0",
"messageIds":["e36ba3b8-db55-4eef-99e4-79f3e2422846"]
}