Try Free for 14 DaysRequest A Demo

API Documentation - Leads

The leads resource allows you to retrieve, edit, and add leads.

Leads Instance Resources

Method Endpoint Description
GET /api/v1/leads Get a paginated list of details for all leads.
GET /api/v1/leads/{lead_id} Get details about a single lead.
POST /api/v1/leads Create a new lead.
POST /api/v1/leads/{lead_id} Edit details for a single lead.

Get All Leads

Get a paginated list of details for all leads.

Resource Details

Method Endpoint
GET https://app.whatconverts.com/api/v1/leads

Supported Parameters

Parameter Type Description Required
leads_per_page number Number of leads to return for this request (default 25, maximum 250). No
page_number number Page number to return for this request. No
account_id number Unique identifier for the account in which to return leads from. Supported when using an Agency Key. No
profile_id number Unique identifier for the profile in which to return leads from. Supported when using an Agency Key. No
lead_type string Lead type to return for this request; chat, email, event, other, phone_call, text_message, transaction or web_form. No
lead_status string Lead status to return for this request; repeat or unique leads. No
start_date string Start date for this request in date or date/time ISO 8601 format (UTC); 2015-11-10 or 2015-11-10T00:00:00Z. No
end_date string End date for this request in date or date/time ISO 8601 format (UTC); 2015-11-10 or 2015-11-10T00:00:00Z. No
order string Order in which to return the leads by date created; asc or (default) desc. No
quotable string Quotable type to return for this request; yes, no, pending or not_set. No
quote_value string Return leads that have a quote value; has_value or no_value. No
sales_value string Return leads that have a sales value; has_value or no_value. No
caller_number string Return leads that have this E.164 formatted caller’s number. No
spam boolean If true will return only spam leads. No
duplicate boolean If true will return only duplicate leads. No

Response Details

Parameter Type Description
leads_per_page number The number of leads returned in the request.
page_number number The current page number in the request.
total_pages number The total amount of pages available in the request.
total_leads number The total amount of leads available in the request.
leads array Contains all the requested leads.
account_id number Unique identifier for the account.
profile_id number Unique identifier for the profile.
profile string The name of the profile.
lead_id number Unique identifier for the lead.
user_id string Unique identifier for the user.
lead_type string The type of lead; chat, email, event, other, phone_call, text_message, transaction or web_form.
lead_status string The status of the lead; unique or repeat.
date_created string Date and time when the lead was created in ISO 8601 format (UTC).
quotable string The quotable type for the lead.
quote_value number The quote value for the lead.
sales_value number The sales value for the lead.
spam boolean If the lead is marked as spam.
duplicate boolean If the lead is marked as duplicate.
lead_source string The traffic source for the lead.
lead_medium string The traffic medium for the lead.
lead_campaign string The campaign value for the lead.
lead_content string The content value for the lead.
lead_keyword string The keyword value for the lead.
ip_address string The user IP address for the lead.
gclid string The Google click identifier for the lead.
msclkid string The Microsoft click identifier for the lead.
salesforce_user_id string The Salesforce user ID for the lead.
lead_url string The URL where the lead took place.
landing_url string The URL where the user arrived on the website.
form_name string The name of the form for the lead. Applicable to web_form lead type.
phone_name string The name of the tracking number for the lead. Applicable to phone_call and text_message lead type.
tracking_number string The E.164 formatted tracking number for the lead. Applicable to phone_call and text_message lead type.
destination_number string The E.164 formatted destination number for the lead. Applicable to phone_call lead type.
caller_number string The E.164 formatted caller’s number for the lead. Applicable to phone_call and text_message lead type.
call_duration string The formatted duration of the call for the lead. Applicable to phone_call lead type.
call_duration_seconds number The duration of the call in seconds for the lead. Applicable to phone_call lead type.
caller_city string The caller’s city for the lead based on the caller_number. Applicable to phone_call and text_message lead type.
caller_zip string The caller’s zip for the lead based on the caller_number. Applicable to phone_call and text_message lead type.
caller_state string The caller’s state for the lead based on the caller_number. Applicable to phone_call and text_message lead type.
caller_country string The two-letter ISO country code of the caller for the lead based on the caller_number. Applicable to phone_call lead type.
answer_status string The answer status for the lead; Answered, No Answer, or Busy. Applicable to phone_call lead type.
call_status string The call status for the lead; In Progress, or Completed. Applicable to phone_call lead type.
line_type string The line type of the caller for the lead. Applicable to phone_call and text_message lead type.
recording string The URL to download the call recording. Applicable to phone_call lead type.
play_recording string The URL to play the call recording. Applicable to phone_call lead type.
message string The message sent by the caller for the lead. Applicable to text_message lead type.
event_category string The event category value for the lead. Applicable to event lead type.
event_action string The event action value for the lead. Applicable to event lead type.
event_label string The event label value for the lead. Applicable to event lead type.
transaction_id string The transaction id value for the lead. Applicable to transaction lead type.
transaction_tax number The transaction tax value for the lead. Applicable to transaction lead type.
transaction_shipping number The transaction shipping value for the lead. Applicable to transaction lead type.
additional_fields object Additional fields for the lead.

