Test With a Real Lead
The easiest way to test a new webhook is to enable it and add a test lead. The response from the receiving application is saved on the lead's audit trail (see Responses & Troubleshooting).
A webhook lets Leadtrekker send the details of every new lead to another application as soon as the lead is created, for example a CRM, an automation platform such as Zapier, Make or Integrately, or a system you have built yourself.
You give Leadtrekker the URL of the receiving application and choose which lead fields to send and what to call them. Leadtrekker then makes an HTTP request to that URL with the chosen fields every time a new lead is added to your account.
Webhooks send data out of Leadtrekker. To send leads into Leadtrekker, use the Leadtrekker API instead.
A webhook is called once for every new lead created on your account, no matter how the lead was added (for example from a website form, the API, a landing page or manually in Leadtrekker).
Webhooks are managed under Settings > Integrations > Webhooks in Leadtrekker.
The easiest way to test a new webhook is to enable it and add a test lead. The response from the receiving application is saved on the lead's audit trail (see Responses & Troubleshooting).
Only the fields that you map are sent. For each field you choose a Leadtrekker lead field and the webhook field name that the receiving application expects, for example Lead Name → first_name.
Email and email are different fields.| Lead Field | Value Sent |
|---|---|
| Lead ID | The lead's unique Leadtrekker ID, for example 994913. |
| Lead Name | The name of the lead. |
| Lead Number | The lead's phone number. |
| Lead Email | The lead's email address. |
| Lead Company | The lead's company name. |
| Lead Source | The name of the lead's source, for example Website. |
| Lead Status | The name of the lead's status when it was created, for example Pending. |
| Custom fields | Any custom field configured on your account. The lead's value for that custom field is sent. If the lead has no value for it, the field is left out of the request. |
Leadtrekker sends the mapped fields in the body of the request, encoded as multipart/form-data, in the same way that a web form with those field names would be submitted. The fields are not sent as JSON.
For example, with the mappings Lead Name → first_name, Lead Email → email and Lead Source → source, the receiving application gets the form fields:
first_name = Jane Smith
email = jane@example.com
source = Website
Use POST. With GET, Leadtrekker still sends the fields in the request body rather than in the URL's query string, and most applications ignore the body of a GET request, so the fields would not arrive. Only choose GET if the receiving application specifically reads form data from GET requests.
Most platforms read form data automatically. If you are building the receiving end yourself in PHP, the fields arrive in $_POST:
<?php
// Leadtrekker webhook receiver
$name = isset($_POST['first_name']) ? $_POST['first_name'] : '';
$email = isset($_POST['email']) ? $_POST['email'] : '';
$source = isset($_POST['source']) ? $_POST['source'] : '';
// ... save the lead in your own system ...
echo 'OK';
Leadtrekker does not add authentication headers or a signature to webhook requests. To make sure that only Leadtrekker can post to your endpoint:
https://example.com/leadtrekker-webhook?token=YOUR-SECRET, and check it on your side.Lead details sent through a webhook leave Leadtrekker and are handled by the receiving application. Only send leads to applications and providers that you trust with your lead data.
After calling a webhook, Leadtrekker saves the receiving application's response on the lead's audit trail as "<webhook name> webhook call result: <response>." Open the lead and check its audit trail to see what the receiving application replied.
Should you experience any difficulty setting up a webhook, please contact us or send an email to support[at]leadtrekker.com.