S M S

Sending Personalized SMS

POST
/sms/v1/messages/personalized

Personalized SMS is a type of Short Messages that generated from rendering a template , A template is a text that contains a special text that contains variables, Those variable got substituted at the runtime .

Authorization

bearerAuth
AuthorizationBearer <token>

JWT access token returned by Signing In (POST /auth/v1/tokens/).

In: header

Request Body

application/json

messageText*string

The message Jinja2 template content that you want to send.

Default"Hi {{Name}} your Salary is {{Salary}}"
senderName*string

The name of the message sender.

Default"Cequens"
messageType*string

Message type either text or unicode Can be text or unicode

Default"text"
recipients*string

The intended recipients’ phone numbers comma separated

Default"201xxxxxxxxx,966xxxxxx"
replacementList?string

An array variablesLists. The delimiters between each variable list is the ';' . and the delimiters between variables are commas ','

Default"employeeX,500$"
variableList?string
Default"Name,Salary"
clientSchemaRestriction?boolean

Restrict the validation for the replacement list versus the variable list and messageText , When enable it will not be any tolerance for missing variable in the variable list

Defaultfalse

Response Body

application/json

application/json

curl -X POST "https://example.com/sms/v1/messages/personalized" \  -H "Content-Type: application/json" \  -d '{    "messageText": "Hi {{Name}} your Salary is {{Salary}}",    "senderName": "Cequens",    "messageType": "text",    "recipients": "201xxxxxxxxx,966xxxxxx"  }'
"{\n  \"replyCode\": 0,\n  \"replyMessage\": \"Request handled successfully\",\n  \"requestId\": \"2fbc0560-6187-11e7-b60b-77c0e21cef84\",\n  \"clientRequestId\": 0,\n  \"requestTime\": \"2017-07-05T15:38:10.742\",\n  \"data\": {\n    \"SentSMSIDs\": [\n      {\n        \"SMSId\": \"0461f8f4-4c4f-4dc0-b7ed-097f4f9f85f4\"\n      }\n    ],\n    \"InvalidRecipients\": \"\"\n  }\n}"