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

Sending SMS

API URL Endpoint: https://api.geniq.io/rest/v1/sms

PARAMETERFORMATREQUIREDDESCRIPTIONDEFAULT
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)
Auto
udhstringOptionalUser Data Header for setting concatenated or binary SMS
dataCodingstringOptionalRelative validity time in seconds. If the message is not delivered within this value, it will be discardedAuto
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: Bearer [TOKEN]' \
-d "recipient=6591234567" \
-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
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:

{
    "reference":"12345",
    "responseMessage":"Success",
    "responseCode":"0",
    "messageIds":["e36ba3b8-db55-4eef-99e4-79f3e2422846"]
}