[BETA] Send Single SMS with Compliance checking

Updated 2 years ago by Hieu

Path

POSThttps://api.b3networks.com/v1/smsmarketing/messages

Authentication

All request must include x-credential-api-key header. See Getting Started

Request Body: application/json

NameRequiredTypeDescription
destyesstringThe recipient number of the SMS. Phone numbers should start with a "+" and country code (E.164 format).

Example : "+6511111111"
msgyesstringContents of the SMS message.
senderNameyesstringThis is the sender name that the recipient of your SMS will see.
senderEmailyesstringThis is the user’s email that is registered in system, it will be used to calculate the usage budget of that user.

Optional request body attributes for organization with Global DNC activated

NameRequiredTypeDefaultDescription
filterConsentnobooleantrueSMS destination will be filtered with Consent whitelist/blacklist.
filterDncnobooleantrueSMS destination will be filtered with Global PDPC DNC database. This only apply for Singapore destination.
bypassReasonnostring""bypassReason field only required when both filterDnc and filterConsent properties are false, and Global DNC app activated.

Response: application/json

Status: 200 (OK)
NameTypeDescription
txnRefstringTxn id for this sms request
Example:"86832607-1748-4547-9671-8e1708b91bb"
Status: 400 (Bad request)
NameTypeDescription
codestringPossible error code

sms.sameDestAsSender: SMS to the destination must not be the same as your sender number.

sms.msgTooBig: msg property is too big 

sms.destNotSupported: SMS to this destination is currently not supported.

sms.invalidSenderName: senderName param is invalid

sms.blockedByDnc: Destination is blocked by PDPC DNC

sms.blockedByConsent: Destination is blocked by Consent Black list

sms.blockedDueToExpiredSubscription: Your account does not have valid subscription to send SMS
Status: 500 (Error)
NameTypeDescription
codestringPossible error codes sms.internalServerError sms.cannotConnect2Pdpc

Example

Send sms (Global DNC app not activated)

curl -X POST \
              https://api.b3networks.com/v1/smsmarketing/messages \
              -H 'x-credential-api-key=<API KEY>'  -H 'content-type: application/json' \
              -d '{
                  "msg": "Test SMS",
                  "dest": "+65xxxxxxxx",
                  "senderName": "YOUR_REGISTERED_SENDER_NAME",
                  "senderEmail": "johny@gmail.com"
              }'
          

Send sms with compliance check (Global DNC app activated)


curl -X POST \
              'https://api.b3networks.com/smsmarketing/private/v1/messages?apiKey=' \
              -H 'content-type: application/json' \
              -d '{
                  "msg": "Test SMS",
                  "dest": "+65xxxxxxxx",
                  "senderName": "YOUR_REGISTERED_SENDER_NAME",
                  "filterConsent": true,
                  "filterDnc": true,
                  "senderEmail": "johny@gmail.com"
              }
          

Send sms that bypass compliance checking (Global DNC app activated)

curl -X POST \
              'https://api.b3networks.com/smsmarketing/private/v1/messages?apiKey=' \
              -H 'content-type: application/json' \
              -d '{
                  "msg": "Test SMS",
                  "dest": "+65xxxxxxxx",
                  "senderName": "YOUR_REGISTERED_SENDER_NAME",
                  "filterConsent": false,
                  "filterDnc": false,
                  "bypassReason": "Not for marketing purpose",
                  "senderEmail": "johny@gmail.com"
              }'

How did we do?


Powered by HelpDocs

Powered by HelpDocs