logo documentation

API Documentation v1.0
Vbout Contact List


Adding a new contact to a list.



JSON response format — https://api.vbout.com/1/emailmarketing/addcontact.json
XML response format — https://api.vbout.com/1/emailmarketing/addcontact.xml



key — Unique API user key from vbout account - required
listidList id of which this contact belong too - required
email — Email address of the contact to return - required
status — Status of the contact (active | disactive) - required
ipaddress — Inject the visitor's ip into the Vbout tracker to merge the tracking done on that ip. Must be used with an active Vbout tracking code  - optional 
fields — Custom fields added to a specific list (Array) - optional

Note: You can get your api key, listid on your vbout account. You can get custom fields using List Details method.



Step 1. Copy the code below. If you are to use PHP, copy the PHP sample. If you are to use Javascript or jQuery, use the Javascript sample.
Step 2. Change the parameter values, the codes highlighted in red.
Step 3. You can now check the returned data stored in a variable named response, if the request was successful.

var params = {
   "key" : '234562345623456',
   "listid" : '12345',
   "email" : 'johndoe@tester.com',
   "ipaddress":'127.0.0.1',
   "status" : 'active',
   "fields" : {
      "1125" : 'John',
      "1126" : 'Doe',
      "1127" : '1-541-754-3010',
   
}
};
$.ajax({
   url : "https://api.vbout.com/1/emailmarketing/addcontact.json",
   type : "POST",
   data : params,
   success: function (res) {
      var response = res.response.data.item;
      alert(response);
   }
});




$params = array(
   'key' => '234562345623456',
   'listid' => '12345',
   'email' => 'johndoe@tester.com',
   "ipaddress":'127.0.0.1',
   'status' => 'active',
   'fields' => array(
      '1125' => 'John',
      '1126' => 'Doe',
      '1126' => '1-541-754-3010',
   
)
);
$url = 'https://api.vbout.com/1/emailmarketing/addcontact.json?'.http_build_query($params);
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_POST, true);
$res = json_decode(curl_exec($handle),true);
$response = $res['response']['data']['item'];

echo $response;




[{
   "data" : {
      "item" : "Your contact has been created successfully.",
       'id' => '220025636',
   }
}]



Getting contact details by email.



JSON response format — https://api.vbout.com/1/emailmarketing/getcontactbyemail.json
XML response format — https://api.vbout.com/1/emailmarketing/getcontactbyemail.xml



key — Unique API user key from vbout account - required
email — Email address of the contact to return - required
listidList id of which this contact belong too - required

Note: You can get your api key and listid value on your vbout account.



Step 1. Copy the code below. If you are to use PHP, copy the PHP sample. If you are to use Javascript or jQuery, use the Javascript sample.
Step 2. Change the parameter values, the codes highlighted in red.
Step 3. You can now manipulate the returned data stored in a variable named details.

$params = array(
   'key' => '234562345623456',
   'listid' => '12345',
   'email' => 'johndoe@tester.com',
);
$url = 'https://api.vbout.com/1/emailmarketing/getcontactbyemail.json?'.http_build_query($params);
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_POST, true);
$res = json_decode(curl_exec($handle),true);
$details = $res['response']['data']['contact'];

foreach($details as $key => $value){
   echo $key.' = '.$value.'<br>';
}



var params = {
   "key" : '234562345623456',
   "listid" : '12345',
   "email" : 'johndoe@tester.com',
};
$.ajax({
   url : "https://api.vbout.com/1/emailmarketing/getcontactbyemail.json",
   type : "POST",
   data : params,
   success: function (res) {
      var details = res.response.data.contact;
      $.each(details,function(key,value){
         alert(key+' = '+value);
      });
   }
});




[{
   "contact" : {
      "id" : "3",
      "email" : "johndoe@tester.com",
      "status" : "1",
      "registration_date" : "11/30/1998 00:00",
      "First Name" : "John",
      "Last Name" : "Doe",
      "Phone" : "1-541-754-3010",
   }
}]



Updating contact details.



JSON response format — https://api.vbout.com/1/emailmarketing/editcontact.json
XML response format — https://api.vbout.com/1/emailmarketing/editcontact.xml



key — Unique API user key from vbout account - required
id — ID of the contact to update - required
listidList id of which this contact belong too - required
email — Email address of the contact to return - required
status — Status of the contact (active | disactive) - required
fields — Custom fields added to a specific list (Array) - optional

Note: You can get your api key, listid, and custom fields on your vbout account. You can get contact id using Get Contact method.



Step 1. Copy the code below. If you are to use PHP, copy the PHP sample. If you are to use Javascript or jQuery, use the Javascript sample.
Step 2. Change the parameter values, the codes highlighted in red.
Step 3. You can now check the returned data stored in a variable named response, if the request was successful.

