1. Home
  2. Docs
  3. API Documentation
  4. Active APIs
  5. addSingleSubscriber

addSingleSubscriber

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

NameTypeDescriptionDefault
ApiKeyString(Mandatory) The apiKey is a unique key generated for your account that authenticates you and helps us to identify your Juvlon account. 
emailString(Mandatory) The email address of your subscriber. 
mobileString(Mandatory) The mobile number of your subscriber. 
listNameStringThe name of the existing list into which you would like to add this subscriber.RealTime_Via_API
prefixStringThe prefix / title of your subscriber. E.g. Mr., Mrs., Dr. etc.. Can be used as a personalization in emails / SMS 
firstNameStringThe first name of your subscriber. Can be used as a personalization in emails / SMS. 
middleNameStringThe middle name of your subscriber. Can be used as a personalization in emails / SMS. 
lastnameStringThe last name of your subscriber. Can be used as a personalization in emails / SMS. 
phoneStringThe primary telephone of your subscriber. Can be used as a personalization in emails / SMS. 
addressStringThe residential address of your subscriber. Can be used as a personalization in emails / SMS. 
cityStringThe city in which your subscriber resides. Can be used as a personalization in emails / SMS. 
stateStringThe state in which your subscriber resides. Can be used as a personalization in emails / SMS. 
pincodeStringThe pin code of your subscriber’s residential address. Can be used as a personalization in emails / SMS. 
countryStringThe Country where your subscriber resides. Can be used as a personalization in emails / SMS. 
residencePhoneStringThe residence phone number of your subscriber. Can be used as a personalization in emails / SMS. 
designationStringThe official designation of your subscriber. Can be used as a personalization in emails / SMS. 
companyStringThe company in which your subscriber works. Can be used as a personalization in emails / SMS. 
companyAddressStringThe company address where your subscriber works. Can be used as a personalization in emails / SMS. 
companyCityStringThe city where your subscriber works. Can be used as a personalization in emails / SMS. 
companyStateStringThe state where your subscriber works. Can be used as a personalization in emails / SMS. 
companyCountryStringThe Country where your subscriber works. Can be used as a personalization in emails / SMS. 
companyPinStringThe pin code of the area where your subscriber works. Can be used as a personalization in emails / SMS. 
companyphoneStringThe office phone number of your subscriber. Can be used as a personalization in emails / SMS. 
companyFaxStringThe office fax number of your subscriber. Can be used as a personalization in emails / SMS. 
birthdayStringYour 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. 
anniversaryStringYour 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. 
referenceNoStringAny reference number that you want to use for the subscriber. Can be used as a personalization in emails / SMS. 
extra1StringAny extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. 
extra2StringAny extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. 
extra3StringAny extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. 
extra4StringAny 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. 
extra5StringAny extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. 
extra6StringAny extra information that you may like to store about your subscriber. Can be used as a personalization in emails / SMS. 

Return value

TypeDescription
codeThe Success or Error code as per the result of executing this API call. Please refer to the section “Possible-Response-Codes” for more details. 
statusThe success or error text corresponding to the returned error code. Please refer to the section “Possible-Response-Codes” for more details. 
subidThe 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