Skip to main content
Reject API

Reject leads using our API.

James Dodd avatar
Written by James Dodd
Updated over 2 years ago

Please Notes: This doc is intended for developers, so you'll either need to know a bit of programming to achieve this, or know someone who does.
​

If you need to commission Databowl to integrate this with your system, just open a new chat with us and we'll discuss.

Getting Started

To Reject leads using our API, first we need to make an HTTP POST request to:

https://{instance}.databowl.com/api/v1/lead-status/reject/{lead_id}

Replace {instance} with the name of your Databowl instance

And replace {lead_id} with the lead ID that you wish to reject.

The Details

Your post request must contain the following parameters as form-data

key

This is your API Key, you will need to ask us to supply this to you.

If you already have a Key for the lead update API, this is the same one.

Notes: It differs from the API keys in your dashboard as they are for validation

reason

This is the reason for rejection, it accepts a string.

This can be anything you need, but some good examples can include:

  • DUPLICATE lead

  • invalid EMAIL

  • out of DOB range

  • out of supported LOCATION

Example

The following PHP code, should give a good example of how to work with this API:

<?php

$key = ''; // your API key
$instance = ''; // your instance name
$leadid = ''; // your lead id to update
$reason = ''; // your rejection reason


$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://'.$instance.'.databowl.com/api/v1/lead-status/reject/'.$leadid,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('key' => $key,'reason' => $reason),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


πŸš€ Need More assistance?

If you're stuck or if this isn't something you or your team is comfortable with, then please open a new chat/ticket (chat icon in the bottom right of the screen) or email support@databowl.com.

We're here to assist with any questions you have, and if required we can quote on actioning work like this for as part of our Marketing Services.

Did this answer your question?