Example Response

	{
	  "page_number": 1,
	  "leads_per_page": 25,
	  "total_pages": 37,
	  "total_leads": 910,
	  "leads": [
	    {
	      "account_id": 13744,
	      "profile_id": 42167,
	      "profile": "WhatConverts",
	      "lead_id": 148099,
	      "user_id": "51497-af17340d-62b8-3044-423f-3dc754e621c2",
	      "lead_type": "Phone Call",
	      "lead_status": "Repeat",
	      "date_created": "2016-01-25T16:21:22Z",
	      "quotable": "Yes",
	      "quote_value": 251,
	      "sales_value": 750,
	      "lead_source": "google",
	      "lead_medium": "cpc",
	      "lead_campaign": "call tracking general",
	      "lead_content": "easy call tracking",
	      "lead_keyword": "call tracking",
	      "lead_url": "https://www.whatconverts.com/contact",
	      "landing_url": "https://www.whatconverts.com/",
	      "spam": false,
	      "duplicate": false,
	      "tracking_number": "+17047349155",
	      "destination_number": "+17045436123",
	      "caller_country": "US",
	      "caller_state": "NC",
	      "caller_zip": "28226",
	      "caller_name": "Jeremy Helms",
	      "call_duration": "2 minutes and 55 seconds",
	      "call_duration_seconds": 175,
	      "caller_city": "Charlotte",
	      "answer_status": "Answered",
	      "call_status": "Completed",
	      "line_type": "Landline",
	      "caller_number": "+15432245114",
	      "phone_name": "Tracking Number",
	      "message": "Hello, I am interested in buying your products.",
	      "ip_address": "157.212.71.198",
	      "gclid": "CLibmtmqpNICFcSfGwodQbUAvg",
	      "msclkid": "25d83debf85f146b8f1d66a754c6a56c",
	      "salesforce_user_id": 15228103840,
	      "additional_fields": {
			"Company Name": "Call Tracking Company",
			"Contact Person": "Jeremy Helms"
	      },
	      "recording": "https://app.whatconverts.com/recording/13451345/download",
	      "play_recording": "https://app.whatconverts.com/recording/13451345/play"
	    },
	    ...
	  ]
	}
	

Get Single Lead

Get details about a single lead.

Resource Details

Method Endpoint
GET https://app.whatconverts.com/api/v1/leads/{lead_id}

Supported Parameters

No supported parameters.

Response Details

Includes all response details from get all leads resource.

Create New Lead

Create a new lead.

Resource Details

Method Endpoint
POST https://app.whatconverts.com/api/v1/leads

Supported Parameters

Parameter Type Description Required
profile_id number Unique identifier for the profile in which to add this lead to. Profile ID is not required when using a Profile Key. Yes
lead_type string Lead type for this lead; chat, email, event, other, phone_call, text_message, transaction or web_form. Yes
date_created string Date and time when the lead was created in ISO 8601 format (UTC); 2015-11-10T00:00:00Z. No
quotable string The quotable type for this lead; yes, no, pending or not_set. No
quote_value number The quote value for this lead. No
sales_value number The sales value for this lead. No
lead_source string The lead source for this lead. No
lead_medium string The lead medium for this lead. No
lead_campaign string The lead campaign for this lead. No
lead_content string The lead content for this lead. No
lead_keyword string The lead keyword for this lead. No
ip_address string The user IP address for this lead. No
gclid string The Google click identifier for the lead. No
msclkid string The Microsoft click identifier for the lead. No
lead_url string The URL where the lead took place. No
landing_url string The URL where the user arrived on the website. No
form_name string The name of the form for this lead. Applicable to web_form lead type. No
phone_name string The name of the tracking number for this lead. Applicable to phone_call and text_message lead type. No
tracking_number string The E.164 formatted tracking number for this lead. Applicable to phone_call and text_message lead type. No
destination_number string The E.164 formatted destination number for this lead. Applicable to phone_call lead type. No
caller_number string The E.164 formatted caller’s number for this lead. Applicable to phone_call lead type. No
call_duration_seconds number The duration of the call in seconds for this lead. Applicable to phone_call lead type. No
caller_city string The caller’s city for this lead. Applicable to phone_call and text_message lead type. No
caller_zip string The caller’s zip for this lead. Applicable to phone_call and text_message lead type. No
caller_state string The caller’s state for this lead. Applicable to phone_call and text_message lead type. No
caller_country string The two-letter ISO country code of the caller for this lead. Applicable to phone_call and text_message lead type. No
answer_status string The answer status for this lead; Answered, No Answer, or Busy. Applicable to phone_call lead type. No
line_type string The line type of the caller for this lead. Applicable to phone_call and text_message lead type. No
message string The message sent by the caller for the lead. Applicable to text_message lead type.
event_category string The event category value for this lead. Applicable to event lead type. No
event_action string The event action value for this lead. Applicable to event lead type. No
event_label string The event label value for this lead. Applicable to event lead type. No
transaction_id string The transaction id value for this lead. Applicable to transaction lead type. No
transaction_tax number The transaction tax value for this lead. Applicable to transaction lead type. No
transaction_shipping number The transaction shipping value for this lead. Applicable to transaction lead type. No
additional_fields array Additional fields for this lead; additional_fields[{field_name}]. No

