Send SMS

The SMS API will send an SMS message to the specified MSISDN. (Not supported on UK operators. For STC Kuwait discuss with SLA before sending SMS messages.)

All HTTP request parameters should be passed in URL Query String - query_params.

HTTP Request

POST /v2.2/sms?msisdn={msisdn}&campaign={campaign}&merchant={merchant}&correlator={correlator}&text={text}

Request Parameters


Name

Description

Type

Usage

msisdn

The subscriber MSISDN that you want to send the SMS to.

string

mandatory

campaign

The Alacrity service URI that identifies the service that this transaction belongs to.

string

mandatory

merchant

The Alacrity merchant URI that identifies which merchant this transaction belongs to.

string

mandatory

correlator

A unique string for this transaction. The correlator guards against accidental duplicate transactions.

string

mandatory

text

The string to display in the SMS.

Sample value with string type:

  1. xxxx (valid)
  2. http~~://~~xxxx.com (valid - link as a string type)

Sample value with object type

  1. {username: 'xxxx', password: 'xxxx'} (valid)
  2. {username: 32123, password: 'xxxx'} (valid - digit as value without quote)
  3. {username: xxxx23, password: 'xxxx'} (invalid - username's value with mix type required to wrap with quote)

string | object

mandatory

POST /v2.2/sms?
msisdn=965987654321&
campaign=campaign:56yhws-87e376-yuio43-45yhh7&
merchant=partner:00ow34-al6g67-12o6hh-00ff66&
correlator=we78fehjke8erwhjkre78&
text=welcome 
HTTP/1.1
Host: api.sla-alacrity.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
POST /v2.2/sms?
msisdn=965987654321&
campaign=campaign:56yhws-87e376-yuio43-45yhh7&
merchant=partner:00ow34-al6g67-12o6hh-00ff66&
correlator=we78fehjke8erwhjkre78&
text={username: 'xxxx', password:  'xxxx'} 
HTTP/1.1
Host: api.sla-alacrity.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json

{
  "success": true
}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "error":
  {
    "category": "SMS API",
    "cdoe": "8001",
    "message": "SMS sending failed"
  }
}
📘

Info

Please reach out to the integration team for assistance in configuring the preset to be passed in the textparameter if you are sending it as an object.

❗️

Warning

Please note that if the result of sending the SMS message fails for any reason the SMS message will NOT be sent.
Please also note that the SMS API must NOT be used for marketing purposes.