This API allows you to add a subscriber to an existing List in your Juvlon Account.
If a subscriber with the same email address already exists in your account, then the same record is updated with the new subscriber details. The API returns a subscriber ID that uniquely identifies the newly added / updated subscriber which you can use to make other API calls.
This API needs to be called using an HTTP Post method with data in JSON format as shown below.
URL: https://api2.juvlon.com/addSingleSubscriber
JSON Parameter –
'{"apiKey":"$apiKey", "email":"$email", "mobile":"$mobile", "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" }';
Arguments
Name | Type | Description | Default |
---|---|---|---|
ApiKey | String | (Mandatory) The apiKey is a unique key generated for your account that authenticates you and helps us to identify your Juvlon account. | |
String | (Mandatory) The email address of your subscriber. | ||
mobile | String | (Mandatory) The mobile number of your subscriber. | |
listName | String | The name of the existing list into which you would like to add this subscriber. | RealTime_Via_API |
prefix | String | The prefix / title of your subscriber. E.g. Mr., Mrs., Dr. etc.. Can be used as a personalization in emails / SMS | |
firstName | String | The first name of your subscriber. Can be used as a personalization in emails / SMS. | |
middleName | String | The middle name of your subscriber. Can be used as a personalization in emails / SMS. | |
lastname | String | The last name of your subscriber. Can be used as a personalization in emails / SMS. | |
phone | String | The primary telephone of your subscriber. Can be used as a personalization in emails / SMS. | |
address | String | The residential address of your subscriber. Can be used as a personalization in emails / SMS. | |
city | String | The city in which your subscriber resides. Can be used as a personalization in emails / SMS. | |
state | String | The state in which your subscriber resides. Can be used as a personalization in emails / SMS. | |
pincode | String | The pin code of your subscriber’s residential address. Can be used as a personalization in emails / SMS. | |
country | String | The Country where your subscriber resides. Can be used as a personalization in emails / SMS. | |
residencePhone | String | The residence phone number of your subscriber. Can be used as a personalization in emails / SMS. | |
designation | String | The official designation of your subscriber. Can be used as a personalization in emails / SMS. | |
company | String | The company in which your subscriber works. Can be used as a personalization in emails / SMS. | |
companyAddress | String | The company address where your subscriber works. Can be used as a personalization in emails / SMS. | |
companyCity | String | The city where your subscriber works. Can be used as a personalization in emails / SMS. | |
companyState | String | The state where your subscriber works. Can be used as a personalization in emails / SMS. | |
companyCountry | String | The Country where your subscriber works. Can be used as a personalization in emails / SMS. | |
companyPin | String | The pin code of the area where your subscriber works. Can be used as a personalization in emails / SMS. | |
companyphone | String | The office phone number of your subscriber. Can be used as a personalization in emails / SMS. | |
companyFax | String | The office fax number of your subscriber. Can be used as a personalization in emails / SMS. | |
birthday | String | Your subscriber’s birthday in ‘yyyy-mm-dd’ format. Can be used to trigger emails on the subscriber’s birthday or as a personalization in emails / SMS. | |
anniversary | String | Your subscriber’s anniversary date in ‘yyyy-mm-dd’ format. Can be used to trigger emails on the subscriber’s anniversary day or as a personalization in emails / SMS. | |
referenceNo | String | Any reference number that you want to use for the subscriber. Can be used as a personalization in emails / SMS. | |
extra1 | String | Any extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. | |
extra2 | String | Any extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. | |
extra3 | String | Any extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. | |
extra4 | String | Any extra information that you may like to store about your subscriber. Will be used in your transactional SMS if the message text contains this field as a personalization. | |
extra5 | String | Any extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. | |
extra6 | String | Any extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. |
Return value
Type | Description | |
---|---|---|
code | The Success or Error code as per the result of executing this API call. Please refer to the section “Possible-Response-Codes” for more details. | |
status | The success or error text corresponding to the returned error code. Please refer to the section “Possible-Response-Codes” for more details. | |
subid | The ID assigned to the newly added / updated subscriber. |
Usage / Example(s)
PHP Example Code for Integration
$url = https://api2.juvlon.com/addSingleSubscriber; $data = '{"apiKey":"KEY", "email":"example@abc.com", "mobile":"9890999999", "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" }'; $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:Subscriber added successfully", "subid":"2381" }
Error-Response
HTTP/1.1 { "code":"446", "status":"Error:Invalid API key" }
Possible-Response-Codes
200 Success:Subscriber added successfully 201 Success:Subscriber Exists & Request accepted 401 Error:Invalid Method 402 Error:Unauthorized/Empty Key 403 Error:Unauthorized/Invalid Key 404 Error:API call limit exceeded 405 Error:Your Juvlon account is expired 406 Error:API Not Found 407 Error:API Version Not Found 408 Error:API Function not found 440 Error:Subscriber credit not available 441 Error:Invalid List Name 442 Error:Subscriber Already Exist 443 Error:INACTIVE Subscriber 444 Error:Can not add more than 10 Subscribers in Test List 501 Error:Severe server error. Try later