This API is deprecated by sendSMS. We encourage the existing users to move to sendSMS as this API is only available for use until April 30, 2024.
It sends out an existing pre-approved transactional SMS in your Juvlon account to your subscriber’s mobile number.
At least one of the following parameters should be provided: subID / mobile. However, if you provide both, then subID takes precedence.
This API enables you to provide all the personalization details of the recipient that you would like to send in your SMS, like the first name, last name, etc.. The API will first update any existing subscriber that it finds with the matching subID / email address with these personalization details, and then send the specified transactional SMS. If there is no such existing subscriber, then the API will first create a new subscriber with all the personalization data provided, and then send out the transactional SMS to the new subscriber.
This API needs to be called using an HTTP Post method with data in JSON format as shown below.
URL: https://api2.juvlon.com/v4/sendTransactionalSMS
JSON Parameters
'{"apiKey":"$apiKey", "mailerID":"$mailerID", "subID":"$subID", "mobile":"$mobile", "email":"$email", "listName":"$listName", "prefix":"$prefix", "firstName":"$firstName", "middleName":"$middleName", "lastName":"$lastName", "phone":"$phone", "address":"$address", "city":"$city", "state":"$state", "pinCode":"$pinCode", "country":"$country", "residencePhone":"$residencePhone", "designation":"$designation", "company":"$company", "companyAddress":"$company", "companyCity":"$company", "companyState":"$company", "companyCountry":"$company", "companyPin":"$company", "companyPhone":"$companyPhone", "companyFax":"$companyFax", "birthday":"$birthday", "anniversary":"$anniversary", "referenceNo":"$referenceNo", "extra1":"$extra1", "extra2":"$extra2", "extra3":"$extra3", "extra4":"$extra4", "extra5":"$extra5", "extra6":"$extra6", "customField":"$customField" }';
Arguments
The mobile number to send the SMS to.
This field is ignored if there is a “subID” present in the API call.
Name | Type | Description | Default |
---|---|---|---|
apikey | String | Mandatory. The apiKey that gives you access to our HTTP APIs.The apiKey authenticates you and helps us to identify your Juvlon account. | |
mailerID | Int | Mandatory. The message ID of the already created and pre-approved transactional SMS in your Juvlon account that you would like to send. | |
subID | Int | The subscriber ID of an already existing subscriber in your Juvlon account that you would like to send the SMS to. | |
mobile | String | RealTime_Via_API | |
String | The email address of your recipient. To be used as a personalization in your SMS. | ||
listName | String | The name of an existing list into which you would like to add the recipient as a subscriber. | RealTime_Via_API |
prefix | String | The prefix / title of your SMS recipient. E.g. Mr., Mrs., Dr. etc.. To be used as a personalization in your SMS. | |
firstName | String | The first name of your SMS recipient. To be used as a personalization in your SMS. | |
middleName | String | The middle name of your SMS recipient. To be used as a personalization in your SMS | |
lastName | String | The last name of your SMS recipient. To be used as a personalization in your SMS | |
phone | String | The primary telephone of your SMS recipient. To be used as a personalization in your SMS | |
address | String | The residential address of your SMS recipient. To be used as a personalization in your SMS | |
city | String | The city in which your SMS recipient resides. To be used as a personalization in your SMS | |
state | String | The state in which your SMS recipient resides. To be used as a personalization in your SMS | |
pinCode | String | The pin code of your SMS recipient’s residential address. To be used as a personalization in your SMS | |
country | String | The Country where your SMS recipient resides. To be used as a personalization in your SMS | |
residencePhone | String | The residence phone number of your SMS recipient. To be used as a personalization in your SMS | |
designation | String | The official designation of your SMS recipient. To be used as a personalization in your SMS | |
company | String | The company in which your SMS recipient works. To be used as a personalization in your SMS | |
companyAddress | String | The company address where your SMS recipient works. To be used as a personalization in your SMS | |
companyCity | String | The city where your SMS recipient works. To be used as a personalization in your SMS | |
companyState | String | The state where your SMS recipient works. To be used as a personalization in your SMS | |
companyCountry | String | The Country where your SMS recipient works. To be used as a personalization in your SMS | |
companyPin | String | The pin code of the area where your SMS recipient works. To be used as a personalization in your SMS | |
companyPhone | String | The office phone number of your SMS recipient. To be used as a personalization in your SMS | |
companyFax | String | The office fax number of your SMS recipient. To be used as a personalization in your SMS | |
birthday | String | Your SMS recipient’s birthday in ‘yyyy-mm-dd’ format. Can be used to trigger emails on the recipient’s birthday or as a personalization in emails / SMS. | |
anniversary | String | Your SMS recipient’s anniversary date in ‘yyyy-mm-dd’ format. Can be used to trigger emails on the recipient’s anniversary day or as a personalization in emails / SMS. | |
referenceNo | String | Any reference number that you want to use for the SMS recipient. To be used as a personalization in your SMS | |
extra1 | String | Any extra information that you may like to store about your SMS recipient. To be used as a personalization in your SMS | |
extra2 | String | Any extra information that you may like to store about your SMS recipient. To be used as a personalization in your SMS | |
extra3 | String | Any extra information that you may like to store about your SMS recipient. To be used as a personalization in your SMS | |
extra4 | String | Any extra information that you may like to store about your SMS recipient. To be used as a personalization in your SMS | |
extra5 | String | Any extra information that you may like to store about your SMS recipient. To be used as a personalization in your SMS | |
extra6 | String | Any extra information that you may like to store about your SMS recipient. To be used as a personalization in your SMS | |
customField | String | Customized text for your internal tracking. |
Return value
Type | Description | ||
---|---|---|---|
Code | String | The Success or Error response code as returned by the API. Please refer to the section “Possible-Response-Codes” for more details. | |
Status | String | Description of the error code returned. | |
transactionId | String | A number generated by the API to uniquely identify the current call. Also known as the API_Call_ID. |
Usage / Example(s)
PHP Example Code for Integration
$url = 'https://api2.juvlon.com/v4/sendTransactionalSMS'; $url = 'https://api2.juvlon.com/v4/sendTransactionalSMS'; $data = '{"apiKey":"KEY", "mailerID":"28", "subID":"98", "mobile":"9890999999", "email":"example@abc.com", "listName":"ListABC", "prefix":"Mr.", "firstName":"John", "middleName":"K", "lastName":"Smith", "phone":"+91227492682648", "address":"House 5, Suncity", "city":"Mumbai", "state":"Maharashtra", "pinCode":"9604", "country":"India", "residencePhone":"912274926829", "designation":"Project Manager", "company":"XYZ ltd.", "companyAddress":"Office no 5, ABC IT Park", "companyCity":"Mumbai", "companyState":"Maharashtra", "companyCountry":"India", "companyPin":"9607", "companyPhone":"+912274926826", "companyFax":"+912274926827", "birthday":"1988-06-10", "anniversary":"2015-06-11", "referenceNo":"123", "extra1":"98732", "extra2":"989", "extra3":"7687", "extra4":"989", "extra5":"7687", "extra6":"K987JF", "customField":"custom_text" }'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $res1 = curl_exec($ch); curl_close($ch);
Success-Response
HTTP/1.1 { "code":200, "status":"Success", "transactionId":327 }
Error-Response
HTTP/1.1 { "code":442, "status":"Error" }
Possible-Response-Codes
200 Success: API Request Accepted 401 Error: Invalid Method 402 Error: Unauthorized/Empty Key 403 Error: Unauthorized/Invalid Key 404 Error: Account Sending Blocked 405 Error: Your Juvlon account has expired 448 Error: Your Juvlon account is Deactivated 449 Error: No Mailer ID provided 438 Error: Invalid Mailer ID 427 Error: SMS Message ID does not exist in your Juvlon account 428 Error: Not a Transactional SMS 429 Error: Transactional SMS is not approved 602 Error: No subscriber provided 432 Error: Invalid SubID 454 Error: Subscriber does not exist 455 Error: Invalid recipient mobile number 412 Error: Invalid recipient email address 422 Error: Invalid date provided for Birthday 423 Error: Invalid date provided for Anniversary 443 Error: INACTIVE Subscriber 444 Low Subscriber credit 447 Low SMS credit 441 Error: Invalid list name 446 Error: Cannot add more than 10 subscribers in a Test List 460 Delivered 461 Not Delivered 462 DND