Quick reference

Activation

Endpoint

POST https://pygration.leaddesk.com/leadapps_proxy/api/activate/

Request Body

Config Object: Page
{
    "height": 700,
    "location": "dashboard",
    "name": "My Lead App Name",
    "sandbox": "allow-forms allow-popups",
    "url": "https://www.example.com/my/lead/app"
}
  • height: the height of the iframe that loads the app in pixels.
  • name: the lead app name. This is mandatory.
  • location: where the lead app will be loaded, which differs depending on the activation type. Location must be one of the following values: dashboard, statistics, campaigns, agents_mng, calling_list_management, product, b2b_mng, qatab, inbound, general_settings. This is mandatory.
  • url: the app URL. This is mandatory.
  • sandbox: the iframe sandbox attributes. Multiple values could be sent separated by space. Values: allow-forms, allow-pointer-lock, allow-popups, allow-same-origin, allow-scripts, allow-top-navigation.
Config Object: Page Block
{
    "height": 300,
    "location": "campaign-editor",
    "name": "My Lead App Name",
    "sandbox": "allow-forms allow-popups",
    "url": "https://www.example.com/my/lead/app"
}
  • height: the height of the iframe that loads the app in pixels.
  • name: the lead app name. This is mandatory.
  • location: where the lead app will be loaded, which differs depending on the activation type. Location must be one of the following values: campaign-editor. This is mandatory.
  • url: the app URL. This is mandatory.
  • sandbox: the iframe sandbox attributes. Multiple values could be sent separated by space. Values: allow-forms, allow-pointer-lock, allow-popups, allow-same-origin, allow-scripts, allow-top-navigation.
Config Object: App Function
{
    "height": 700,
    "width": 700,
    "icon": "https://www.example.com/my/lead/app/icon.png",
    "location": "admin.contact-lists.toolbar",
    "name": "My Lead App Name",
    "sandbox": "allow-forms allow-popups",
    "url": "https://www.example.com/my/lead/app"
}
  • height: the height of the iframe that loads the app in pixels.
  • width: the width of the iframe that loads the app in pixels.
  • name: the lead app name. This is mandatory.
  • location: where the lead app will be loaded, which differs depending on the activation type. Location must be one of the following values: admin.contact-lists.toolbar, admin.campaign-list.toolbar. This is mandatory.
  • url: the app URL. This is mandatory.
  • sandbox: the iframe sandbox attributes. Multiple values could be sent separated by space. Values: allow-forms, allow-pointer-lock, allow-popups, allow-same-origin, allow-scripts, allow-top-navigation.
  • icon: this value can point directly to an URL holding the icon image, or the other option is to create JSON object like so:
{
    "url": "",
    "icon": "glyphicon",
    "iconColor": ""
}

API Responses

Successful Operation (Code: 200)
{
    "success": true,
    "entity_id": 0,
    "message": "..."
}
Bad Request (Code: 400) – Not valid API key or missing values
{
    "success": false,
    "message": "..."
}
API Unreachable (Code: 503)
{
    "success": false,
    "error": "api_call_fail",
    "message": "..."
}

Return

Your activation script must return:

On Success
{
    "success": true,
    "message": "Custom message to be displayed to customer"
}
On Failure
{
    "success": false,
    "message": "Custom message to be displayed to customer"
}
Optionally On Success – Redirect URL
{
    "success": true,
    "message": "Custom message to be displayed to customer",
    "redirect": "https://www.example.com"
}