Section 4: Lead: Retrieving data

This will allow you to retrieve the profile info of one specific lead from your contacts database. In order to do so, we will search the lead’s email with the function get_lead.

Type Parameters Values
POST get_lead Array, email is a string **

** Required: the lead’s email is required to identify the lead.

Here is an example:

'get_lead' => [
   'email' => 'JoeSmith@domain.com',


Here are the results returned by get_lead:

Parameters Values
id string
first_name string
middle_name string
last_name string
email string
date_joined string (YYYY-MM-DD HH:MM:SS)
phone_country_code string
phone string
ip string
address string
zip string
city string
state string
country string
lead_picture string (URL to lead’s thumbnail image)
score integer (lead score in points)
source string, values are:

  • ‘single-optin’ – if the lead was created by filling a single optin form.
  • ‘double-optin’ – if the lead was created by filling a double confirm optin form.
  • ‘helpdesk’ – if the lead was created by submitting a helpdesk ticket or starting a live chat.
  • ‘affiliate-signup’ – if the lead was created when by signing up as an affiliate to promote any of your products.
  • ‘checkout’ – if the lead was created upon ordering any of your product.
  • ‘import’ – if the lead was created via the import system.
  • ‘api’ – if the lead was created through the API.
  • ‘manual’ – if the lead was created manually from within your Kartra account interface.
source_id string, only for internal purposes (you can ignore)
ip_country United States
website string (URL to lead’s website)
facebook string (URL to lead’s facebook page)
twitter string (URL to lead’s twitter page)
linkedin string (URL to lead’s linkedin page)
google_plus string (URL to lead’s google+ page)
notes string
blacklisted integer, possible values

  • 0 – Lead is not blacklisted
  • 1 – Lead is blacklisted
lead_deleted integer, possible values

  • 0 – Lead is not deleted
  • 1 – Lead is deleted
lead_deleted_date string (YYYY-MM-DD HH:MM:SS)
custom_fields * array of objects with the following structure:

    "field_id":integer, // the unique id reference
    "field_identifier":string, // the unique identifier chosen when it was created
    "field_type":string, // the field type (values: input_field, text_area, drop_down,
 radio_button, checkbox)
    // the value saved for the particular lead. In the case of input_field and text_area
 this will be string, if not it will be an array with the below structure
    // in the case of checkboxes the values can be multiple
            "option_id":integer, // the unique id reference
            "option_value":string, // option value
gdpr_lead_status integer, possible values:

  • 0 – For GDPR status off – Your account has GDPR deactivated
  • 1 – For GDPR status not subject – The lead’s IP is from a country not subject to GDPR
  • 2 – For GDPR status accepted – The lead has accepted the GDPR terms
  • 3 – For GDPR status not accepted – The lead hasn’t accepted the GDPR terms
  • 4 – For GDPR status unknown – The lead’s location could not be determined
  • 5 – For GDPR status pending
gdpr_lead_status_date string (YYYY-MM-DD HH:MM:SS)
gdpr_lead_status_ip string
integer, possible values:

  • 0 – Lead hasn’t agreed to be contacted
  • 1 – Lead has agreed to be contacted
tags tag_name
lists list_name
integer (0 or 1)
sequences sequence_name
string (“active” or “unsubscribed”)
memberships name
integer (0 or 1)
transactions id
string (“Sale”, “Refund”, “Cancelation”, “Rebill” or “Chargeback”)
string (YYYY-MM-DD HH:MM:SS)


* All custom fields recorded for that particular lead will be returned, even if they are empty.


Here’s an example of success message when retrieving a lead’s data:

        "date_joined":"2019-03-26 06:35:31",
        "ip_country":"United States",
        "lead_deleted_date":"0000-00-00 00:00:00",
        "gdpr_lead_status_date":"2019-03-26 06:35:31",
                "product_name":"test product",
                "transaction_date":"2019-03-26 06:35:33"
		"field_value":"beef lasagna",


© 2020 Kartra All Rights Reserved