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=your_api_key'

C#

var client = new RestClient("https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key");
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=your_api_key")

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

JaVA

      Unirest.setTimeouts(0, 0);
      HttpResponse<String> response = Unirest.get("https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key")
.asString();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key');
$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

import requests

url = "https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

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

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/{id}/?api_key=your_api_key'

C#

var client = new RestClient("https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key");
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/{id}/?api_key=your_api_key")

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

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.delete("https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key")
  .asString();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key');
$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 requests

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

payload={}
headers = {}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

Nodejs

var request = require('request');
var options = {
  'method': 'DELETE',
  'url': 'https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key',
  '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

Curl

curl --location --request GET 'https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key'

C#

var client = new RestClient("https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key");
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/{id}/?api_key=your_api_key")

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

Java

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key").asString();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key');
$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

import requests

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

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

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

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
True
Enter the Lead Name
email
String
True
Enter Valid Email Id
mobile
String
False
Enter Mobile No
phone
String
False
Enter the Phone No
company
String
True
Enter The Company Name
title
String
False
Enter The Title
fax
String
False
Enter The fax
website
String
False
Enter The Website name
annual_revenue
Integer
False
Enter The Annual Revanue
industry
Integer
True
(2, "ASP(Application Service Provider)"), (3, 'Aerospace & Defence'), (4, "Alternative Energy"), (5, "Automobiles & parts"), (6, "Banks"), (7, "Beverages"), (8, "Chemicals"), (9, "Construction & Materials"), (10, "Data/Telecome OEM"), (11, "ERP(Enterprise Resorce Planning)"), (12, "Electricity"), (13, "Electronic & Electrical Equipment"), (14, "Equity Investment Instruments"), (15, "Financial Service"), (16, "Fixed Line Telecommunications"), (17, "Food & Drug Retailers"), (18, "Food Producers"), (19, "Forestry & Paper"), (20,"Gas, Water & Multi-Utility"), (21, "General Industrials"), (22, "General Retailers"), (23, "Goverment/Military"), (24,"Health Care Equipment & Services"), (25, "Households Goods & Homer Constructions"), (26, "Industrial Engineering"), (27, "Industrial Metels & Mining"), (28, "Industrial Transportation"), (29, "Large Enterprise"), (30, "Leisure Goods"), (31, "Life Insurance"), (32, "ManagementISV"), (33, "Media"), (34, "Mobile Telecommunications"), (35, "MSP(Management Service Provider)"), (36, "Network Equipment Enterprise"), (37, "Non-management ISV"), (38, "Nonequity Investment Instruments"), (39, "Nonlife Insurance"), (40, "Optical Network"), (41, "Oil & Gas Producers"), (42, "Oil Equipment Services & Distribution"), (43, "Personal Goods"), (44, "Phormaceuticals & Biotechnology"), (45, "Real Estate Investment Trust"), (46, "Softwere & Computer Service"), (47, "Service Provider"), (48, "Small/Medium Enterprise"), (49, "Storage Equipment"), (50, "Storage Service Provider"), (51, "system Integrator"), (52, "Technology Hardware & Equipment"), (53, "Tobacco"), (54, "Travel & Leisure"), (55, "Wireless Industry"), (56, "Communications"), (57,"Consulting"), (58, "Educations"), (59, "Financial Services"), (60, "Manufacturing"), (62, "Real Estate"), (63, "Technology"), (64, "Other"))
source
Integer
True
((2, "Advertisement"), (3, "Cold Call"), (4, "Employee Referral"), (5, "External Referral"), (6, "Online Store"), (7, "Partner"), (8, "Public Relations"), (9, "Sales Email Alias"), (10, "Seminar Partner"), (11, "Internal Seminar"), (12, "Trade Show"), (13, "Web Download"), (14, "Web Research"), (15, "Chat"), (16, "Twitter"), (17, "Facebook"), (18, "Google+"), (19, "Other"))
funnel
string
True
Enter The valid Funnal Name
status
Integer
True
Enter The Status number
number_of_employees
Integer
False
Enter Number of Employees
rating
Integer
True
((2, 'Acquired'), (3, 'Active'), (4, 'Market Failed'), (5, 'Project Cancelled'), (6, 'Shut Down'))
street
String
False
Enter Street Name
state
String
False
Enter State Name
city
String
False
Enter City Name
zipcode
String
False
Enter The ZipCode
skype
String
False
Enter The Skype Id
twitter
string
False
Enter The Twitter Id
linkedin
String
False
Enter The LinkedIn Id
facebook
String
False
Enter the Facebook Id
score
Integer
False
Enter the Score
country
Integer
False
Select country (1, 26 to 247)

