Webhooks


LeadDesk hooks are simple callout URLs which are called as a part of a user-made request, such as a contact list import.

Example use case: Perhaps you might want to reorder a contact list right after it was imported. This can be achieved by adding a hook to the contact list add -event and other parts of the Original API.

Supported hook events

Hooks are used to respond to specific events. The type of event you are responding to will determine the availability of specific URL tags the hook can use. For example, the tag {calling_list.id} is available only to callinglist hooks, not to campaign hooks.

This table shows a list of the type of events a hook can respond to, and any corresponding URL tags:

Target Event Description Hook specific URL tags
callinglist import Hook is called when a new contact list has been created by import {calling_list.id}
callinglist add Hook is called when a new contact list has been imported and added to another contact list {calling_list.id}
callinglist delete Hook is called when a contact list has been deleted {calling_list.id}
campaigns create Called when a new campaign is created, even through copying and old campaign {campaign.id} = newly created campaign id

{campaign.copy_of} = id of the original campaign from where the new one was copied. Empty string if not a copy.

campaigns delete Called when campaign is deleted {campaign.id} = deleted campaign id

Configuring a hook

To configure the hook, you need to provide three parameters:

Column Description Example
url Hook URL http://example.com/?agent_id={agent.id}&calling_list_id={calling_list.id}
target The target based on the event being responded to. callinglist
event The event being responded to. import

 

Supported tags in the URL -parameter

This table contains a list of tags which will be automatically replaced by corresponding values.

Tag Description
{client.id} Client id
{client.identification} Client identification hash (md5)
{client.name} Client name
{agent.id} Agent id
{agent.name} Agent name
{agent.username} Agent username
{agent.lang} Agent language id
{agent.email} Agent email

Also other agent columns are available, the most common ones are listed above, if required please contact our support for the exhaustive list.