Introducing API Filters: Advanced Lead Flow Filtering for Your Campaigns

At Lead Prosper, we are always looking for ways to give you more control over your lead flow. To that end, we’re excited to introduce API Filters, a powerful new feature designed to provide dynamic filtering at every stage of your campaign.


With API Filters, you can allow or block leads at a Global, Supplier, or Buyer level based on real-time responses from any external API endpoint. This means you can integrate third-party services—such as lead scoring providers, compliance databases, or fraud detection tools—directly into your campaign’s filtering logic.


Additionally, API Filters support customizable threshold conditions, giving you precise control over which leads are accepted or rejected. For example, if your third-party lead scoring solution returns a numerical score, you can configure the filter to:

  • Accept leads with a score greater than or equal to a specified value
  • Reject leads with a score less than or equal to a threshold
  • Accept only leads that fall within a specific range

This flexibility ensures that only the most qualified and compliant leads make it through your campaign, optimizing performance and maximizing ROI.


In the following sections, we’ll walk you through how to configure API Filters, connect external endpoints, and fine-tune your filtering conditions for the best results.


How API Filters Work


Setting up an API Filter is just as straightforward as adding any other filter in Lead Prosper. You can configure it at the Campaign level or for an individual Supplier or Buyer. To get started, navigate to the Filters section, click the blue "Add+" button, and select API Filters. A setup window will appear, guiding you through the configuration process.

Step 1: Define When the Filter Runs

API Filters can be triggered at different points in your campaign flow, depending on your setup:

  • Pre-Ping – Runs the filter when a pre-ping duplicate check is performed (for direct post campaigns).
  • PING – Runs the filter when a PING request is sent from a Supplier to your campaign (for Ping/Post Exchanges).
  • POST – Runs the filter whenever a Supplier sends a POST request to your campaign.

Selecting the appropriate step ensures the filter evaluates leads at the most relevant stage.


Step 2: Configure the API Request (Payload Setup)

Just like setting up a Buyer or Campaign trigger, you’ll need to define your payload—the data sent to the external API. This includes:

  • Post URL – The endpoint you’re connecting to.
  • Request Method – Choose between GET, POST, or PUT.
  • Payload Type – FORM, JSON, or XML.
  • HTTP Timeout – Set a specific time limit for when we should drop the connection for this request.
  • Payload Body - Set up your payload for your API request. This can include campaign fields and system fields, and you can apply any transformers necessary here as well.
  • Headers - include any additional headers for the API call, such as Auth tokens or Accept formatting.

Important: The data points in the payload must be available at the step the filter is being applied. For example, if you’re running a Pre-Ping filter to check a phone number, but your Supplier doesn’t provide the phone number in that step, the filter won’t execute.


Step 3: Map API Responses & Set Conditions

Once the API returns a response, you need to define how the filter interprets the data. This is done through Response Mapping, where you can determine the Action for whether a lead should be Allowed or Blocked based on the API’s reply.

You can set conditions using various logic options:

  • Key Equal With – Action triggers if the key and value match exactly.
  • Key Contains – Triggers if the key contains a specific value (without requiring an exact match).
  • Key Is One Of – Triggers if the key contains one of multiple specified values.
  • Key Greater or Equal – Triggers if the key’s value is greater than or equal to a specified threshold.
  • Key Less or Equal – Triggers if the key’s value is less than or equal to a specified threshold.
  • Key Is Between – Triggers if the key’s value falls within a defined range.
  • Response Contains – Triggers if the API response contains a specified string (searches the full response body, not just a key).
  • HTTP Status Code Is – Triggers if the returned HTTP status code matches a specific value.

For added flexibility, you can also define a custom error message to be returned in the Supplier API response when a lead is blocked so that you can provide a bit more detail to the Supplier as to why the lead failed.


Once you've finished setting up your API Filter, click Save to store your configuration.

Before activating your filter, we highly recommend testing it to ensure it functions as expected. To do this, click the Test button. This will take you to a testing interface similar to our Test Buyer tool, where you can run a test to validate that:

  • The payload is correctly structured and sent as intended.
  • The API response is received properly.
  • The filter allows or blocks leads based on your configured conditions.

By default, all newly created API Filters are set to Paused to prevent potential misconfigurations from disrupting your campaign. Because API Filters have the power to block leads at multiple levels (Global, Supplier, or Buyer), an incorrect setup could result in all leads being rejected.

To avoid unintended filtering issues, be sure to thoroughly test your API Filter and confirm that everything is working correctly before setting it live. Once validated, you can activate the filter with confidence, ensuring seamless lead processing.


Enhance Lead Filtering with API Data


By leveraging API Filters, you gain real-time, automated control over which leads flow through your campaign. Whether you’re integrating fraud prevention, lead scoring, or compliance verification, this feature ensures your campaigns receive only the highest-quality leads.

Now that you understand how to configure API Filters, explore how they can optimize your lead qualification process and enhance campaign performance. If you need further assistance, our support team is always here to help!

Still need help? Contact Us Contact Us