Skip to main content

Setting Up a Lead Post API

Creating a New Destination

  1. Navigate to https://app.leadstreams.co/destinations
  2. Either:
    • Find your existing campaign and create a destination for it
    • Click "New Destination" and select your campaign

Choosing Integration Type

Note: While we offer both no-code and Lead Post Webhook options, no-code integrations are temporarily paused for optimization.

Select "Lead Post Webhook" as your integration type.

Configuring Your Webhook

Basic Configuration

  1. Type: Select "Data Post"
  2. Method: Choose your preferred HTTP method
  3. Endpoint URL: Enter your API endpoint

Content Type Options

FormatDescription
Form DataSends data as multipart/form-data
JSONSends data as application/json
URL EncodedSends data as application/x-www-form-urlencoded
XMLSends data as application/xml

Custom Headers

You can add custom headers if needed for authentication or other purposes.

JSON Properties

When using JSON format, you can map our variables to your required property names:

  • Key: Your required property name
  • Value: Either a static string or a variable in the format {variable}

Available Variables

Use these variables in your JSON properties by wrapping them in curly braces, e.g., {email}

Tip: For detailed information about variable formats and examples, see our Properties Reference Guide.

The Lead Post API accepts a comprehensive set of variables that can be used to enrich and qualify leads. Below is the complete list of available variables:

PropertyValuesValue TypeDescription
{first_name}-stringLead's first name
{last_name}-stringLead's last name
{email}-stringValid email address
{phone}-stringValid phone number
{campaign_id}-stringCampaign identifier
{created_at}YYYY-MM-DD HH:mm:ssdatetimeLead creation timestamp
{ip_address}-stringLead's IP address
{address}-stringStreet address
{city}-stringCity name
{state}-stringState/province
{zip}99999stringPostal code
{country}USstringCountry name
{phone_formatted}-stringFormatted phone number
{email_confidence_match}0-100numberEmail confidence score
{age}0-120numberAge
{gender}Male, FemalestringGender
{income_hh}see allstringHousehold income
{marital_status}see allstringMarital status
{education}see allstringEducation level
{lat}-90 to 90numberLatitude
{lon}-180 to 180numberLongitude
{timezone}-stringTimezone
{country_code}USstringCountry code
{user_agent}-stringBrowser user agent
{trusted_form_url}-stringTrustedForm certificate URL
{consent_date}YYYY-MM-DD HH:mm:ssdatetimeConsent timestamp
{verified_phone}0, 1booleanPhone verification status
{verified_email}0, 1booleanEmail verification status
{ethnic_group}see allstringEthnic group identification
{generation}see allstringGenerational category
{political_party}see allstringPolitical party affiliation
{religion}see allstringReligious affiliation
{education_ordinal}1-10numberNumeric education level
{white_collar}0, 1booleanWhite collar occupation indicator
{blue_collar}0, 1booleanBlue collar occupation indicator
{birth_year}YYYYnumberYear of birth
{personality}see allstringPersonality type
{income_levels}see allstringIncome bracket categorization
{credit_range}see allstringCredit score range
{net_worth_hh}see allstringHousehold net worth
{credit_card}0, 1booleanCredit card ownership status
{owns_investments}0, 1booleanInvestment ownership indicator
{owns_stocks_and_bonds}0, 1booleanStock/bond ownership indicator
{political_contributor}0, 1booleanPolitical contribution history
{home_owner}0, 1booleanHome ownership status
{dwelling_type}see allstringType of residence
{length_of_residence}0-100numberDuration at current residence (years)
{home_value}see allstringEstimated home value
{mortgage_amount}see allstringMortgage amount if applicable
{mortgage_loan_type}see allstringType of mortgage loan
{children_hh}0, 1booleanPresence of children in household
{num_generations_hh}1-5numberNumber of generations in household
{veteran_hh}0, 1booleanVeteran presence in household
{num_persons_hh}1-20numberTotal persons in household
{num_adults_hh}1-10numberNumber of adults in household
{num_children_hh}0-10numberNumber of children in household
{child_aged_0_3_hh}0, 1booleanChildren aged 0-3 in household
{child_aged_4_6_hh}0, 1booleanChildren aged 4-6 in household
{child_aged_7_9_hh}0, 1booleanChildren aged 7-9 in household
{child_aged_10_12_hh}0, 1booleanChildren aged 10-12 in household
{child_aged_13_18_hh}0, 1booleanChildren aged 13-18 in household
{number_of_vehicles_in_hh}0-10numberNumber of vehicles in household
{investment_type}see allstringType of investments preferred
{phone_voip}0, 1booleanPhone is VoIP
{phone_carrier}-stringPhone carrier name
{phone_type}mobile, landline, etcstringType of phone
{phone_dialing_code}-stringPhone dialing code
{phone_do_not_call}0, 1booleanPhone is on do not call list
{phone_activity}active, inactivestringPhone activity status
{phone_is_callable}0, 1booleanPhone can be called
{phone_can_receive_texts}0, 1booleanPhone can receive texts
{email_array}-arrayArray of associated emails
{phone_array}-arrayArray of associated phones
{custom_one}-stringCustom field 1
{custom_two}-stringCustom field 2
{custom_three}-stringCustom field 3
{custom_four}-stringCustom field 4
{custom_five}-stringCustom field 5

Note: This is a subset of available variables. For a complete list of variables and their formats, see our Properties Reference Guide. For implementation support, contact our support team.

Testing and Response Validation

After saving your webhook configuration, you'll have access to two important features:

  1. Test Lead Sending: You can send a test lead to verify your webhook integration is working correctly.

  2. Response Validation: Configure how LeadStreams should interpret the responses from your endpoint:

    • Response Format: Choose the format of the expected response (e.g., JSON)
    • Response Field: Specify the field to validate (e.g., status or data.status)
    • Response Operator: Select how to compare the field value (e.g., Equals)
    • Success Value: Define what value indicates a successful post (e.g., success)

This validation ensures LeadStreams can properly track successful lead deliveries and handle any potential errors.

Example Response Validation

If your endpoint returns a response like:

{
"status": "success",
"message": "Lead received successfully"
}

You would configure the validation as:

  • Response Format: Json
  • Response Field: status
  • Response Operator: Equals
  • Success Value: success

Testing Your Integration

After configuration:

  1. Save your webhook settings
  2. Use the "Test" button to send a sample lead
  3. Check your endpoint for the test data
  4. Verify the data mapping is correct

Support

Need help?