Original API – Hooks

LeadDesk hooks are simple callout urls which are called as a part of a user made request, such as a contact list import. Hooks consists of the three parameters: call-out URL, target and event. If hook is contact list related, the target could be callinglist. If hook is related to importing a contact list, then event could be import or add. Hooks supports tags inside the URL-parameter, in other words data like agent id and calling list id can be automatically transmitted as a part of the call-out. Example use case: Client wanted 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 the other parts of the Original API. Example hook url: http://example.com/?agent_id={agent.id}&calling_list_id={calling_list.id}

Configuring a hook

Hook configuration consists of three parameters:

Column Description
url Hook url, see above Example hook url
target See Target below in the Supported hook events section. Example: callinglist
event See Event below in the Supported hook events section. Example: 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.

Supported hook events

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}