Request Body

{
    "name": "testapi1",
    "email": "2@ws.com",
    "mobile": "",
    "phone": "",
    "company": "test",
    "title": "",
    "fax": "",
    "website": "",
    "annual_revenue": 10,
    "industry": 2,
    "source": 2,
    "funnel": "funnel-one",
    "status": 1,
    "number_of_employees": 1,
    "rating": 2,
    "street": "",
    "state": "",
    "city": "",
    "zipcode": "",
    "skype": "",
    "twitter": "",
    "linkedin": "",
    "facebook": "",
    "score": 5,
    "country": 1
}

Curl

curl --location --request POST 'https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "testapi",
    "email": "2@ws.com",
    "mobile": "",
    "phone": "",
    "company": "test",
    "title": "",
    "fax": "",
    "website": "",
    "annual_revenue": 10,
    "industry": 2,
    "source": 2,
    "funnel": "funnel-one",
    "status": 1,
    "number_of_employees": 1,
    "rating": 2,
    "street": "",
    "state": "",
    "city": "",
    "zipcode": "",
    "skype": "",
    "twitter": "",
    "linkedin": "",
    "facebook": "",
    "score": 1,
    "country": 1
}'

C#

var client = new RestClient("https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""name"": ""testapi"",
" + "\n" +
@"    ""email"": ""2@ws.com"",
" + "\n" +
@"    ""mobile"": """",
" + "\n" +
@"    ""phone"": """",
" + "\n" +
@"    ""company"": ""test"",
" + "\n" +
@"    ""title"": """",
" + "\n" +
@"    ""fax"": """",
" + "\n" +
@"    ""website"": """",
" + "\n" +
@"    ""annual_revenue"": 10,
" + "\n" +
@"    ""industry"": 2,
" + "\n" +
@"    ""source"": 2,
" + "\n" +
@"    ""funnel"": ""funnel-one"",
" + "\n" +
@"    ""status"": 1,
" + "\n" +
@"    ""number_of_employees"": 1,
" + "\n" +
@"    ""rating"": 2,
" + "\n" +
@"    ""street"": """",
" + "\n" +
@"    ""state"": """",
" + "\n" +
@"    ""city"": """",
" + "\n" +
@"    ""zipcode"": """",
" + "\n" +
@"    ""skype"": """",
" + "\n" +
@"    ""twitter"": """",
" + "\n" +
@"    ""linkedin"": """",
" + "\n" +
@"    ""facebook"": """",
" + "\n" +
@"    ""score"": 1,
" + "\n" +
@"    ""country"": 1
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Ruby

require "uri"
require "json"
require "net/http"

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

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "name": "testapi",
  "email": "2@ws.com",
  "mobile": "",
  "phone": "",
  "company": "test",
  "title": "",
  "fax": "",
  "website": "",
  "annual_revenue": 10,
  "industry": 2,
  "source": 2,
  "funnel": "funnel-one",
  "status": 1,
  "number_of_employees": 1,
  "rating": 2,
  "street": "",
  "state": "",
  "city": "",
  "zipcode": "",
  "skype": "",
  "twitter": "",
  "linkedin": "",
  "facebook": "",
  "score": 1,
  "country": 1
})

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

Java

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"name\": \"testapi\",\r\n    \"email\": \"2@ws.com\",\r\n    \"mobile\": \"\",\r\n    \"phone\": \"\",\r\n    \"company\": \"test\",\r\n    \"title\": \"\",\r\n    \"fax\": \"\",\r\n    \"website\": \"\",\r\n    \"annual_revenue\": 10,\r\n    \"industry\": 2,\r\n    \"source\": 2,\r\n    \"funnel\": \"funnel-one\",\r\n    \"status\": 1,\r\n    \"number_of_employees\": 1,\r\n    \"rating\": 2,\r\n    \"street\": \"\",\r\n    \"state\": \"\",\r\n    \"city\": \"\",\r\n    \"zipcode\": \"\",\r\n    \"skype\": \"\",\r\n    \"twitter\": \"\",\r\n    \"linkedin\": \"\",\r\n    \"facebook\": \"\",\r\n    \"score\": 1,\r\n    \"country\": 1\r\n}")
  .asString();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{
\n    "name": "testapi",
\n    "email": "2@ws.com",
\n    "mobile": "",
\n    "phone": "",
\n    "company": "test",
\n    "title": "",
\n    "fax": "",
\n    "website": "",
\n    "annual_revenue": 10,
\n    "industry": 2,
\n    "source": 2,
\n    "funnel": "funnel-one",
\n    "status": 1,
\n    "number_of_employees": 1,
\n    "rating": 2,
\n    "street": "",
\n    "state": "",
\n    "city": "",
\n    "zipcode": "",
\n    "skype": "",
\n    "twitter": "",
\n    "linkedin": "",
\n    "facebook": "",
\n    "score": 1,
\n    "country": 1
\n}');
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 requests
import json

url = "https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key"

payload = json.dumps({
  "name": "testapi",
  "email": "2@ws.com",
  "mobile": "",
  "phone": "",
  "company": "test",
  "title": "",
  "fax": "",
  "website": "",
  "annual_revenue": 10,
  "industry": 2,
  "source": 2,
  "funnel": "funnel-one",
  "status": 1,
  "number_of_employees": 1,
  "rating": 2,
  "street": "",
  "state": "",
  "city": "",
  "zipcode": "",
  "skype": "",
  "twitter": "",
  "linkedin": "",
  "facebook": "",
  "score": 1,
  "country": 1
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Nodejs

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://crm.dailymails.org/mysite/api/v1/lead/?api_key=your_api_key',
  'headers': {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "name": "testapi",
    "email": "2@ws.com",
    "mobile": "",
    "phone": "",
    "company": "test",
    "title": "",
    "fax": "",
    "website": "",
    "annual_revenue": 10,
    "industry": 2,
    "source": 2,
    "funnel": "funnel-one",
    "status": 1,
    "number_of_employees": 1,
    "rating": 2,
    "street": "",
    "state": "",
    "city": "",
    "zipcode": "",
    "skype": "",
    "twitter": "",
    "linkedin": "",
    "facebook": "",
    "score": 1,
    "country": 1
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Update Leads

Request Method : PUT

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

Content-Type : application/json

Parameters

Name

Type

Description

Required

name
String
True
Enter the Lead Name
email
String
True
Enter Valid Email Id
mobile
String
False
Enter Mobile No
phone
String
False
Enter the Phone No
company
String
True
Enter The Company Name
title
String
False
Enter The Title
fax
String
False
Enter The fax
website
String
False
Enter The Website name
annual_revenue
Integer
False
Enter The Annual Revanue
industry
Integer
True
(2, "ASP(Application Service Provider)"), (3, 'Aerospace & Defence'), (4, "Alternative Energy"), (5, "Automobiles & parts"), (6, "Banks"), (7, "Beverages"), (8, "Chemicals"), (9, "Construction & Materials"), (10, "Data/Telecome OEM"), (11, "ERP(Enterprise Resorce Planning)"), (12, "Electricity"), (13, "Electronic & Electrical Equipment"), (14, "Equity Investment Instruments"), (15, "Financial Service"), (16, "Fixed Line Telecommunications"), (17, "Food & Drug Retailers"), (18, "Food Producers"), (19, "Forestry & Paper"), (20,"Gas, Water & Multi-Utility"), (21, "General Industrials"), (22, "General Retailers"), (23, "Goverment/Military"), (24,"Health Care Equipment & Services"), (25, "Households Goods & Homer Constructions"), (26, "Industrial Engineering"), (27, "Industrial Metels & Mining"), (28, "Industrial Transportation"), (29, "Large Enterprise"), (30, "Leisure Goods"), (31, "Life Insurance"), (32, "ManagementISV"), (33, "Media"), (34, "Mobile Telecommunications"), (35, "MSP(Management Service Provider)"), (36, "Network Equipment Enterprise"), (37, "Non-management ISV"), (38, "Nonequity Investment Instruments"), (39, "Nonlife Insurance"), (40, "Optical Network"), (41, "Oil & Gas Producers"), (42, "Oil Equipment Services & Distribution"), (43, "Personal Goods"), (44, "Phormaceuticals & Biotechnology"), (45, "Real Estate Investment Trust"), (46, "Softwere & Computer Service"), (47, "Service Provider"), (48, "Small/Medium Enterprise"), (49, "Storage Equipment"), (50, "Storage Service Provider"), (51, "system Integrator"), (52, "Technology Hardware & Equipment"), (53, "Tobacco"), (54, "Travel & Leisure"), (55, "Wireless Industry"), (56, "Communications"), (57,"Consulting"), (58, "Educations"), (59, "Financial Services"), (60, "Manufacturing"), (62, "Real Estate"), (63, "Technology"), (64, "Other"))
source
Integer
True
((2, "Advertisement"), (3, "Cold Call"), (4, "Employee Referral"), (5, "External Referral"), (6, "Online Store"), (7, "Partner"), (8, "Public Relations"), (9, "Sales Email Alias"), (10, "Seminar Partner"), (11, "Internal Seminar"), (12, "Trade Show"), (13, "Web Download"), (14, "Web Research"), (15, "Chat"), (16, "Twitter"), (17, "Facebook"), (18, "Google+"), (19, "Other"))
funnel
string
True
Enter The valid Funnal Name
status
Integer
True
Enter The Status number
number_of_employees
Integer
False
Enter Number of Employees
rating
Integer
True
((2, 'Acquired'), (3, 'Active'), (4, 'Market Failed'), (5, 'Project Cancelled'), (6, 'Shut Down'))
street
String
False
Enter Street Name
state
String
False
Enter State Name
city
String
False
Enter City Name
zipcode
String
False
Enter The ZipCode
skype
String
False
Enter The Skype Id
twitter
string
False
Enter The Twitter Id
linkedin
String
False
Enter The LinkedIn Id
facebook
String
False
Enter the Facebook Id
score
Integer
False
Enter the Score
country
Integer
False
Select country (1, 26 to 247)

Request Body

{
    "name": "testapi1",
    "email": "2@ws.com",
    "mobile": "",
    "phone": "",
    "company": "test",
    "title": "",
    "fax": "",
    "website": "",
    "annual_revenue": 10,
    "industry": 2,
    "source": 2,
    "funnel": "funnel-one",
    "status": 1,
    "number_of_employees": 1,
    "rating": 2,
    "street": "",
    "state": "",
    "city": "",
    "zipcode": "",
    "skype": "",
    "twitter": "",
    "linkedin": "",
    "facebook": "",
    "score": 5,
    "country": 1
}

Curl

curl --location --request PUT 'https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "testapi1",
    "email": "2@ws.com",
    "mobile": "",
    "phone": "",
    "company": "test",
    "title": "",
    "fax": "",
    "website": "",
    "annual_revenue": 10,
    "industry": 2,
    "source": 2,
    "funnel": "funnel-one",
    "status": 1,
    "number_of_employees": 1,
    "rating": 2,
    "street": "",
    "state": "",
    "city": "",
    "zipcode": "",
    "skype": "",
    "twitter": "",
    "linkedin": "",
    "facebook": "",
    "score": 5,
    "country": 1
}'

C#

var client = new RestClient("https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""name"": ""testapi1"",
" + "\n" +
@"    ""email"": ""2@ws.com"",
" + "\n" +
@"    ""mobile"": """",
" + "\n" +
@"    ""phone"": """",
" + "\n" +
@"    ""company"": ""test"",
" + "\n" +
@"    ""title"": """",
" + "\n" +
@"    ""fax"": """",
" + "\n" +
@"    ""website"": """",
" + "\n" +
@"    ""annual_revenue"": 10,
" + "\n" +
@"    ""industry"": 2,
" + "\n" +
@"    ""source"": 2,
" + "\n" +
@"    ""funnel"": ""funnel-one"",
" + "\n" +
@"    ""status"": 1,
" + "\n" +
@"    ""number_of_employees"": 1,
" + "\n" +
@"    ""rating"": 2,
" + "\n" +
@"    ""street"": """",
" + "\n" +
@"    ""state"": """",
" + "\n" +
@"    ""city"": """",
" + "\n" +
@"    ""zipcode"": """",
" + "\n" +
@"    ""skype"": """",
" + "\n" +
@"    ""twitter"": """",
" + "\n" +
@"    ""linkedin"": """",
" + "\n" +
@"    ""facebook"": """",
" + "\n" +
@"    ""score"": 5,
" + "\n" +
@"    ""country"": 1
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key")

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

request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "name": "testapi1",
  "email": "2@ws.com",
  "mobile": "",
  "phone": "",
  "company": "test",
  "title": "",
  "fax": "",
  "website": "",
  "annual_revenue": 10,
  "industry": 2,
  "source": 2,
  "funnel": "funnel-one",
  "status": 1,
  "number_of_employees": 1,
  "rating": 2,
  "street": "",
  "state": "",
  "city": "",
  "zipcode": "",
  "skype": "",
  "twitter": "",
  "linkedin": "",
  "facebook": "",
  "score": 5,
  "country": 1
})

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

