Api

Leads

The LEAD API will be used to get, create, update and delete information of leads.

Get Leads List

Request Method : GET

Endpoint : https://crm.dailymails.org/mysite/api/v1/lead/?api_key={api_key}

Parameters

Name

Type

Description

Required

api_key
String
The api key of your account
True

Curl

curl --location --request GET 'https://crm.dailymails.org/mysite/api/v1/lead/?api_key=511bf16198dabe69248095'

C#

var client = new RestClient("https://crm.dailymails.org/mysite/api/v1/lead/?api_key=511bf16198dabe69248095");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Ruby

require "uri"
require "net/http"

url = URI("https://crm.dailymails.org/mysite/api/v1/lead/?api_key=511bf16198dabe69248095")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/?api_key=511bf16198dabe69248095');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

1. Python Example
import http.client

conn = http.client.HTTPSConnection("crm.dailymails.org")
payload = ''
headers = {}
conn.request("GET", "/mysite/api/v1/lead/?api_key=511bf16198dabe69248095", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var qs = require('querystring');

var options = {
  'method': 'GET',
  'hostname': 'crm.dailymails.org',
  'path': '/mysite/api/v1/lead/?api_key=511bf16198dabe69248095',
  'headers': {
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = qs.stringify({

});

req.write(postData);

req.end();

Delete Lead

Request Method : DELETE

Endpoint : https://crm.dailymails.org/mysite/api/v1/lead/{id}?api_key={api_key}

Parameters

Name

Type

Description

Required

api_key
String
The api key of your account
True
id
String
lead id which will be delete
True

Curl

curl --location --request DELETE 'https://crm.dailymails.org/mysite/api/v1/lead/184?api_key=511bf16198dabe69248'

C#

var client = new RestClient("https://crm.dailymails.org/mysite/api/v1/lead/184?api_key=511bf16198dabe69248");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Ruby

require "uri"
require "net/http"

url = URI("https://crm.dailymails.org/mysite/api/v1/lead/184?api_key=511bf16198dabe69248")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = https.request(request)
puts response.read_body

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://crm.dailymails.org/mysite/api/v1/lead/184?api_key=511bf16198dabe69248")
  .method("DELETE", body)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/184?api_key=511bf16198dabe69248');
$request->setMethod(HTTP_Request2::METHOD_DELETE);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import http.client
conn = http.client.HTTPSConnection("crm.dailymails.org")
payload = ''
headers = {}
conn.request("DELETE", "/mysite/api/v1/lead/184?api_key=511bf16198dabe69248", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Nodejs

var request = require('request');
var options = {
  'method': 'DELETE',
  'url': 'https://crm.dailymails.org/mysite/api/v1/lead/184?api_key=511bf16198dabe69248',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Get Lead Details

Request Method : GET

Endpoint : https://crm.dailymails.org/mysite/api/v1/lead/{id}?api_key={api_key}

Parameters

Name

Type

Description

Required

api_key
String
The api key of your account
True
id
String
The lead id of your account
True

Api Results

Name

Result

status
success|fail
id
Re-direct to api url.
error
(if status was fail) describes why the query failed,
Lead id is not correct.
User authentication failed. Wrong API Key.

Curl

curl --location --request OPTIONS 'https://crm.dailymails.org/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095'

Java

  OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://crm.dailymails.org/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095")
  .method("OPTIONS", body)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095');
$request->setMethod(HTTP_Request2::METHOD_OPTIONS);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import http.client
conn = http.client.HTTPSConnection("crm.dailymails.org")
payload = ''
headers = {}
conn.request("OPTIONS", "/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var qs = require('querystring');

var options = {
  'method': 'OPTIONS',
  'hostname': 'crm.dailymails.org',
  'path': '/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095',
  'headers': {
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = qs.stringify({

});

req.write(postData);

req.end();

Create Leads

Request Method : POST

Endpoint : https://crm.dailymails.org/mysite/api/v1/lead/?api_key={api_key}

Parameters

Name

Type

Description

Required

Name
String
Enter the Lead Name
True
Email
String
Enter Email Id
False
Mobile
String
Enter Mobile No
False
Phone
String
ENter the Phone No
False
Company
String
Enter The Company Name
True
Title
String
Select The Title
False
Fax
String
ENter The fax
False
Website
String
Enter The Website name
False
Annual Revanue
String
Enter The Annual Revanue
False
Industry
String
Select Industry Name
False
Source
String
Select Source Name
True
Funnal
String
Enter The Funnal Name
False
Status
String
Enter The Status
False
Number of Employees
String
Enter Number of Employees
False
Rating
String
Select The rating
False
Street
String
Enter Street Name
False
State
String
Enter State Name
False
City
String
Enter City Name
False
Zipcode
String
Enter The ZipCode
False
Skype
String
Enter The Skype Id
False
Twitter
String
Enter The Twitter Id
False
Linkedin
String
Enter The LinkedIn Id
False
Facebook
String
Enter The Facebook Id
False
Is Email Varified
String
Enter Email Verified
False
Email Status
String
Enter Email Status
False
Is Phone Verified
String
Enter Phone No Verified
False
Phone Status
String
ENter the Phone status
False
Lead Owner
String
Select Owner Name
True
Country
String
Select the Country Name
False

Api Results

Name

Result

status
success|fail
error
(if status was fail) describes why the query failed,
Required parameter missing or invalid.

Curl

curl --location --request POST 'https://crm.dailymails.org/mysite/api/v1/lead/?api_key=511bf16198dabe69248095'

Java

  1. JAVA Example
  OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://crm.dailymails.org/mysite/api/v1/lead/?api_key=511bf16198dabe69248095")
  .method("POST", body)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/?api_key=511bf16198dabe69248095');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import http.client

conn = http.client.HTTPSConnection("crm.dailymails.org")
payload = ''
headers = {}
conn.request("POST", "/mysite/api/v1/lead/?api_key=511bf16198dabe69248095", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var qs = require('querystring');

var options = {
  'method': 'POST',
  'hostname': 'crm.dailymails.org',
  'path': '/mysite/api/v1/lead/?api_key=511bf16198dabe69248095',
  'headers': {
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = qs.stringify({

});

req.write(postData);

req.end();

Update Leads

Request Method : PUT

Endpoint : https://crm.dailymails.org/mysite/api/v1/lead/?api_key={api_key}

Content-Type : application/x-www-form-urlencoded

Parameters

Name

Type

Description

Required

api_key
String
The api key of your account
True
subject
String
The subject of your lead parameter
True

Api Results

Name

Result

status
success|fail
message
Send|Queued
error
(if status was fail) describes why the query failed,
Required parameter missing or invalid.
User authentication failed. Wrong API Key.

Curl

curl --location --request PUT 'https://crm.dailymails.org/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://crm.dailymails.org/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095")
  .method("PUT", body)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095');
  $request->setMethod(HTTP_Request2::METHOD_PUT);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }

Python

import http.client

conn = http.client.HTTPSConnection("crm.dailymails.org")
payload = ''
headers = {}
conn.request("PUT", "/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var qs = require('querystring');

var options = {
  'method': 'PUT',
  'hostname': 'crm.dailymails.org',
  'path': '/mysite/api/v1/lead/185/?api_key=511bf16198dabe69248095',
  'headers': {
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = qs.stringify({

});

req.write(postData);

req.end();