Response Details

Parameter Type Description
lead_id number Unique identifier for the lead created.

Example Response

	{
	  "account_id": 13744,
	  "profile_id": 42167,
	  "profile": "WhatConverts",
	  "lead_id": 148099,
	  "user_id": "51497-af17340d-62b8-3044-423f-3dc754e621c2",
	  "lead_type": "Phone Call",
	  "lead_status": "Repeat",
	  "date_created": "2016-01-25T16:21:22Z",
	  "quotable": "Yes",
	  "quote_value": 251,
	  "sales_value": 750,
	  "lead_source": "google",
	  "lead_medium": "cpc",
	  "lead_campaign": "call tracking general",
	  "lead_content": "easy call tracking",
	  "lead_keyword": "call tracking",
	  "lead_url": "https://www.whatconverts.com/contact",
	  "landing_url": "https://www.whatconverts.com/",
	  "spam": false,
	  "duplicate": false,
	  "tracking_number": "+17047349155",
	  "destination_number": "+17045436123",
	  "caller_country": "US",
	  "caller_state": "NC",
	  "caller_zip": "28226",
	  "caller_name": "Jeremy Helms",
	  "call_duration": "2 minutes and 55 seconds",
	  "call_duration_seconds": 175,
	  "caller_city": "Charlotte",
	  "answer_status": "Answered",
	  "call_status": "Completed",
	  "line_type": "Landline",
	  "caller_number": "+15432245114",
	  "phone_name": "Tracking Number",
	  "message": "Hello, I am interested in buying your products.",
	  "ip_address": "157.212.71.198",
	  "gclid": "CLibmtmqpNICFcSfGwodQbUAvg",
	  "msclkid": "25d83debf85f146b8f1d66a754c6a56c",
	  "salesforce_user_id": 15228103840,
	  "additional_fields": {
	    "Company Name": "Call Tracking Company",
	    "Contact Person": "Jeremy Helms"
	  },
	  "recording": "https://app.whatconverts.com/recording/13451345/download",
	  "play_recording": "https://app.whatconverts.com/recording/13451345/play"
	}
	

Edit Lead

Edit details for a single lead.

Resource Details

Method Endpoint
POST https://app.whatconverts.com/api/v1/leads/{lead_id}

Supported Parameters

Parameter Type Description Required
quotable string The quotable type for this lead; yes, no, pending or not_set. No
quote_value number The quote value for this lead. No
sales_value number The sales value for this lead. No
lead_source string The lead source for this lead. No
lead_medium string The lead medium for this lead. No
lead_campaign string The lead campaign for this lead. No
lead_content string The lead content for this lead. No
lead_keyword string The lead keyword for this lead. No
ip_address string The user IP address for this lead. No
lead_url string The URL where the lead took place. No
landing_url string The URL where the user arrived on the website. No
additional_fields array Additional fields for this lead; additional_fields[{field_name}]. No

Response Details

Parameter Type Description
lead_id number Unique identifier for the edited lead.

Example Response

	{
		"account_id": 13744,
		"profile_id": 42167,
		"profile": "WhatConverts",
		"lead_id": 148099,
		"user_id": "51497-af17340d-62b8-3044-423f-3dc754e621c2",
		"lead_type": "Phone Call",
		"lead_status": "Repeat",
		"date_created": "2016-01-25T16:21:22Z",
		"quotable": "Yes",
		"quote_value": 251,
		"sales_value": 750,
		"lead_source": "google",
		"lead_medium": "cpc",
		"lead_campaign": "call tracking general",
		"lead_content": "easy call tracking",
		"lead_keyword": "call tracking",
		"lead_url": "https://www.whatconverts.com/contact",
		"landing_url": "https://www.whatconverts.com/",
		"spam": false,
		"duplicate": false,
		"tracking_number": "+17047349155",
		"destination_number": "+17045436123",
		"caller_country": "US",
		"caller_state": "NC",
		"caller_zip": "28226",
		"caller_name": "Jeremy Helms",
		"call_duration": "2 minutes and 55 seconds",
		"call_duration_seconds": 175,
		"caller_city": "Charlotte",
		"answer_status": "Answered",
		"call_status": "Completed",
		"line_type": "Landline",
		"caller_number": "+15432245114",
		"phone_name": "Tracking Number",
		"message": "Hello, I am interested in buying your products.",
		"ip_address": "157.212.71.198",
		"gclid": "CLibmtmqpNICFcSfGwodQbUAvg",
		"msclkid": "25d83debf85f146b8f1d66a754c6a56c",
		"salesforce_user_id": 15228103840,
		"additional_fields": {
			"Company Name": "Call Tracking Company",
			"Contact Person": "Jeremy Helms"
		},
		"recording": "https://app.whatconverts.com/recording/13451345/download",
		"play_recording": "https://app.whatconverts.com/recording/13451345/play"
	}