Java

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.put("https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key")
  .header("Content-Type", "application/json")
  .body("{\r\n    \"name\": \"testapi1\",\r\n    \"email\": \"2@ws.com\",\r\n    \"mobile\": \"\",\r\n    \"phone\": \"\",\r\n    \"company\": \"test\",\r\n    \"title\": \"\",\r\n    \"fax\": \"\",\r\n    \"website\": \"\",\r\n    \"annual_revenue\": 10,\r\n    \"industry\": 2,\r\n    \"source\": 2,\r\n    \"funnel\": \"funnel-one\",\r\n    \"status\": 1,\r\n    \"number_of_employees\": 1,\r\n    \"rating\": 2,\r\n    \"street\": \"\",\r\n    \"state\": \"\",\r\n    \"city\": \"\",\r\n    \"zipcode\": \"\",\r\n    \"skype\": \"\",\r\n    \"twitter\": \"\",\r\n    \"linkedin\": \"\",\r\n    \"facebook\": \"\",\r\n    \"score\": 5,\r\n    \"country\": 1\r\n}")
  .asString();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_PUT);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json'
));
$request->setBody('{
\n    "name": "testapi1",
\n    "email": "2@ws.com",
\n    "mobile": "",
\n    "phone": "",
\n    "company": "test",
\n    "title": "",
\n    "fax": "",
\n    "website": "",
\n    "annual_revenue": 10,
\n    "industry": 2,
\n    "source": 2,
\n    "funnel": "funnel-one",
\n    "status": 1,
\n    "number_of_employees": 1,
\n    "rating": 2,
\n    "street": "",
\n    "state": "",
\n    "city": "",
\n    "zipcode": "",
\n    "skype": "",
\n    "twitter": "",
\n    "linkedin": "",
\n    "facebook": "",
\n    "score": 5,
\n    "country": 1
\n}');
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 requests
import json

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

