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

Sending SMS

API URL Endpoint:

messagestringYesBody of the SMS message
recipientintegerYesRecipient’s mobile number including country code without “+” prefix
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/sms \
-H 'Authorization: Basic dXNlcjE6cGFzczE=' \
-d "recipient=6591234567" \
-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
responseCodeintegerResponse code returned from the API call. Refer to section “Response Codes” for list of possible values
messageIdsarrayA 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: