{"_id":"572b91ccff3ba10e00b4abb6","__v":7,"user":"55aa7d625d3abb0d0012f3da","category":{"_id":"572b9137ff3ba10e00b4abb4","project":"55aa7d973be8f60d00041d42","__v":0,"version":"55aa7d983be8f60d00041d45","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-05T18:30:15.702Z","from_sync":false,"order":2,"slug":"webhook","title":"WebHook"},"project":"55aa7d973be8f60d00041d42","parentDoc":null,"githubsync":"","version":{"_id":"55aa7d983be8f60d00041d45","__v":20,"project":"55aa7d973be8f60d00041d42","createdAt":"2015-07-18T16:23:52.273Z","releaseDate":"2015-07-18T16:23:52.273Z","categories":["55aa7d983be8f60d00041d46","55aacf4e3be8f60d00041d89","55aacfaae2bdcb0d00c7466e","55aacfb3e2bdcb0d00c7466f","55aacfca3be8f60d00041d8a","55b67da3f8105a2f00c351ab","55b7cae4aea7c8190058ba5b","55b9218afeef5135009b7db3","55c182616d7d2921006da013","5631407afa40240d007c8c60","56548b9c9c4c6d0d00aeda0c","572b9137ff3ba10e00b4abb4","572b9150ff3ba10e00b4abb5","581b83288ca41f0f007e4fb6","585065fa70cbe00f00835bb8","58641eba0355f31900380492","58861760b4816e19005c9941","58a316cb254c401b00a049ce","58ac80dbd5e1570f00d1c328","59f72b4991121a00104f036e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-05T18:32:44.550Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuring your WebHook to receive new Leads.\"\n}\n[/block]\nFirst start by going to Company -> Account Info -> Advanced Info -> Configure WebHook\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/8IyvgtJLT66pKK8nJMCw_tuto.png\",\n        \"tuto.png\",\n        \"1439\",\n        \"682\",\n        \"#37b4a9\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nNow, configure your endpoint URL.\nAfter configuring it and clicking on \"Generate Webhook\", you'll recieve a key, which will be used for security proposes.\n\nThis key's propose is for you to verify who is sending data to your WebHook. This key will be inside the JSON you'll receive. A good practice would be for you to check that the key received in your endpoint is the same as the one we'll send you.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/cWZfNnzSVmKsKMbClYXA_tuto1.png\",\n        \"tuto1.png\",\n        \"1439\",\n        \"686\",\n        \"#38bc96\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nIf everything's correctly configured, you should start receiving new leads to your endpoint in JSON format. \n\nBelow, you can see an example of the JSON you'll receive.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"id\\\":\\\"572cf22811d2720c82713\\\",\\n   \\\"status\\\":\\\"new\\\",\\n   \\\"name\\\":\\\"Test\\\",\\n   \\\"email\\\":\\\"example:::at:::cliengo.com\\\",\\n   \\\"phone\\\":\\\"1341341341\\\",\\n   \\\"creationDate\\\":\\\"2016-05-06T19:36:08.058Z\\\",\\n   \\\"websiteId\\\":\\\"id website\\\",\\n   \\\"websiteUrl\\\":\\\"web.cliengo.com/\\\",\\n   \\\"webhookKey\\\":\\\"cfa6aaf6-ejemplo-adf14rf-1fgji1\\\",\\n   \\\"ip\\\":\\\"XXX.XXX.XXX.XX\\\",\\n   \\\"conversionUrl\\\":\\\"http://www.cliengo.com/\\\",\\n   \\\"landingUrl\\\":\\\"direct\\\",\\n   \\\"message\\\":\\\"Mensaje del cliente\\\",\\n \\t \\\"duplicatedContact\\\":false,\\n   \\\"source\\\":\\\"Google\\\",\\n   \\\"geoip\\\":{  \\n      \\\"latitude\\\":\\\"-34.6033\\\",\\n      \\\"longitude\\\":\\\"-58.3816\\\",\\n      \\\"country\\\":\\\"Argentina\\\",\\n      \\\"city\\\":\\\"Buenos Aires\\\",\\n      \\\"zipCode\\\":\\\"1871\\\",\\n   },\\n   \\\"notes\\\":[  \\n\\n   ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"How to configure a WebHook  on Leadaki.","slug":"webhooks-configuration","type":"basic","title":"WebHooks configuration"}

WebHooks configuration

How to configure a WebHook on Leadaki.

[block:api-header] { "type": "basic", "title": "Configuring your WebHook to receive new Leads." } [/block] First start by going to Company -> Account Info -> Advanced Info -> Configure WebHook [block:image] { "images": [ { "image": [ "https://files.readme.io/8IyvgtJLT66pKK8nJMCw_tuto.png", "tuto.png", "1439", "682", "#37b4a9", "" ] } ] } [/block] Now, configure your endpoint URL. After configuring it and clicking on "Generate Webhook", you'll recieve a key, which will be used for security proposes. This key's propose is for you to verify who is sending data to your WebHook. This key will be inside the JSON you'll receive. A good practice would be for you to check that the key received in your endpoint is the same as the one we'll send you. [block:image] { "images": [ { "image": [ "https://files.readme.io/cWZfNnzSVmKsKMbClYXA_tuto1.png", "tuto1.png", "1439", "686", "#38bc96", "" ] } ] } [/block] If everything's correctly configured, you should start receiving new leads to your endpoint in JSON format. Below, you can see an example of the JSON you'll receive. [block:code] { "codes": [ { "code": "{ \n \"id\":\"572cf22811d2720c82713\",\n \"status\":\"new\",\n \"name\":\"Test\",\n \"email\":\"example@cliengo.com\",\n \"phone\":\"1341341341\",\n \"creationDate\":\"2016-05-06T19:36:08.058Z\",\n \"websiteId\":\"id website\",\n \"websiteUrl\":\"web.cliengo.com/\",\n \"webhookKey\":\"cfa6aaf6-ejemplo-adf14rf-1fgji1\",\n \"ip\":\"XXX.XXX.XXX.XX\",\n \"conversionUrl\":\"http://www.cliengo.com/\",\n \"landingUrl\":\"direct\",\n \"message\":\"Mensaje del cliente\",\n \t \"duplicatedContact\":false,\n \"source\":\"Google\",\n \"geoip\":{ \n \"latitude\":\"-34.6033\",\n \"longitude\":\"-58.3816\",\n \"country\":\"Argentina\",\n \"city\":\"Buenos Aires\",\n \"zipCode\":\"1871\",\n },\n \"notes\":[ \n\n ]\n}", "language": "json" } ] } [/block]