payload = json.dumps({
  "name": "testapi1",
  "email": "2@ws.com",
  "mobile": "",
  "phone": "",
  "company": "test",
  "title": "",
  "fax": "",
  "website": "",
  "annual_revenue": 10,
  "industry": 2,
  "source": 2,
  "funnel": "funnel-one",
  "status": 1,
  "number_of_employees": 1,
  "rating": 2,
  "street": "",
  "state": "",
  "city": "",
  "zipcode": "",
  "skype": "",
  "twitter": "",
  "linkedin": "",
  "facebook": "",
  "score": 5,
  "country": 1
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

Nodejs

var request = require('request');
var options = {
  'method': 'PUT',
  'url': 'https://crm.dailymails.org/mysite/api/v1/lead/{id}/?api_key=your_api_key',
  'headers': {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "name": "testapi1",
    "email": "2@ws.com",
    "mobile": "",
    "phone": "",
    "company": "test",
    "title": "",
    "fax": "",
    "website": "",
    "annual_revenue": 10,
    "industry": 2,
    "source": 2,
    "funnel": "funnel-one",
    "status": 1,
    "number_of_employees": 1,
    "rating": 2,
    "street": "",
    "state": "",
    "city": "",
    "zipcode": "",
    "skype": "",
    "twitter": "",
    "linkedin": "",
    "facebook": "",
    "score": 5,
    "country": 1
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});