Introduction
This is LeadsRain’s API page. We have a number of services like the Ringless Voicemail service, Cloud-based Predictive dialer or Cloud-based Auto dialer, Rich Text Message and Voice Broadcasting, that you can use as per your marketing requirements.
You will find that we have language bindings in Ruby, php, JavaScript and Python. Below you will see some examples of using these APIs.
Authentication
You require LeadsRain API key to access the APIs. You can get your API key from our support team.
You need to provide the API key at every API endpoint and request to the server. Here is an example for how it is done:
api_key : MODELAPIKEY
Predictive Dialer
Check for duplicate leads
require 'uri'
require 'net/http'
url = URI("http://s%2A.leadsrain.com/leadsrain/api/add_posted_lead_dup.php")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Cache-Control"] = 'no-cache'
request.body = "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"list_id\": 2132222,\n\"check_duplicate\" : \"NO_DUPLICATE_CHECK\",\n\"phone_number\" : 1234567890,\n\"title\" : \"title\",\n\"first_name\" : \"firstname\",\n\"middle_initial\" : \"middlename\",\n\"last_name\" : \"lastname\",\n\"address1\" : \"address1\",\n\"address2\" : \"address2\",\n\"address3\" : \"address3\",\n\"city\" : \"San Francisco\",\n\"state\" : \"California\",\n\"province\" : \"USA\",\n\"postal_code\" : 94133,\n\"vendor_lead_code\" : 74747447777,\n\"phone_code\" : 415,\n\"alt_phone\" : 9876543210,\n\"security_phrase\" : 8696869686,\n\"email\" : \"emaiid@example.com\",\n\"comments\" : \"comments\"\n}\n"
response = http.request(request)
puts response.read_body
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s%2A.leadsrain.com/leadsrain/api/add_posted_lead_dup.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"list_id\": 2132222,\n\"check_duplicate\" : \"NO_DUPLICATE_CHECK\",\n\"phone_number\" : 1234567890,\n\"title\" : \"title\",\n\"first_name\" : \"firstname\",\n\"middle_initial\" : \"middlename\",\n\"last_name\" : \"lastname\",\n\"address1\" : \"address1\",\n\"address2\" : \"address2\",\n\"address3\" : \"address3\",\n\"city\" : \"San Francisco\",\n\"state\" : \"California\",\n\"province\" : \"USA\",\n\"postal_code\" : 94133,\n\"vendor_lead_code\" : 74747447777,\n\"phone_code\" : 415,\n\"alt_phone\" : 9876543210,\n\"security_phrase\" : 8696869686,\n\"email\" : \"emaiid@example.com\",\n\"comments\" : \"comments\"\n}\n",
CURLOPT_HTTPHEADER => array(
"Cache-Control: no-cache",
"Content-Type: application/json",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = JSON.stringify({
"username": "username",
"api_key": "MODELAPIKEY",
"list_id": 2132222,
"check_duplicate": "NO_DUPLICATE_CHECK",
"phone_number": 1234567890,
"title": "title",
"first_name": "firstname",
"middle_initial": "middlename",
"last_name": "lastname",
"address1": "address1",
"address2": "address2",
"address3": "address3",
"city": "San Francisco",
"state": "California",
"province": "USA",
"postal_code": 94133,
"vendor_lead_code": 74747447777,
"phone_code": 415,
"alt_phone": 9876543210,
"security_phrase": 8696869686,
"email": "emaiid@example.com",
"comments": "comments"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s%2A.leadsrain.com/leadsrain/api/add_posted_lead_dup.php");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.send(data);
import requests
url = "http://s%2A.leadsrain.com/leadsrain/api/add_posted_lead_dup.php"
payload = "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"list_id\": 2132222,\n\"check_duplicate\" : \"NO_DUPLICATE_CHECK\",\n\"phone_number\" : 1234567890,\n\"title\" : \"title\",\n\"first_name\" : \"firstname\",\n\"middle_initial\" : \"middlename\",\n\"last_name\" : \"lastname\",\n\"address1\" : \"address1\",\n\"address2\" : \"address2\",\n\"address3\" : \"address3\",\n\"city\" : \"San Francisco\",\n\"state\" : \"California\",\n\"province\" : \"USA\",\n\"postal_code\" : 94133,\n\"vendor_lead_code\" : 74747447777,\n\"phone_code\" : 415,\n\"alt_phone\" : 9876543210,\n\"security_phrase\" : 8696869686,\n\"email\" : \"emaiid@example.com\",\n\"comments\" : \"comments\"\n}\n"
headers = {
'Content-Type': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
The above command returns JSON structured like this:
Success Response
{
"lead_id":1252453,
"message":"Lead Successfully added."
}
Error Response
{
"lead_id":"",
"message":"Error: Invalid Username or API Key"
}
This endpoint allows you to check and filter duplicate leads from your list, using your list ID or add new leads.
HTTP Request
POST http://s*.leadsrain.com/leadsrain/api/add_posted_lead_dup.php
Query Parameters
Parameter | Type | Description |
---|---|---|
username | Your register username. | |
api_key | API key of service. | |
list_id | The ID of your lead list that you want to add the leads to | |
check_duplicate | Options for duplicate check. CHECK_DUPLICATE_IN_LIST, CHECK_DUPLICATE_IN_CAMPAIGN, NO_DUPLICATE_CHECK | |
phone_number | String(16) | Client’s contact |
title | String(16) | Title |
first_name | String(16) | Client's first name |
middle_initial | String(16) | Client's middle name |
last_name | String(16) | Client's last name |
address1 | String(16) | Client's address |
address2 | String(16) | Client's address |
address3 | String(16) | Client's address |
city | String(50) | Example: San Francisco |
state | String(2) | Example: California |
province | String(50) | Example: USA |
postal_code | String(10) | Example: 94133 |
vendor_lead_code | String(20) | Example: 74747447777 |
phone_code | String(10) | Example: 415 |
alt_phone | String(18) | The alternate contact no. |
security_phrase | String(100) | 8696869686 |
String(50) | The company email ID | |
comments | String(500) | Follow up. |
Rich Text Message
Post Leads
require 'uri'
require 'net/http'
url = URI("http://text.leadsrain.com/bcsms/api/api_add_lead.php")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Cache-Control"] = 'no-cache'
request.body = "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"lead_package_id\": 2132222,\n\"phone\" : 1234567890,\n\"name\" : \"name\",\n\"other_info\" : \"other\",\n\"phone_code\" : 1,\n\"duplicate_check\" : \"camp_list\"\n}\n"
response = http.request(request)
puts response.read_body
import requests
url = "http://text.leadsrain.com/bcsms/api/api_add_lead.php"
payload = "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"lead_package_id\": 2132222,\n\"phone\" : 1234567890,\n\"name\" : \"name\",\n\"other_info\" : \"other\",\n\"phone_code\" : 1,\n\"duplicate_check\" : \"camp_list\"\n}\n"
headers = {
'Content-Type': "application/json",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://text.leadsrain.com/bcsms/api/api_add_lead.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"lead_package_id\": 2132222,\n\"phone\" : 1234567890,\n\"name\" : \"name\",\n\"other_info\" : \"other\",\n\"phone_code\" : 1,\n\"duplicate_check\" : \"camp_list\"\n}\n",
CURLOPT_HTTPHEADER => array(
"Cache-Control: no-cache",
"Content-Type: application/json",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var data = JSON.stringify({
"username": "username",
"api_key": "MODELAPIKEY",
"lead_package_id": 2132222,
"phone": 1234567890,
"name": "name",
"other_info": "other",
"phone_code": 1,
"duplicate_check": "camp_list"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://text.leadsrain.com/bcsms/api/api_add_lead.php");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"result":"1",
"lead_id":"546454",
"message":"Success: Lead Successfully Added."
}
Error Response
{
"result":"0",
"message":"Error: Invalid username or api key"
}
This endpoints allows you to post leads after checking for the duplicate leads, on our dashboard
HTTP Request
POST http://text.leadsrain.com/bcsms/api/api_add_lead.php
Query Parameters
Parameter | Description |
---|---|
username | Your register username. (required) |
api_key | API key of service. (Required) |
lead_package_id | The ID of your lead list that you want to add the leads to.(required) |
phone | Customer’s Mobile Number. (required) |
name | Customer’s Name. |
other_info | Customer’s Information. |
phone_code | Default Value is 1 for USA. 44 for UK and 61 for Australia. |
duplicate_check | You can check for duplicate leads in the following ways: ( Options : list, camp_list, allcamp_list ) list : Check for Duplicate in list. camp_list : Check for duplicate in campaign's all lists. allcamp_list : Check for duplicate in all campaigns. |
Zapier Link
This is our Zapier invitation link for integration.
HTTP Request
https://zapier.com/developer/invite/71183/34a5c1e3348d61c49a1de8977c025093/
Ringless Voicemail
Add Calltime
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/call_times/add_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_name\":\"democalltime\",\"call_time_comments\":\"\",\"user\":\"username\",\"ct_default_start\":900,\"ct_default_stop\":2100}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/call_times/add_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_name\":\"democalltime\",\"call_time_comments\":\"\",\"user\":\"username\",\"ct_default_start\":900,\"ct_default_stop\":2100}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/call_times/add_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_name\":\"democalltime\",\"call_time_comments\":\"\",\"user\":\"username\",\"ct_default_start\":900,\"ct_default_stop\":2100}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_name\":\"democalltime\",\"call_time_comments\":\"\",\"user\":\"username\",\"ct_default_start\":900,\"ct_default_stop\":2100}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/call_times/add_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status":"success",
"call_time":"47581524",
"msg":"9amTo9pm added successfully."
}
Error Response
{
"status":"fail",
"msg":"Invalid Username or API Key"
}
This endpoints is for you to include the specific calltime that you would want your campaign to run on.
HTTP Request
POST http://s2.leadsrain.com/rvm/api/call_times/add_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
call_time_name | Name of Calltime. Ex. : 9amTo9pm |
ct_default_start | 900. Default Start Time( 900 = 9 AM) |
ct_default_stop | 2100. Default Stop Time( 2100 = 9 PM) |
Add Campaign
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/campaign/add_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/campaign/add_api"
payload = ""
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/campaign/add_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = new FormData();
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/campaign/add_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status":"success",
"campaign_id":"21548752",
"msg":"MyFirstCampaign added sucessfully"
}
Error Response
{
"status":"fail",
"msg":"Invalid Username or API Key"
}
Here you can add a campaign
HTTP Request
POST http://s2.leadsrain.com/rvm/api/campaign/add_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
campaign_name | Name of the Campaign |
local_call_time | A CallTime ID. If not given, a default calltime will be added of 9am to 9pm |
campaign_cid | A Campaign Caller ID. Ex. : 8553343363 |
sound_file_url | A sound file URL. Ex. : http://xyzhost.com/myvoicemail.mp3 |
Add List
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/leadlist/add_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_name\":\"listname\",\"campaign_id\":\"9975003\",\"active\":\"N\"}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/leadlist/add_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_name\":\"listname\",\"campaign_id\":\"9975003\",\"active\":\"N\"}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/leadlist/add_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_name\":\"listname\",\"campaign_id\":\"9975003\",\"active\":\"N\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_name\":\"listname\",\"campaign_id\":\"9975003\",\"active\":\"N\"}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/leadlist/add_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status":"success",
"list_id":"11455258",
"msg":"MyFirstList added successfully"
}
Error Response
{
"status":"fail",
"msg":"Invalid Username or API Key"
}
This will let you add Lead lists for your campaign
HTTP Request
POST http://s2.leadsrain.com/rvm/api/leadlist/add_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
campaign_id | The ID for the campaign to which you want to upload the list. |
list_name | Name of the list |
active | Y / N |
Postlead
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/ringless/api/add_posted_lead.php")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"list_id\": 2132222,\n\"phone_number\" : 1234567890,\n\"scrub_lead\" : \"tcpa_and_phone_validation_check\",\n\"country_code\" : \"USA\",\n\"title\" : \"title\",\n\"first_name\" : \"firstname\",\n\"middle_initial\" : \"middlename\",\n\"last_name\" : \"lastname\",\n\"address1\" : \"address1\",\n\"address2\" : \"address2\",\n\"address3\" : \"address3\",\n\"city\" : \"San Francisco\",\n\"state\" : \"California\",\n\"province\" : \"USA\",\n\"postal_code\" : 94133,\n\"vendor_lead_code\" : 74747447777,\n\"phone_code\" : 1,\n\"alt_phone\" : 9876543210,\n\"security_phrase\" : 8696869686,\n\"email\" : \"emaiid@example.com\",\n\"comments\" : \"comments\"\n}\n"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/ringless/api/add_posted_lead.php"
payload = "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"list_id\": 2132222,\n\"phone_number\" : 1234567890,\n\"scrub_lead\" : \"tcpa_and_phone_validation_check\",\n\"country_code\" : \"USA\",\n\"title\" : \"title\",\n\"first_name\" : \"firstname\",\n\"middle_initial\" : \"middlename\",\n\"last_name\" : \"lastname\",\n\"address1\" : \"address1\",\n\"address2\" : \"address2\",\n\"address3\" : \"address3\",\n\"city\" : \"San Francisco\",\n\"state\" : \"California\",\n\"province\" : \"USA\",\n\"postal_code\" : 94133,\n\"vendor_lead_code\" : 74747447777,\n\"phone_code\" : 1,\n\"alt_phone\" : 9876543210,\n\"security_phrase\" : 8696869686,\n\"email\" : \"emaiid@example.com\",\n\"comments\" : \"comments\"\n}\n"
headers = {
'content-type': "application/json",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/ringless/api/add_posted_lead.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\"username\": \"username\",\n\"api_key\": \"MODELAPIKEY\",\n\"list_id\": 2132222,\n\"phone_number\" : 1234567890,\n\"scrub_lead\" : \"tcpa_and_phone_validation_check\",\n\"country_code\" : \"USA\",\n\"title\" : \"title\",\n\"first_name\" : \"firstname\",\n\"middle_initial\" : \"middlename\",\n\"last_name\" : \"lastname\",\n\"address1\" : \"address1\",\n\"address2\" : \"address2\",\n\"address3\" : \"address3\",\n\"city\" : \"San Francisco\",\n\"state\" : \"California\",\n\"province\" : \"USA\",\n\"postal_code\" : 94133,\n\"vendor_lead_code\" : 74747447777,\n\"phone_code\" : 1,\n\"alt_phone\" : 9876543210,\n\"security_phrase\" : 8696869686,\n\"email\" : \"emaiid@example.com\",\n\"comments\" : \"comments\"\n}\n",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/json",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = JSON.stringify({
"username": "username",
"api_key": "MODELAPIKEY",
"list_id": 2132222,
"phone_number": 1234567890,
"scrub_lead": "tcpa_and_phone_validation_check",
"country_code": "USA",
"title": "title",
"first_name": "firstname",
"middle_initial": "middlename",
"last_name": "lastname",
"address1": "address1",
"address2": "address2",
"address3": "address3",
"city": "San Francisco",
"state": "California",
"province": "USA",
"postal_code": 94133,
"vendor_lead_code": 74747447777,
"phone_code": 1,
"alt_phone": 9876543210,
"security_phrase": 8696869686,
"email": "emaiid@example.com",
"comments": "comments"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/ringless/api/add_posted_lead.php");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"lead_id":1252453,
"message":"Lead Successfully added."
"scrub_result": {
"status": "success",
"msg": "Success",
"data": {
"DNC": "Y",
"TCPA": "N",
"UNREACHABLE": "N"
}
}
}
Error Response
{
"status":"fail",
"msg":"Invalid Username or API Key"
}
Now that you have the list to your specific campaign, here you can add the leads to the list
HTTP Request
POST http://s2.leadsrain.com/ringless/api/add_posted_lead.php
Query Parameters
Parameter | Type | Description |
---|---|---|
username | Your register username. (required) | |
api_key | API key of service. (Required) | |
list_id | The List ID in which you want to add the leads to | |
check_duplicate | Options for duplicate check. CHECK_DUPLICATE_IN_LIST, CHECK_DUPLICATE_IN_CAMPAIGN, NO_DUPLICATE_CHECK | |
phone_number ( Required ) | String(16) | 8554776767 |
scrub_lead | Options for Scrub Lead. no_scrub (Default), tcpa_check (Scrub TCPA & DNC), tcpa_check_with_name (Scrub TCPA & DNC with lead name), tcpa_and_phone_validation_check (Scrub TCPA, DNC & UNREACHABLE), tcpa_with_name_and_phone_validation_check (Scrub TCPA, DNC & UNREACHABLE with lead name) |
|
country_code | Options for Country Code USA (Defualt for phone_code 1) CAN (Country code for Canada lead) Note: If you add Canada lead this code is mandatory AUS (Country code for phone_code 61) GBR (Country code for phone_code 44) |
|
title | String(4) | Mr |
first_name | String(30) | John |
middle_initial | String(1) | M |
last_name | String(30) | Smith |
address1 | String(100) | Main street |
address2 | String(100) | Main street |
address3 | String(100) | Main street |
city | String(50) | New York |
state | String(2) | NY |
province | String(50) | USA |
postal_code | String(10) | 10011 |
vendor_lead_code | String(20) | 74747447777 |
phone_code | String(10) | 1 |
alt_phone | String(18) | 8554776767 |
security_phrase | String(100) | 8696869686 |
String(50) | test@example.com | |
comments | String(500) | Follow up. |
Delete Calltime
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/call_times/delete_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_id\":\"1921787\"}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/call_times/delete_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_id\":\"1921787\"}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/call_times/delete_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_id\":\"1921787\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"call_time_id\":\"1921787\"}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/call_times/delete_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status": "success",
"call_time_id": "1425786",
"msg": "CT9TO9 deleted successfully."
}
Error Response
{
"status":"fail",
"msg":"Invalid Username or API Key"
}
In case you want to delete the call time, here is how
HTTP Request
POST http://s2.leadsrain.com/rvm/api/call_times/delete_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
call_time_id | A Calltime ID to delete. |
Delete Campaign
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/campaign/delete_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"campaign_id\":\"6954657\"}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/campaign/delete_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"campaign_id\":\"6954657\"}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/campaign/delete_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"campaign_id\":\"6954657\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"campaign_id\":\"6954657\"}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/campaign/delete_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status": "success",
"campaign_id": "4785121",
"msg": "MyRvmCampign deleted successfully."
}
Error Response
{
"status":"fail",
"msg":"Invalid Username or API Key"
}
In case you want to delete a campaign, here is how.
HTTP Request
POST http://s2.leadsrain.com/rvm/api/campaign/delete_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
campaign_id | A Campaign ID to delete. |
Delete List
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/leadlist/delete_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_id\":\"769781\"}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/leadlist/delete_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_id\":\"769781\"}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/leadlist/delete_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_id\":\"769781\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\",\"list_id\":\"769781\"}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/leadlist/delete_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status": "success",
"list_id": "2457856",
"msg": "TestList_1 deleted successfully."
}
Error Response
{
"status": "fail",
"msg": "Error: Invalid List id"
}
In case you want to delete a lead list, here is how.
HTTP Request
POST http://s2.leadsrain.com/rvm/api/leadlist/delete_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
list_id | A List ID to delete. |
View Calltimes
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/call_times/view_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/call_times/view_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/call_times/view_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/call_times/view_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status": "success",
"count": 2,
"data": [
{
"call_time_id": "2014585",
"call_time_name": "9am to 9pm",
"ct_default_start": "900",
"ct_default_stop": "2100"
},
{
"call_time_id": "2154782",
"call_time_name": "9am to 9pm",
"ct_default_start": "900",
"ct_default_stop": "2100"
}
],
"record_per_page": "2",
"page": "1",
"next_page": 2
}
Error Response
{
"status": "fail",
"msg": "Error: Invalid Username or API Key"
}
If you want to view the call time from your account, use this endpoint.
HTTP Request
POST http://s2.leadsrain.com/rvm/api/call_times/view_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
record_per_page | Default value is 1000 (Optional) |
page | Default value is 1 (Optional) |
View Campaign
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/campaign/view_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/campaign/view_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/campaign/view_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/campaign/view_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status": "success",
"time": 0.009,
"count": 2,
"data": [
{
"campaign_id": "4068468",
"campaign_name": "demo campaign 123",
"date_time": "2017-07-10 12:55:19",
"last_attempt": null,
"active": "N",
"ringless_vm_file": "117368_9909999_Non"
},
{
"campaign_id": "1356872",
"campaign_name": "TCamp2405",
"date_time": "2017-05-23 16:57:02",
"last_attempt": null,
"active": "N",
"ringless_vm_file": "321101_9909999_T777777"
}
],
"record_per_page": "2",
"page": "2",
"next_page": 3,
"prev_page": 1
}
Error Response
{
"status": "fail",
"msg": "Error: Invalid Username or API Key"
}
If you wish to view your campaign, use this endpoint.
HTTP Request
POST http://s2.leadsrain.com/rvm/api/campaign/view_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
record_per_page | Default value is 1000 (Optional) |
page | Default value is 1 (Optional) |
View List
require 'uri'
require 'net/http'
url = URI("http://s2.leadsrain.com/rvm/api/leadlist/view_api")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json, text/plain, */*'
request["origin"] = 'http://s2.leadsrain.com'
request["user-agent"] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
request["content-type"] = 'application/json;charset=UTF-8'
request["referer"] = 'http://s2.leadsrain.com/rvm/'
request["accept-encoding"] = 'gzip, deflate'
request["accept-language"] = 'en-GB,en-US;q=0.9,en;q=0.8'
request["cache-control"] = 'no-cache'
request.body = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}"
response = http.request(request)
puts response.read_body
import requests
url = "http://s2.leadsrain.com/rvm/api/leadlist/view_api"
payload = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}"
headers = {
'accept': "application/json, text/plain, */*",
'origin': "http://s2.leadsrain.com",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
'content-type': "application/json;charset=UTF-8",
'referer': "http://s2.leadsrain.com/rvm/",
'accept-encoding': "gzip, deflate",
'accept-language': "en-GB,en-US;q=0.9,en;q=0.8",
'cache-control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://s2.leadsrain.com/rvm/api/leadlist/view_api",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json, text/plain, */*",
"accept-encoding: gzip, deflate",
"accept-language: en-GB,en-US;q=0.9,en;q=0.8",
"cache-control: no-cache",
"content-type: application/json;charset=UTF-8",
"origin: http://s2.leadsrain.com",
"referer: http://s2.leadsrain.com/rvm/",
"user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var data = "{\"username\":\"username\",\"api_key\":\"MODELAPIKEY\"}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "http://s2.leadsrain.com/rvm/api/leadlist/view_api");
xhr.setRequestHeader("accept", "application/json, text/plain, */*");
xhr.setRequestHeader("origin", "http://s2.leadsrain.com");
xhr.setRequestHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36");
xhr.setRequestHeader("content-type", "application/json;charset=UTF-8");
xhr.setRequestHeader("referer", "http://s2.leadsrain.com/rvm/");
xhr.setRequestHeader("accept-encoding", "gzip, deflate");
xhr.setRequestHeader("accept-language", "en-GB,en-US;q=0.9,en;q=0.8");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
The above command returns JSON structured like this:
Success Response
{
"status": "success",
"time": 0.006,
"count": 2,
"data": [
{
"list_id": "2154785",
"list_name": "TestList_1",
"active": "N",
"last_attempt": null,
"campaign_id": "124578",
"campaign_name": "TestCampaign",
"cnt": "10"
},
{
"list_id": "2457859",
"list_name": "TestList_2",
"active": "N",
"last_attempt": null,
"campaign_id": "124578",
"campaign_name": "TestCampaign",
"cnt": "1"
}
],
"record_per_page": "2",
"page": "1",
"next_page": 2
}
Error Response
{
"status": "fail",
"msg": "Error: Invalid Username or API Key"
}
View your lead lists use this endpoint.
HTTP Request
POST http://s2.leadsrain.com/rvm/api/leadlist/view_api
Query Parameters
Parameter | Description |
---|---|
username | Your register username. |
api_key | API key of service. |
record_per_page | Default value is 1000 (Optional) |
page | Default value is 1 (Optional) |