var params = {
   "key" : '234562345623456',
   "id" : '3',
   "listid" : '12345',
   "email" : 'johnsmith@tester.com',
   "status" : 'active',
   "fields" : {
      "1125" : 'John',
      "1126" : 'Smith',
      "1127" : '1-111-111-1111',
   
}
};
$.ajax({
   url : "https://api.vbout.com/1/emailmarketing/editcontact.json",
   type : "POST",
   data : params,
   success: function (res) {
      var response = res.response.data.item;
      alert(response);
   }
});




$params = array(
   'key' => '234562345623456',
   'id' => '3'
   'listid' => '12345',
   'email' => 'johnsmith@tester.com',
   'status' => 'active',
   'fields' => array(
      '1125' => 'John',
      '1126' => 'Smith',
      '1126' => '1-111-111-1111',
   
)
);
$url = 'https://api.vbout.com/1/emailmarketing/editcontact.json?'.http_build_query($params);
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_POST, true);
$res = json_decode(curl_exec($handle),true);
$response = $res['response']['data']['item'];

echo $response;




[{
   "data" : {
      "item" : "Your contact has been updated successfully.",
   }
}]



Deleting an existing contact to a list.



JSON response format — https://api.vbout.com/1/emailmarketing/deletecontact.json
XML response format — https://api.vbout.com/1/emailmarketing/deletecontact.xml



key — Unique API user key from vbout account - required
id — ID of the contact to delete - required

Note: You can get your api key on your vbout account. You can get contact id using Get Contact method.



Step 1. Copy the code below. If you are to use PHP, copy the PHP sample. If you are to use Javascript or jQuery, use the Javascript sample.
Step 2. Change the parameter values, the codes highlighted in red.
Step 3. You can now check the returned data stored to a variable named response, if the request was successful.

var params = {
   "key" : '234562345623456',
   "id" : '3',
};
$.ajax({
   url : "https://api.vbout.com/1/emailmarketing/deletecontact.json",
   type : "POST",
   data : params,
   success: function (res) {
      var response = res.response.data.item;
      alert(response);
   }
});




$params = array(
   'key' => '234562345623456',
   'id' => '3'
);
$url = 'https://api.vbout.com/1/emailmarketing/deletecontact.json?'.http_build_query($params);
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_POST, true);
$res = json_decode(curl_exec($handle),true);
$response = $res['response']['data']['item'];

echo $response;




[{
   "data" : {
      "item" : "Your contact has been deleted successfully.",
   }
}]



Getting list details, including custom fields.



JSON response format — https://api.vbout.com/1/emailmarketing/getlist.json
XML response format — https://api.vbout.com/1/emailmarketing/getlist.xml



key — Unique API user key from vbout account - required
id — ID of the list to return - required

Note: You can get your api key and listid on your vbout account.



Step 1. Copy the code below. If you are to use PHP, copy the PHP sample. If you are to use Javascript or jQuery, use the Javascript sample.
Step 2. Change the parameter values, the codes highlighted in red.
Step 3. You can now check the returned data stored to a variable named details, if the request was successful.

var params = {
   "key" : '234562345623456',
   "id" : '12345',
};
$.ajax({
   url : "https://api.vbout.com/1/emailmarketing/getlist.json",
   type : "POST",
   data : params,
   success: function (res) {
      var details = res.response.data.list;
      $.each(details,function(key,value){
         alert(key+' = '+value);
      });
   }
});




$params = array(
   'key' => '234562345623456',
   'id' => '12345'
);
$url = 'https://api.vbout.com/1/emailmarketing/getlist.json?'.http_build_query($params);
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_POST, true);
$res = json_decode(curl_exec($handle),true);
$details = $res['response']['data']['list'];

foreach($details as $key => $value){
   echo $key.' = '.$value.'<br>';
}




[{
   "data" : {
      "list" : {
         "id" : "12345",
         "name" : "Subscription form",
         "form_title" : "Newsletter Signup",
         "email_subject" : "Thank you for your subscription.",
         "reply_to" : "support@website.com",
         "from_email" : "admin@website.com",
         "from_name" : "Admin",
         "confimation_email" : "Please click on the link below to confirm your subscription.",
         "success_email" : "Your email is now confirmed! we are excited to have you on our list.",
         "confimation_message" : "Your signup is almost complete! Check your email for a confirmation message.",
         "success_message" : "Your subscription is now complete!",
         "error_message" : "You have already been subscribed to this list!",
         "doubleOptin" : "0",
         "notify_email" : "",
         "creation_date" : "11/06/2014 00:00",
         "fields" : {
            "1125" :"First Name",
            "1126" :"Last Name",
            "1127" :"Phone"
         }

      },
   }
}]