// account
'/api/v1/account': ['GET', 'PUT'],
'/api/v1/account/usage': ['GET'],
'/api/v1/account/invoices': ['GET'],
'/api/v1/account/invoices/([0-9]+)/download': ['GET'],
// integrations
'/app/integrations/mailchimp/authorize': ['GET'],
'/app/integrations/mailchimp/callback': ['GET'],
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$username = 'dwtgroup'; | |
$password = 'change_me'; | |
$expire = date("c",strtotime("+1 day")); | |
$alg = 'sha256'; | |
// generate authorization | |
$authorization = "$username;$expire;$alg"; | |
$authorization = $authorization . ";" . hash_hmac($alg, $authorization, $password); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>LeadBI Form Events </title> | |
</head> | |
<body onload="_load()" style="height: 2000px"> | |
<h1>LeadBI Form Events</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // SwiftMTA.php | |
class SwiftMTALogsCursor { | |
/** | |
* Create result cursor | |
*/ | |
public function __construct($api, $query, $result, $limit, $offset){ | |
$this->api = $api; | |
$this->limit = $limit; |
When webhooks are used inside an automation, the engine will replace all email placeholders in the url and make a POST request with the content type application/json containing the following data:
// sample data
{
// contact
id: 121324,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
HTML Integration | |
Capture form data without javascript (html only) | |
More documentation: https://gist.github.com/leadbi/a458eb881007c800c045cabfd98ac8af | |
--> | |
<!-- the form id is used to capture data only from specific forms --> | |
<form id="optional-id"> | |
<input type="text" name="firstname"><br> | |
<input type="text" name="lastname"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var form_id = 3; | |
// listen to all ajax completed events | |
jQuery(document).ajaxComplete(function (event, jqXHR, ajaxOptions) { | |
// try to parse response | |
var data = JSON.parse(jqXHR.responseText || '{}'); | |
// check if the ajax request is for our form | |
if (data.data.form_id == form_id) { |
In order to access the leadbi api you need to create a api key in the account section. After the api key is created you can make api calls using the following headers:
- X-Access-Id - api key id
- X-Access-Secret - api key secret
GET /api/v1/websites
Host: app.leadbi.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check if $leadbi_website api is available | |
if(window.$leadbi_website){ | |
// fetch user object of the current visitor | |
window.$leadbi_website.getCurrentUser(function (err, user) { | |
// call the identify api | |
// calling this method multiple times for the same email address will not create duplicate contacts | |
return user.identify({ |