{"_id":"55aa7d993be8f60d00041d48","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"## Content API Basics\nThe Cliengo Content API gives you access to the content management features you see in our web app and lets you extend them for use in your own app. It strives to be [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) and is organized around the main resources you’re familiar with from the Cliengo web interface.\n\nBefore you do anything, you should create a free Cliengo account that you can test the API against and register for an API key so that you can make API calls.\n\n## Example Requests \nSample API calls are provided next to each method using [cURL](http://curl.haxx.se/), a standard command line tool. All you need to do is drop in your specific parameters, and you can test the calls from the command line. [Here is a great tutorial on using cURL with APIs](http://httpkit.com/resources/HTTP-from-the-Command-Line/). If the command line isn’t your preference, a great alternative is [POSTMAN](https://www.box.com/blog/using-postman-to-get-started-with-the-content-api-and-view-api-2/), an easy-to-use [Chrome extension](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm/) for making HTTP requests. \n\n## Input/Output Format\nBoth request body data and response data are formatted as [JSON](http://www.json.org/). \n\n## Date Format\nAll timestamps (both those sent in requests and those returned in responses) should be formatted as shown in our examples. We support [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) timestamps. The preferred way to pass in a date is by converting the time to UTC such as this: 2013-04-17T09:12:36-00:00\n\n## gzip\nIf you would like responses from Cliengo to be compressed for faster response times, simply include an ** Accept-Encoding** header with a value of **gzip, deflate** , and responses will be [gzipped](http://en.wikipedia.org/wiki/Gzip).\n\n## CORS\n[CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing), or cross-origin resource sharing, is a mechanism that allows a web page to make XMLHttpRequests to another domain (i.e. a domain different from the one it was loaded from). CORS is supported in a [specific set of modern browsers](http://caniuse.com/cors). The Cliengo API supports CORS.\n\n## Pagination\nEndpoints that return arrays support **limit** and **offset** as URL parameters. **Limit** defines the maximum number of records that will be returned on a page. The number of records is not guaranteed to be the number specified as visibility rules may filter out items. To avoid duplicates being returned we recommend the following logic:\n\n  * To retrieve the next page, set offset=offset+limit\n  * If total count from previous response is >= the new offset, you are done, no need to ask for another page\n\nNote that **offset** is zero based, defaults for **limit** vary by endpoint.\n\n## Upcoming Changes \nWe are always maintaining, fixing, and enhancing our API. As such, you should expect new endpoints to show up, new fields to be added to responses and new error codes to appear. We recommend that you build your code to gracefully ignore things that you aren’t expecting, and to handle errors in standard HTTP-centric ways.\n\n\n## Getting Help\nTo get in touch with our API experts directly, please submit a support ticket.\n\nFor community support, please use the cliengo-api tag on StackOverflow for any questions or suggestions.","createdAt":"2015-07-18T16:23:53.557Z","excerpt":"This page will help you get started with Cliengo. You'll be up and running in a minute!","hidden":false,"order":0,"project":"55aa7d973be8f60d00041d42","updates":[],"githubsync":"","title":"Overview","type":"basic","version":"55aa7d983be8f60d00041d45","__v":14,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"parentDoc":null,"sync_unique":"","user":"55aa7d625d3abb0d0012f3da","category":"55aa7d983be8f60d00041d46","isReference":false,"slug":"getting-started","childrenPages":[]}

Overview

This page will help you get started with Cliengo. You'll be up and running in a minute!

## Content API Basics The Cliengo Content API gives you access to the content management features you see in our web app and lets you extend them for use in your own app. It strives to be [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) and is organized around the main resources you’re familiar with from the Cliengo web interface. Before you do anything, you should create a free Cliengo account that you can test the API against and register for an API key so that you can make API calls. ## Example Requests Sample API calls are provided next to each method using [cURL](http://curl.haxx.se/), a standard command line tool. All you need to do is drop in your specific parameters, and you can test the calls from the command line. [Here is a great tutorial on using cURL with APIs](http://httpkit.com/resources/HTTP-from-the-Command-Line/). If the command line isn’t your preference, a great alternative is [POSTMAN](https://www.box.com/blog/using-postman-to-get-started-with-the-content-api-and-view-api-2/), an easy-to-use [Chrome extension](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm/) for making HTTP requests. ## Input/Output Format Both request body data and response data are formatted as [JSON](http://www.json.org/). ## Date Format All timestamps (both those sent in requests and those returned in responses) should be formatted as shown in our examples. We support [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) timestamps. The preferred way to pass in a date is by converting the time to UTC such as this: 2013-04-17T09:12:36-00:00 ## gzip If you would like responses from Cliengo to be compressed for faster response times, simply include an ** Accept-Encoding** header with a value of **gzip, deflate** , and responses will be [gzipped](http://en.wikipedia.org/wiki/Gzip). ## CORS [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing), or cross-origin resource sharing, is a mechanism that allows a web page to make XMLHttpRequests to another domain (i.e. a domain different from the one it was loaded from). CORS is supported in a [specific set of modern browsers](http://caniuse.com/cors). The Cliengo API supports CORS. ## Pagination Endpoints that return arrays support **limit** and **offset** as URL parameters. **Limit** defines the maximum number of records that will be returned on a page. The number of records is not guaranteed to be the number specified as visibility rules may filter out items. To avoid duplicates being returned we recommend the following logic: * To retrieve the next page, set offset=offset+limit * If total count from previous response is >= the new offset, you are done, no need to ask for another page Note that **offset** is zero based, defaults for **limit** vary by endpoint. ## Upcoming Changes We are always maintaining, fixing, and enhancing our API. As such, you should expect new endpoints to show up, new fields to be added to responses and new error codes to appear. We recommend that you build your code to gracefully ignore things that you aren’t expecting, and to handle errors in standard HTTP-centric ways. ## Getting Help To get in touch with our API experts directly, please submit a support ticket. For community support, please use the cliengo-api tag on StackOverflow for any questions or suggestions.
## Content API Basics The Cliengo Content API gives you access to the content management features you see in our web app and lets you extend them for use in your own app. It strives to be [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) and is organized around the main resources you’re familiar with from the Cliengo web interface. Before you do anything, you should create a free Cliengo account that you can test the API against and register for an API key so that you can make API calls. ## Example Requests Sample API calls are provided next to each method using [cURL](http://curl.haxx.se/), a standard command line tool. All you need to do is drop in your specific parameters, and you can test the calls from the command line. [Here is a great tutorial on using cURL with APIs](http://httpkit.com/resources/HTTP-from-the-Command-Line/). If the command line isn’t your preference, a great alternative is [POSTMAN](https://www.box.com/blog/using-postman-to-get-started-with-the-content-api-and-view-api-2/), an easy-to-use [Chrome extension](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm/) for making HTTP requests. ## Input/Output Format Both request body data and response data are formatted as [JSON](http://www.json.org/). ## Date Format All timestamps (both those sent in requests and those returned in responses) should be formatted as shown in our examples. We support [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) timestamps. The preferred way to pass in a date is by converting the time to UTC such as this: 2013-04-17T09:12:36-00:00 ## gzip If you would like responses from Cliengo to be compressed for faster response times, simply include an ** Accept-Encoding** header with a value of **gzip, deflate** , and responses will be [gzipped](http://en.wikipedia.org/wiki/Gzip). ## CORS [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing), or cross-origin resource sharing, is a mechanism that allows a web page to make XMLHttpRequests to another domain (i.e. a domain different from the one it was loaded from). CORS is supported in a [specific set of modern browsers](http://caniuse.com/cors). The Cliengo API supports CORS. ## Pagination Endpoints that return arrays support **limit** and **offset** as URL parameters. **Limit** defines the maximum number of records that will be returned on a page. The number of records is not guaranteed to be the number specified as visibility rules may filter out items. To avoid duplicates being returned we recommend the following logic: * To retrieve the next page, set offset=offset+limit * If total count from previous response is >= the new offset, you are done, no need to ask for another page Note that **offset** is zero based, defaults for **limit** vary by endpoint. ## Upcoming Changes We are always maintaining, fixing, and enhancing our API. As such, you should expect new endpoints to show up, new fields to be added to responses and new error codes to appear. We recommend that you build your code to gracefully ignore things that you aren’t expecting, and to handle errors in standard HTTP-centric ways. ## Getting Help To get in touch with our API experts directly, please submit a support ticket. For community support, please use the cliengo-api tag on StackOverflow for any questions or suggestions.
{"_id":"55ac34a50685ce0d0049fbe1","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"excerpt":"This page will help you get started with Leadaki. You'll be up and running in a minute!","githubsync":"","hidden":false,"isReference":false,"link_url":"","parentDoc":null,"version":"55aa7d983be8f60d00041d45","__v":6,"createdAt":"2015-07-19T23:37:09.478Z","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Our Error Standard\"\n}\n[/block]\nUserMessage: This is a user-friendly message, which can be displayed on your application. This will be sent when something is wrong on the user side.\nDeveloprMessage: This is message is intended for the developer working with our API. Used to fix an error if he's doing something wrong on his side.\nErrors: Detailed description of the request errors.\nMoreInfo: Links to corresponding API documentation, gives tips, etc.\nStatus: HttpResponse status code.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"userMessage\\\": \\\"You need to fill the username field!\\\",\\n  \\\"developerMessage\\\": \\\"\\\",\\n  \\\"errors\\\": [\\n \\t],\\n  \\\"moreInfo\\\" : \\\"http://developers.cliengo.com/docs/errors\\\", \\n  \\\"status\\\" : 400\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe Cliengo API communicates errors through standard HTTP status codes paired with error objects. Generally the following pattern will apply:\n\n2xx\n\nThe request was successfully received, understood, and accepted\n\n3xx\n\nFurther action needs to be taken by the user agent in order to fulfill the request\n\n4xx\n\nAn error in the request. Usually a bad parameter.\n\n5xx\n\nThe request is fine, but something is wrong on Box’s end\n\n## HTTP STATUS CODES\n\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Codes\\n200\\t\\tsuccess\\n201\\t\\tcreated\\n202\\t\\taccepted\\n204\\t\\tno_content\\n302\\t\\tredirect\\n304\\t\\tnot_modified\\n400\\t\\tbad_request\\n401\\t\\tunauthorized\\n403\\t\\tforbidden\\n404\\t\\tnot_found\\n405\\t\\tmethod_not_allowed\\n409\\t\\tconflict\\n412\\t\\tprecondition_failed\\n429 \\ttoo_many_requests\\n500\\t\\tinternal_server_error\\n503 \\tunavailable\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","link_external":false,"next":{"description":"","pages":[]},"order":1,"slug":"errors","sync_unique":"","type":"basic","category":"55aa7d983be8f60d00041d46","project":"55aa7d973be8f60d00041d42","title":"Errors","updates":[],"user":"55aa7d625d3abb0d0012f3da","childrenPages":[]}

Errors

This page will help you get started with Leadaki. You'll be up and running in a minute!

[block:api-header] { "type": "basic", "title": "Our Error Standard" } [/block] UserMessage: This is a user-friendly message, which can be displayed on your application. This will be sent when something is wrong on the user side. DeveloprMessage: This is message is intended for the developer working with our API. Used to fix an error if he's doing something wrong on his side. Errors: Detailed description of the request errors. MoreInfo: Links to corresponding API documentation, gives tips, etc. Status: HttpResponse status code. [block:code] { "codes": [ { "code": "{\n\t\"userMessage\": \"You need to fill the username field!\",\n \"developerMessage\": \"\",\n \"errors\": [\n \t],\n \"moreInfo\" : \"http://developers.cliengo.com/docs/errors\", \n \"status\" : 400\n}", "language": "json" } ] } [/block] The Cliengo API communicates errors through standard HTTP status codes paired with error objects. Generally the following pattern will apply: 2xx The request was successfully received, understood, and accepted 3xx Further action needs to be taken by the user agent in order to fulfill the request 4xx An error in the request. Usually a bad parameter. 5xx The request is fine, but something is wrong on Box’s end ## HTTP STATUS CODES [block:code] { "codes": [ { "code": "Codes\n200\t\tsuccess\n201\t\tcreated\n202\t\taccepted\n204\t\tno_content\n302\t\tredirect\n304\t\tnot_modified\n400\t\tbad_request\n401\t\tunauthorized\n403\t\tforbidden\n404\t\tnot_found\n405\t\tmethod_not_allowed\n409\t\tconflict\n412\t\tprecondition_failed\n429 \ttoo_many_requests\n500\t\tinternal_server_error\n503 \tunavailable", "language": "text" } ] } [/block]
[block:api-header] { "type": "basic", "title": "Our Error Standard" } [/block] UserMessage: This is a user-friendly message, which can be displayed on your application. This will be sent when something is wrong on the user side. DeveloprMessage: This is message is intended for the developer working with our API. Used to fix an error if he's doing something wrong on his side. Errors: Detailed description of the request errors. MoreInfo: Links to corresponding API documentation, gives tips, etc. Status: HttpResponse status code. [block:code] { "codes": [ { "code": "{\n\t\"userMessage\": \"You need to fill the username field!\",\n \"developerMessage\": \"\",\n \"errors\": [\n \t],\n \"moreInfo\" : \"http://developers.cliengo.com/docs/errors\", \n \"status\" : 400\n}", "language": "json" } ] } [/block] The Cliengo API communicates errors through standard HTTP status codes paired with error objects. Generally the following pattern will apply: 2xx The request was successfully received, understood, and accepted 3xx Further action needs to be taken by the user agent in order to fulfill the request 4xx An error in the request. Usually a bad parameter. 5xx The request is fine, but something is wrong on Box’s end ## HTTP STATUS CODES [block:code] { "codes": [ { "code": "Codes\n200\t\tsuccess\n201\t\tcreated\n202\t\taccepted\n204\t\tno_content\n302\t\tredirect\n304\t\tnot_modified\n400\t\tbad_request\n401\t\tunauthorized\n403\t\tforbidden\n404\t\tnot_found\n405\t\tmethod_not_allowed\n409\t\tconflict\n412\t\tprecondition_failed\n429 \ttoo_many_requests\n500\t\tinternal_server_error\n503 \tunavailable", "language": "text" } ] } [/block]
{"_id":"55ac397063a6b60d0066174d","body":"For accesing the Cliengo API you'll need an user **apiKey**. \n\nYou can get your apiKey by accessing to your **[Account -> Integrations -> API](https://app.cliengo.com/integrations.leadakiintegrations/apiintegrate) **\n\n\n[block:image]\n{\n  \"images\": [\n    {}\n  ]\n}\n[/block]","excerpt":"","link_url":"","title":"Authentication","__v":9,"githubsync":"","isReference":false,"link_external":false,"next":{"pages":[],"description":""},"type":"basic","updates":[],"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"hidden":false,"parentDoc":null,"slug":"authentication","sync_unique":"","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","category":"55aa7d983be8f60d00041d46","createdAt":"2015-07-19T23:57:36.963Z","order":2,"project":"55aa7d973be8f60d00041d42","childrenPages":[]}

Authentication


For accesing the Cliengo API you'll need an user **apiKey**. You can get your apiKey by accessing to your **[Account -> Integrations -> API](https://app.cliengo.com/integrations.leadakiintegrations/apiintegrate) ** [block:image] { "images": [ {} ] } [/block]
For accesing the Cliengo API you'll need an user **apiKey**. You can get your apiKey by accessing to your **[Account -> Integrations -> API](https://app.cliengo.com/integrations.leadakiintegrations/apiintegrate) ** [block:image] { "images": [ {} ] } [/block]
{"_id":"55c18618c0777c0d004676e1","type":"basic","hidden":false,"link_external":false,"order":0,"project":"55aa7d973be8f60d00041d42","sync_unique":"","title":"Getting started with the Javascript API","version":"55aa7d983be8f60d00041d45","__v":8,"category":"55c182616d7d2921006da013","createdAt":"2015-08-05T03:42:16.316Z","excerpt":"Our documentation to help you customize Leadaki to fit your website","parentDoc":null,"slug":"javascript-api","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"githubsync":"","isReference":false,"next":{"description":"","pages":[]},"updates":[],"user":"55aa7d625d3abb0d0012f3da","body":"We offer a Javascript API that gives you flexibility and control over the behavior of the Cliengo chatbot, conversion pixels, submit forms, etc. You can decide, how, when and where to display the chatbot on your site, or disable/enabled some features in your website specific pages.\n\nFor using Leadaki Javascript API:\n  * Make sure you have installed the latest Leadaki Installation code in your website.\n  * For specific settings, place leadakiSettings in your webpage before Cliengo Installation code.\n\n## Installation\nYour Cliengo Installation Code is a javascript similar to this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<!-- Cliengo Installation Code -->\\n<script type=\\\"text/javascript\\\">\\n(function(){\\n  var ldk=document.createElement('script'); \\n  ldk.type='text/javascript'; \\n  ldk.async=true;\\n ldk.src='https://s.cliengo.com/weboptimizer/{companyId}/{websiteId}.js';\\n  var s=document.getElementsByTagName('script')[0];\\n  s.parentNode.insertBefore(ldk, s);})();\\n</script>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\n\n## Configuration \nFor specific settings in your webpage, you have to set leadakiSettings object before the Installation Script. [See more details](http://developers.cliengo.com/docs/javascript-api-configuration)\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script>\\n/* custom configuration goes here (developers.cliengo.com/docs/javascript-api) */  \\nwindow.leadakiSettings = {someConfig:'value'}\\n</script>\\n\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\nWe encourage developers to write their own JavaScript to extend the Cliengo functionality on their websites. We're very excited when we see examples of the API used in creative ways. Let us know if you have an interesting implementation and we may publish it.\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Support\"\n}\n[/block]\nIf you have a problem with an API call, such as it not returning the correct value or not performing the intended action, email support@cliengo.com with a link to a page where we can test the functionality and information about the steps that you've taken to debug so far.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Testing and Debugging\"\n}\n[/block]\nThe API is intended to be self-serve. Although we can't debug or write JavaScript for you, there are some helpful ways to test your own code during development:\n\n## Debugging\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script>\\n/* Use this configuration for enable Cliengo debug to console.log()  */  \\nwindow.leadakiSettings = {debug:true}\\n</script>\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\nOr you can set on any part of your code (after beeing loaded)\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Leadaki.debug = true \",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Learning JavaScript\"\n}\n[/block]\nIf you're new to JavaScript entirely, you might want to start with one of these Online Javascript courses:  [Codecademy](http://www.codecademy.com/en/tracks/javascript), [Code School](https://www.codeschool.com/paths/javascript) and [Treehouse](http://teamtreehouse.com/features/javascript)","link_url":"","childrenPages":[]}

Getting started with the Javascript API

Our documentation to help you customize Leadaki to fit your website

We offer a Javascript API that gives you flexibility and control over the behavior of the Cliengo chatbot, conversion pixels, submit forms, etc. You can decide, how, when and where to display the chatbot on your site, or disable/enabled some features in your website specific pages. For using Leadaki Javascript API: * Make sure you have installed the latest Leadaki Installation code in your website. * For specific settings, place leadakiSettings in your webpage before Cliengo Installation code. ## Installation Your Cliengo Installation Code is a javascript similar to this: [block:code] { "codes": [ { "code": "<!-- Cliengo Installation Code -->\n<script type=\"text/javascript\">\n(function(){\n var ldk=document.createElement('script'); \n ldk.type='text/javascript'; \n ldk.async=true;\n ldk.src='https://s.cliengo.com/weboptimizer/{companyId}/{websiteId}.js';\n var s=document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(ldk, s);})();\n</script>", "language": "html" } ] } [/block] ## Configuration For specific settings in your webpage, you have to set leadakiSettings object before the Installation Script. [See more details](http://developers.cliengo.com/docs/javascript-api-configuration) [block:code] { "codes": [ { "code": "<script>\n/* custom configuration goes here (developers.cliengo.com/docs/javascript-api) */ \nwindow.leadakiSettings = {someConfig:'value'}\n</script>\n", "language": "html" } ] } [/block] We encourage developers to write their own JavaScript to extend the Cliengo functionality on their websites. We're very excited when we see examples of the API used in creative ways. Let us know if you have an interesting implementation and we may publish it. [block:api-header] { "type": "basic", "title": "Support" } [/block] If you have a problem with an API call, such as it not returning the correct value or not performing the intended action, email support@cliengo.com with a link to a page where we can test the functionality and information about the steps that you've taken to debug so far. [block:api-header] { "type": "basic", "title": "Testing and Debugging" } [/block] The API is intended to be self-serve. Although we can't debug or write JavaScript for you, there are some helpful ways to test your own code during development: ## Debugging [block:code] { "codes": [ { "code": "<script>\n/* Use this configuration for enable Cliengo debug to console.log() */ \nwindow.leadakiSettings = {debug:true}\n</script>", "language": "javascript" } ] } [/block] Or you can set on any part of your code (after beeing loaded) [block:code] { "codes": [ { "code": "Leadaki.debug = true ", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "Learning JavaScript" } [/block] If you're new to JavaScript entirely, you might want to start with one of these Online Javascript courses: [Codecademy](http://www.codecademy.com/en/tracks/javascript), [Code School](https://www.codeschool.com/paths/javascript) and [Treehouse](http://teamtreehouse.com/features/javascript)
We offer a Javascript API that gives you flexibility and control over the behavior of the Cliengo chatbot, conversion pixels, submit forms, etc. You can decide, how, when and where to display the chatbot on your site, or disable/enabled some features in your website specific pages. For using Leadaki Javascript API: * Make sure you have installed the latest Leadaki Installation code in your website. * For specific settings, place leadakiSettings in your webpage before Cliengo Installation code. ## Installation Your Cliengo Installation Code is a javascript similar to this: [block:code] { "codes": [ { "code": "<!-- Cliengo Installation Code -->\n<script type=\"text/javascript\">\n(function(){\n var ldk=document.createElement('script'); \n ldk.type='text/javascript'; \n ldk.async=true;\n ldk.src='https://s.cliengo.com/weboptimizer/{companyId}/{websiteId}.js';\n var s=document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(ldk, s);})();\n</script>", "language": "html" } ] } [/block] ## Configuration For specific settings in your webpage, you have to set leadakiSettings object before the Installation Script. [See more details](http://developers.cliengo.com/docs/javascript-api-configuration) [block:code] { "codes": [ { "code": "<script>\n/* custom configuration goes here (developers.cliengo.com/docs/javascript-api) */ \nwindow.leadakiSettings = {someConfig:'value'}\n</script>\n", "language": "html" } ] } [/block] We encourage developers to write their own JavaScript to extend the Cliengo functionality on their websites. We're very excited when we see examples of the API used in creative ways. Let us know if you have an interesting implementation and we may publish it. [block:api-header] { "type": "basic", "title": "Support" } [/block] If you have a problem with an API call, such as it not returning the correct value or not performing the intended action, email support@cliengo.com with a link to a page where we can test the functionality and information about the steps that you've taken to debug so far. [block:api-header] { "type": "basic", "title": "Testing and Debugging" } [/block] The API is intended to be self-serve. Although we can't debug or write JavaScript for you, there are some helpful ways to test your own code during development: ## Debugging [block:code] { "codes": [ { "code": "<script>\n/* Use this configuration for enable Cliengo debug to console.log() */ \nwindow.leadakiSettings = {debug:true}\n</script>", "language": "javascript" } ] } [/block] Or you can set on any part of your code (after beeing loaded) [block:code] { "codes": [ { "code": "Leadaki.debug = true ", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "Learning JavaScript" } [/block] If you're new to JavaScript entirely, you might want to start with one of these Online Javascript courses: [Codecademy](http://www.codecademy.com/en/tracks/javascript), [Code School](https://www.codeschool.com/paths/javascript) and [Treehouse](http://teamtreehouse.com/features/javascript)
{"_id":"55c184d1c6e9ad3700aaea9c","title":"Configuration","order":1,"createdAt":"2015-08-05T03:36:49.888Z","excerpt":"Our documentation to help you customize Leadaki to fit your website","githubsync":"","isReference":false,"parentDoc":null,"project":"55aa7d973be8f60d00041d42","updates":[],"api":{"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"body":"Before you load your the Script you can override default configurations for your website by defining leadakiSettings object.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script>\\nwindow.leadakiSettings = {\\n\\tgoogleAdWordsConversionId : \\\"\\\",\\n\\tgoogleAnalyticsId : \\\"\\\", \\n\\tchatbotName : \\\"Pilar\\\",\\n\\tformHooksEnabled : true,\\n\\tautomaticRemarketingEnabled : true,  \\n\\tchatEnabled : true,\\n\\tchatSaluteTimeInSeconds : 15,\\n\\tcustomParams: {},\\n\\tsessionPath: \\\"/\\\", /* specify script cookies path */\\n\\thasConvertedLead : false, \\n\\tdebug : false\\n}\\n</script>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\nEach one of this configurations give you the ability to change default beheaviour or even implement different actions when some event happens.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"googleAdWordsConversionId\",\n    \"1-0\": \"googleAnalyticsId\",\n    \"0-1\": \"If you want to use [Google AdWords Remarketing](https://support.google.com/adwords/answer/2453998?hl=es-419) complete this Id with your AdWords Convertion Id. Check that automaticRemarketingEnabled is 'true'.\",\n    \"1-1\": \"Use this to enable the Google Analytics integration with your account. It use to have some format like 'UA-12341234-1'\",\n    \"2-0\": \"chatbotName\",\n    \"3-0\": \"automaticRemarketingEnabled\",\n    \"4-0\": \"chatEnabled\",\n    \"6-0\": \"hasConvertedLead\",\n    \"6-1\": \"became *true* after chatbot detects a lead and post it to Cliengo\",\n    \"7-0\": \"debug\",\n    \"7-1\": \"Default *false*.\",\n    \"4-1\": \"Default *true*\",\n    \"3-1\": \"Default *true*\",\n    \"2-1\": \"Default *Pilar*\",\n    \"5-0\": \"chatSaluteTimeInSeconds\",\n    \"5-1\": \"The time when the chatbots says 'hello' the first time the visitors arrive to a website. Default 15.\",\n    \"8-0\": \"customParams\",\n    \"8-1\": \"Check docs for [Sending Custom Params](http://developers.cliengo.com/docs/sending-custom-params)\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]","category":"55c182616d7d2921006da013","hidden":false,"slug":"javascript-api-configuration","sync_unique":"","type":"basic","version":"55aa7d983be8f60d00041d45","__v":11,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"user":"55aa7d625d3abb0d0012f3da","childrenPages":[]}

Configuration

Our documentation to help you customize Leadaki to fit your website

Before you load your the Script you can override default configurations for your website by defining leadakiSettings object. [block:code] { "codes": [ { "code": "<script>\nwindow.leadakiSettings = {\n\tgoogleAdWordsConversionId : \"\",\n\tgoogleAnalyticsId : \"\", \n\tchatbotName : \"Pilar\",\n\tformHooksEnabled : true,\n\tautomaticRemarketingEnabled : true, \n\tchatEnabled : true,\n\tchatSaluteTimeInSeconds : 15,\n\tcustomParams: {},\n\tsessionPath: \"/\", /* specify script cookies path */\n\thasConvertedLead : false, \n\tdebug : false\n}\n</script>", "language": "html" } ] } [/block] Each one of this configurations give you the ability to change default beheaviour or even implement different actions when some event happens. [block:parameters] { "data": { "0-0": "googleAdWordsConversionId", "1-0": "googleAnalyticsId", "0-1": "If you want to use [Google AdWords Remarketing](https://support.google.com/adwords/answer/2453998?hl=es-419) complete this Id with your AdWords Convertion Id. Check that automaticRemarketingEnabled is 'true'.", "1-1": "Use this to enable the Google Analytics integration with your account. It use to have some format like 'UA-12341234-1'", "2-0": "chatbotName", "3-0": "automaticRemarketingEnabled", "4-0": "chatEnabled", "6-0": "hasConvertedLead", "6-1": "became *true* after chatbot detects a lead and post it to Cliengo", "7-0": "debug", "7-1": "Default *false*.", "4-1": "Default *true*", "3-1": "Default *true*", "2-1": "Default *Pilar*", "5-0": "chatSaluteTimeInSeconds", "5-1": "The time when the chatbots says 'hello' the first time the visitors arrive to a website. Default 15.", "8-0": "customParams", "8-1": "Check docs for [Sending Custom Params](http://developers.cliengo.com/docs/sending-custom-params)" }, "cols": 2, "rows": 9 } [/block]
Before you load your the Script you can override default configurations for your website by defining leadakiSettings object. [block:code] { "codes": [ { "code": "<script>\nwindow.leadakiSettings = {\n\tgoogleAdWordsConversionId : \"\",\n\tgoogleAnalyticsId : \"\", \n\tchatbotName : \"Pilar\",\n\tformHooksEnabled : true,\n\tautomaticRemarketingEnabled : true, \n\tchatEnabled : true,\n\tchatSaluteTimeInSeconds : 15,\n\tcustomParams: {},\n\tsessionPath: \"/\", /* specify script cookies path */\n\thasConvertedLead : false, \n\tdebug : false\n}\n</script>", "language": "html" } ] } [/block] Each one of this configurations give you the ability to change default beheaviour or even implement different actions when some event happens. [block:parameters] { "data": { "0-0": "googleAdWordsConversionId", "1-0": "googleAnalyticsId", "0-1": "If you want to use [Google AdWords Remarketing](https://support.google.com/adwords/answer/2453998?hl=es-419) complete this Id with your AdWords Convertion Id. Check that automaticRemarketingEnabled is 'true'.", "1-1": "Use this to enable the Google Analytics integration with your account. It use to have some format like 'UA-12341234-1'", "2-0": "chatbotName", "3-0": "automaticRemarketingEnabled", "4-0": "chatEnabled", "6-0": "hasConvertedLead", "6-1": "became *true* after chatbot detects a lead and post it to Cliengo", "7-0": "debug", "7-1": "Default *false*.", "4-1": "Default *true*", "3-1": "Default *true*", "2-1": "Default *Pilar*", "5-0": "chatSaluteTimeInSeconds", "5-1": "The time when the chatbots says 'hello' the first time the visitors arrive to a website. Default 15.", "8-0": "customParams", "8-1": "Check docs for [Sending Custom Params](http://developers.cliengo.com/docs/sending-custom-params)" }, "cols": 2, "rows": 9 } [/block]
{"_id":"55c7917eb9aa4e0d0016c3a0","order":2,"parentDoc":null,"slug":"javascript-api-saving-contacts","category":"55c182616d7d2921006da013","createdAt":"2015-08-09T17:44:30.389Z","excerpt":"Save new contacts in Cliengo Data Base","link_url":"","isReference":false,"link_external":false,"project":"55aa7d973be8f60d00041d42","user":"55aa7d625d3abb0d0012f3da","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":""},"githubsync":"","next":{"description":"","pages":[]},"title":"Saving Contacts","version":"55aa7d983be8f60d00041d45","updates":[],"__v":10,"body":"If you are implementing your own wesite, you can easily save data user's leave in your Forms by using our JavaScript API.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\tLeadaki.saveContact({\\n\\t\\tfirst_name : 'Morgan',\\n\\t\\tlast_name : 'Freeman',\\n    full_name : 'Morgan Freeman',\\n\\t\\tphone : '+541133261336',\\n\\t\\tmobile : '+5491140546578',\\n\\t\\temail : 'mariano@cliengo.com',\\n\\t\\tmessage : 'Hi, i want to buy a car \\\\n Please call me.',\\n\\t\\taddress : '',\\n\\t\\ttags : '', // coma separated tags\\n\\t\\ttracking : { // override automatic tracking.\\n\\t\\t\\tutm_source: '',\\n\\t\\t\\tutm_medium : '',\\n\\t\\t\\tutm_campaign: '',\\n\\t\\t\\tutm_content : '',\\n\\t\\t\\tgclid : '', // Google AdWords clickId\\n\\t\\t\\tcontact_method : '', // form, chat or phone.\\n\\t\\t},\\n\\t\\tcustom_fields: { //Any key-value pair you want to store\\n\\t\\t\\tsome_key1 : \\\"some_value1\\\",\\n\\t\\t\\tsome_key2 : \\\"some_value2\\\",\\n\\t  },\\n    success : function (data){\\n      //handler after Contact is successfully saved.\\n    },\\n    error : function (data){\\n      //handler if something went wrong when saving Contact.\\n    }\\n\\t})\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**All fields are Optional**, but in order to save any valid Contact in Cliengo Data Base you should provide at least one combination of email, phone o mobile with data.\n\nBelow the explanation of every field:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"first_name\",\n    \"0-1\": \"Contact's first name.\",\n    \"1-0\": \"last_name\",\n    \"2-0\": \"full_name\",\n    \"1-1\": \"Contact's last name.\",\n    \"2-1\": \"Use this field en case you dont have first and lastname splited in two fields.\",\n    \"3-0\": \"phone\",\n    \"4-0\": \"mobile\",\n    \"5-0\": \"email\",\n    \"6-0\": \"message\",\n    \"7-0\": \"address\",\n    \"8-0\": \"tags\",\n    \"8-1\": \"Coma separated strings for tagging your Contact.\",\n    \"9-0\": \"tracking\",\n    \"9-1\": \"Tracking information about your Contact. This fields are automatically tracked with  [Cliengo AutoTracking ](http://help.cliengo.com/support/solutions/articles/17000000033-track-autom%C3%A1tico-de-fuente-y-medio) but you can override them with this option.\",\n    \"10-0\": \"custom_fields\",\n    \"10-1\": \"Any key-value pair you want to store in this Contact\",\n    \"11-0\": \"success\",\n    \"11-1\": \"Function handler that executes after Contact is successfully saved in Cliengo Database.\",\n    \"12-0\": \"error\",\n    \"12-1\": \"Function handler if something went wrong when saving Contact in Cliengo Database.\",\n    \"7-1\": \"Contact's address. Free string where you can include zipcode, city, street, number, state or country.\",\n    \"6-1\": \"Contact's mesage. Usually your Contact's question, doubt or message.\",\n    \"5-1\": \"Contact's email.\",\n    \"4-1\": \"Contact's mobile phone number.\",\n    \"3-1\": \"Contact's phone number.\"\n  },\n  \"cols\": 2,\n  \"rows\": 13\n}\n[/block]\n## Duplicated Contacts:\n\nCliengo Data Base will automatically merge new Contacts with the same email address in your account, and will also eliminate duplicated messages when information is exactly the same.\nThis means that you dont have to worry about users submiting information multiple times in your webiste. Cliengo Data Base will take care of it.\n\n\n## Working example \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<!-- This is your Website Form -->\\n<form action=\\\"\\\" onsubmit=\\\"return mySubmitFunction()\\\">\\n  <input type=\\\"text\\\" name=\\\"fullName\\\" id=\\\"fullName\\\" value=\\\"John Doe\\\"> \\n  <input type=\\\"text\\\" name=\\\"email\\\" id=\\\"email\\\" value=\\\"email@company.com\\\"> \\n  <input type=\\\"text\\\" name=\\\"phone\\\" id=\\\"phone\\\" value=\\\"+1 555-5555\\\">\\n  <textarea type=\\\"text\\\" name=\\\"message\\\" id=\\\"message\\\">\\n    Lorem impsum...\\n  </textarea>\\n  <input type=\\\"submit\\\" value=\\\"Send Information\\\">\\n</form>\\n\\n\\n<!-- This is your Script for saving Contacts -->           \\n<script>\\n  function mySubmitFunction() {\\n    Leadaki.saveContact({\\n      full_name : document.getElementById(\\\"fullName\\\").value,\\n      phone : document.getElementById(\\\"phone\\\").value,\\n      email : document.getElementById(\\\"email\\\").value,\\n      message : document.getElementById(\\\"message\\\").value,\\n      success : function() {\\n        alert(\\\"Contact was successfully saved!\\\");\\n      },\\n      error : function() {\\n        alert(\\\"There was a problem. Try again later.\\\");\\n      }\\n    })\\n    return false;\\n  }\\n</script>\\n\\n<!-- Reminder: you need your Cliengo Instalation Script pasted somewhere in this page -->\\n\\n\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]","hidden":false,"sync_unique":"","type":"basic","childrenPages":[]}

Saving Contacts

Save new contacts in Cliengo Data Base

If you are implementing your own wesite, you can easily save data user's leave in your Forms by using our JavaScript API. [block:code] { "codes": [ { "code": "\tLeadaki.saveContact({\n\t\tfirst_name : 'Morgan',\n\t\tlast_name : 'Freeman',\n full_name : 'Morgan Freeman',\n\t\tphone : '+541133261336',\n\t\tmobile : '+5491140546578',\n\t\temail : 'mariano@cliengo.com',\n\t\tmessage : 'Hi, i want to buy a car \\n Please call me.',\n\t\taddress : '',\n\t\ttags : '', // coma separated tags\n\t\ttracking : { // override automatic tracking.\n\t\t\tutm_source: '',\n\t\t\tutm_medium : '',\n\t\t\tutm_campaign: '',\n\t\t\tutm_content : '',\n\t\t\tgclid : '', // Google AdWords clickId\n\t\t\tcontact_method : '', // form, chat or phone.\n\t\t},\n\t\tcustom_fields: { //Any key-value pair you want to store\n\t\t\tsome_key1 : \"some_value1\",\n\t\t\tsome_key2 : \"some_value2\",\n\t },\n success : function (data){\n //handler after Contact is successfully saved.\n },\n error : function (data){\n //handler if something went wrong when saving Contact.\n }\n\t})", "language": "javascript" } ] } [/block] **All fields are Optional**, but in order to save any valid Contact in Cliengo Data Base you should provide at least one combination of email, phone o mobile with data. Below the explanation of every field: [block:parameters] { "data": { "0-0": "first_name", "0-1": "Contact's first name.", "1-0": "last_name", "2-0": "full_name", "1-1": "Contact's last name.", "2-1": "Use this field en case you dont have first and lastname splited in two fields.", "3-0": "phone", "4-0": "mobile", "5-0": "email", "6-0": "message", "7-0": "address", "8-0": "tags", "8-1": "Coma separated strings for tagging your Contact.", "9-0": "tracking", "9-1": "Tracking information about your Contact. This fields are automatically tracked with [Cliengo AutoTracking ](http://help.cliengo.com/support/solutions/articles/17000000033-track-autom%C3%A1tico-de-fuente-y-medio) but you can override them with this option.", "10-0": "custom_fields", "10-1": "Any key-value pair you want to store in this Contact", "11-0": "success", "11-1": "Function handler that executes after Contact is successfully saved in Cliengo Database.", "12-0": "error", "12-1": "Function handler if something went wrong when saving Contact in Cliengo Database.", "7-1": "Contact's address. Free string where you can include zipcode, city, street, number, state or country.", "6-1": "Contact's mesage. Usually your Contact's question, doubt or message.", "5-1": "Contact's email.", "4-1": "Contact's mobile phone number.", "3-1": "Contact's phone number." }, "cols": 2, "rows": 13 } [/block] ## Duplicated Contacts: Cliengo Data Base will automatically merge new Contacts with the same email address in your account, and will also eliminate duplicated messages when information is exactly the same. This means that you dont have to worry about users submiting information multiple times in your webiste. Cliengo Data Base will take care of it. ## Working example [block:code] { "codes": [ { "code": "<!-- This is your Website Form -->\n<form action=\"\" onsubmit=\"return mySubmitFunction()\">\n <input type=\"text\" name=\"fullName\" id=\"fullName\" value=\"John Doe\"> \n <input type=\"text\" name=\"email\" id=\"email\" value=\"email@company.com\"> \n <input type=\"text\" name=\"phone\" id=\"phone\" value=\"+1 555-5555\">\n <textarea type=\"text\" name=\"message\" id=\"message\">\n Lorem impsum...\n </textarea>\n <input type=\"submit\" value=\"Send Information\">\n</form>\n\n\n<!-- This is your Script for saving Contacts --> \n<script>\n function mySubmitFunction() {\n Leadaki.saveContact({\n full_name : document.getElementById(\"fullName\").value,\n phone : document.getElementById(\"phone\").value,\n email : document.getElementById(\"email\").value,\n message : document.getElementById(\"message\").value,\n success : function() {\n alert(\"Contact was successfully saved!\");\n },\n error : function() {\n alert(\"There was a problem. Try again later.\");\n }\n })\n return false;\n }\n</script>\n\n<!-- Reminder: you need your Cliengo Instalation Script pasted somewhere in this page -->\n\n", "language": "html" } ] } [/block]
If you are implementing your own wesite, you can easily save data user's leave in your Forms by using our JavaScript API. [block:code] { "codes": [ { "code": "\tLeadaki.saveContact({\n\t\tfirst_name : 'Morgan',\n\t\tlast_name : 'Freeman',\n full_name : 'Morgan Freeman',\n\t\tphone : '+541133261336',\n\t\tmobile : '+5491140546578',\n\t\temail : 'mariano@cliengo.com',\n\t\tmessage : 'Hi, i want to buy a car \\n Please call me.',\n\t\taddress : '',\n\t\ttags : '', // coma separated tags\n\t\ttracking : { // override automatic tracking.\n\t\t\tutm_source: '',\n\t\t\tutm_medium : '',\n\t\t\tutm_campaign: '',\n\t\t\tutm_content : '',\n\t\t\tgclid : '', // Google AdWords clickId\n\t\t\tcontact_method : '', // form, chat or phone.\n\t\t},\n\t\tcustom_fields: { //Any key-value pair you want to store\n\t\t\tsome_key1 : \"some_value1\",\n\t\t\tsome_key2 : \"some_value2\",\n\t },\n success : function (data){\n //handler after Contact is successfully saved.\n },\n error : function (data){\n //handler if something went wrong when saving Contact.\n }\n\t})", "language": "javascript" } ] } [/block] **All fields are Optional**, but in order to save any valid Contact in Cliengo Data Base you should provide at least one combination of email, phone o mobile with data. Below the explanation of every field: [block:parameters] { "data": { "0-0": "first_name", "0-1": "Contact's first name.", "1-0": "last_name", "2-0": "full_name", "1-1": "Contact's last name.", "2-1": "Use this field en case you dont have first and lastname splited in two fields.", "3-0": "phone", "4-0": "mobile", "5-0": "email", "6-0": "message", "7-0": "address", "8-0": "tags", "8-1": "Coma separated strings for tagging your Contact.", "9-0": "tracking", "9-1": "Tracking information about your Contact. This fields are automatically tracked with [Cliengo AutoTracking ](http://help.cliengo.com/support/solutions/articles/17000000033-track-autom%C3%A1tico-de-fuente-y-medio) but you can override them with this option.", "10-0": "custom_fields", "10-1": "Any key-value pair you want to store in this Contact", "11-0": "success", "11-1": "Function handler that executes after Contact is successfully saved in Cliengo Database.", "12-0": "error", "12-1": "Function handler if something went wrong when saving Contact in Cliengo Database.", "7-1": "Contact's address. Free string where you can include zipcode, city, street, number, state or country.", "6-1": "Contact's mesage. Usually your Contact's question, doubt or message.", "5-1": "Contact's email.", "4-1": "Contact's mobile phone number.", "3-1": "Contact's phone number." }, "cols": 2, "rows": 13 } [/block] ## Duplicated Contacts: Cliengo Data Base will automatically merge new Contacts with the same email address in your account, and will also eliminate duplicated messages when information is exactly the same. This means that you dont have to worry about users submiting information multiple times in your webiste. Cliengo Data Base will take care of it. ## Working example [block:code] { "codes": [ { "code": "<!-- This is your Website Form -->\n<form action=\"\" onsubmit=\"return mySubmitFunction()\">\n <input type=\"text\" name=\"fullName\" id=\"fullName\" value=\"John Doe\"> \n <input type=\"text\" name=\"email\" id=\"email\" value=\"email@company.com\"> \n <input type=\"text\" name=\"phone\" id=\"phone\" value=\"+1 555-5555\">\n <textarea type=\"text\" name=\"message\" id=\"message\">\n Lorem impsum...\n </textarea>\n <input type=\"submit\" value=\"Send Information\">\n</form>\n\n\n<!-- This is your Script for saving Contacts --> \n<script>\n function mySubmitFunction() {\n Leadaki.saveContact({\n full_name : document.getElementById(\"fullName\").value,\n phone : document.getElementById(\"phone\").value,\n email : document.getElementById(\"email\").value,\n message : document.getElementById(\"message\").value,\n success : function() {\n alert(\"Contact was successfully saved!\");\n },\n error : function() {\n alert(\"There was a problem. Try again later.\");\n }\n })\n return false;\n }\n</script>\n\n<!-- Reminder: you need your Cliengo Instalation Script pasted somewhere in this page -->\n\n", "language": "html" } ] } [/block]
{"_id":"580e6fd7c0a6c23100b76839","body":"If you need to add additional params for each lead generated in your website, you can add them programmatically with the following code snippet.\n[block:api-header]\n{\n  \"type\": \"options\",\n  \"title\": \"1. Enhance you website script.\"\n}\n[/block]\nRight ** before including the script ** generated in Cliengo to your website, paste the following code snippet to include any additional parameter for each generated lead.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script>\\n    window.leadakiSettings = { \\n      \\tcustomParams : {\\n      \\t\\tcustomParamKey1: '123456789', \\n          customParamKey2: 'superValue'\\n    \\t}\\n    };\\n</script>\\n\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n*customParams* works as a key-value Map. \n\n  * Key: You can specify any name for the key, but it has to be a String.\n  * Value: You can specify any valid json primitive value (string, date, number, boolean)\n  \nAfter all your customParams where specified your final webpage should look like: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\n<!-- Start Cliengo Custom Configuration -->\\n<script>\\n    window.leadakiSettings = { \\n      \\tcustomParams : {\\n      \\t\\tcustomParamKey1: '123456789', \\n          customParamKey2: 'superValue'\\n    \\t}\\n    };\\n</script>\\n<!-- End Cliengo Custom Configuration -->\\n\\n<!-- Start Cliengo Installation Code -->\\n<script type=\\\"text/javascript\\\">\\n(function(){\\n  var ldk=document.createElement('script'); \\n  ldk.type='text/javascript'; \\n  ldk.async=true;\\n ldk.src='https://s.cliengo.com/weboptimizer/{companyId}/{websiteId}.js';\\n  var s=document.getElementsByTagName('script')[0];\\n  s.parentNode.insertBefore(ldk, s);})();\\n</script>\\n<!-- End Cliengo Installation Code -->\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]","link_external":false,"version":"55aa7d983be8f60d00041d45","type":"basic","api":{"auth":"required","params":[],"url":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"githubsync":"","link_url":"","project":"55aa7d973be8f60d00041d42","sync_unique":"","title":"Sending custom params","createdAt":"2016-10-24T20:32:23.388Z","order":3,"user":"55aa7d625d3abb0d0012f3da","parentDoc":null,"slug":"sending-custom-params","__v":1,"category":"55c182616d7d2921006da013","excerpt":"How to send custom parameters for each lead.","hidden":false,"isReference":false,"next":{"description":"","pages":[]},"updates":[],"childrenPages":[]}

Sending custom params

How to send custom parameters for each lead.

If you need to add additional params for each lead generated in your website, you can add them programmatically with the following code snippet. [block:api-header] { "type": "options", "title": "1. Enhance you website script." } [/block] Right ** before including the script ** generated in Cliengo to your website, paste the following code snippet to include any additional parameter for each generated lead. [block:code] { "codes": [ { "code": "<script>\n window.leadakiSettings = { \n \tcustomParams : {\n \t\tcustomParamKey1: '123456789', \n customParamKey2: 'superValue'\n \t}\n };\n</script>\n", "language": "html" } ] } [/block] *customParams* works as a key-value Map. * Key: You can specify any name for the key, but it has to be a String. * Value: You can specify any valid json primitive value (string, date, number, boolean) After all your customParams where specified your final webpage should look like: [block:code] { "codes": [ { "code": "\n<!-- Start Cliengo Custom Configuration -->\n<script>\n window.leadakiSettings = { \n \tcustomParams : {\n \t\tcustomParamKey1: '123456789', \n customParamKey2: 'superValue'\n \t}\n };\n</script>\n<!-- End Cliengo Custom Configuration -->\n\n<!-- Start Cliengo Installation Code -->\n<script type=\"text/javascript\">\n(function(){\n var ldk=document.createElement('script'); \n ldk.type='text/javascript'; \n ldk.async=true;\n ldk.src='https://s.cliengo.com/weboptimizer/{companyId}/{websiteId}.js';\n var s=document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(ldk, s);})();\n</script>\n<!-- End Cliengo Installation Code -->", "language": "html" } ] } [/block]
If you need to add additional params for each lead generated in your website, you can add them programmatically with the following code snippet. [block:api-header] { "type": "options", "title": "1. Enhance you website script." } [/block] Right ** before including the script ** generated in Cliengo to your website, paste the following code snippet to include any additional parameter for each generated lead. [block:code] { "codes": [ { "code": "<script>\n window.leadakiSettings = { \n \tcustomParams : {\n \t\tcustomParamKey1: '123456789', \n customParamKey2: 'superValue'\n \t}\n };\n</script>\n", "language": "html" } ] } [/block] *customParams* works as a key-value Map. * Key: You can specify any name for the key, but it has to be a String. * Value: You can specify any valid json primitive value (string, date, number, boolean) After all your customParams where specified your final webpage should look like: [block:code] { "codes": [ { "code": "\n<!-- Start Cliengo Custom Configuration -->\n<script>\n window.leadakiSettings = { \n \tcustomParams : {\n \t\tcustomParamKey1: '123456789', \n customParamKey2: 'superValue'\n \t}\n };\n</script>\n<!-- End Cliengo Custom Configuration -->\n\n<!-- Start Cliengo Installation Code -->\n<script type=\"text/javascript\">\n(function(){\n var ldk=document.createElement('script'); \n ldk.type='text/javascript'; \n ldk.async=true;\n ldk.src='https://s.cliengo.com/weboptimizer/{companyId}/{websiteId}.js';\n var s=document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(ldk, s);})();\n</script>\n<!-- End Cliengo Installation Code -->", "language": "html" } ] } [/block]
{"_id":"572b91ccff3ba10e00b4abb6","__v":7,"order":0,"slug":"webhooks-configuration","updates":[],"excerpt":"How to configure a WebHook  on Leadaki.","hidden":false,"isReference":false,"sync_unique":"","user":"55aa7d625d3abb0d0012f3da","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@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]","category":"572b9137ff3ba10e00b4abb4","link_external":false,"project":"55aa7d973be8f60d00041d42","link_url":"","next":{"description":"","pages":[]},"parentDoc":null,"title":"WebHooks configuration","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"createdAt":"2016-05-05T18:32:44.550Z","githubsync":"","type":"basic","version":"55aa7d983be8f60d00041d45","childrenPages":[]}

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]
[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]
{"_id":"55aa80345d3abb0d0012f3dd","link_external":false,"next":{"description":"","pages":[]},"order":0,"api":{"params":[{"ref":"","in":"body","required":false,"desc":"An Individual tax ID number is a number issued by the Internal Revenue Service","default":"","type":"string","name":"taxId","_id":"5893b6e998ca870f00e3ed02"},{"in":"body","required":false,"desc":"Account Name","default":"","type":"string","name":"name","_id":"5893b6e998ca870f00e3ed01","ref":""},{"required":false,"desc":"Main user contact name","default":"","type":"string","name":"contactName","_id":"5893b6e998ca870f00e3ed00","ref":"","in":"body"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  id: \"527a78fde4b0db03284a8f7b\",\n  email: \"demo@cliengo.com\",\n  name: \"Demo Cliengo\",\n  contactName: \"Cliengo\",\n  whiteLabelId: \"54b8018fe4b0268f4f942308\",\n  creationDate: \"2013-11-06T00:00:00.000Z\",\n  taxId: \"30-12312312-8\",\n  address: \"Zapiola 196\",\n  taxIdName: \"Microsoft S.A.\",\n  phone: \"+541133261332\",\n  leadCount: 345,\n  leadLimit: 1200,\n  language: \"es\",\n  timeZone: \"-03:00\",\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/account","auth":"required","examples":{"codes":[{"language":"curl","code":"curl 'https://api.cliengo.com/1.0/account/?api_key=your_api_key' ","name":""}]},"method":"get"},"category":"55aacfb3e2bdcb0d00c7466f","excerpt":"","isReference":false,"createdAt":"2015-07-18T16:35:00.981Z","updates":[],"user":"55aa7d625d3abb0d0012f3da","parentDoc":null,"sync_unique":"","__v":13,"body":"","githubsync":"","hidden":false,"title":"/account","type":"get","version":"55aa7d983be8f60d00041d45","link_url":"","project":"55aa7d973be8f60d00041d42","slug":"companiesinput","childrenPages":[]}

get/account


Body Params

taxId:
string
An Individual tax ID number is a number issued by the Internal Revenue Service
name:
string
Account Name
contactName:
string
Main user contact name

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b7e118568be2230092bbc7","sync_unique":"","user":"55aa7d625d3abb0d0012f3da","order":1,"parentDoc":null,"project":"55aa7d973be8f60d00041d42","githubsync":"","hidden":false,"next":{"description":"","pages":[]},"editedParams":true,"editedParams2":true,"version":"55aa7d983be8f60d00041d45","category":"55aacfb3e2bdcb0d00c7466f","isReference":false,"link_external":false,"createdAt":"2015-07-28T20:07:52.861Z","excerpt":"Update an Account","link_url":"","slug":"accountaccountid","title":"/account","__v":4,"api":{"auth":"required","examples":{"codes":[{"code":"","language":"curl"}]},"method":"put","params":[{"default":"","type":"string","name":"name","_id":"55b7e118568be2230092bbc9","ref":"","in":"body","required":false,"desc":""},{"default":"","type":"string","name":"contactName","_id":"55b7e118568be2230092bbc8","ref":"","in":"body","required":false,"desc":""}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n  id: \"527a78fde4b0db03284a8f7b\",\n  email: \"demo@cliengo.com\",\n  name: \"Demo cliengo\",\n  contactName: \"cliengo\",\n  whiteLabelId: \"54b8018fe4b0268f4f942308\",\n  creationDate: \"2013-11-06T00:00:00.000Z\"\n}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/account"},"body":"","type":"put","updates":[],"childrenPages":[]}

put/account

Update an Account

Body Params

name:
string
contactName:
string

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"55de05d0746ace2b00dd6f97","link_url":"","order":2,"__v":3,"createdAt":"2015-08-26T18:30:40.292Z","editedParams":true,"updates":[],"api":{"examples":{"codes":[{"language":"curl","name":"","code":"curl \"https://api.cliengo.com/1.0/account/payments?page=2&offset=5\""}]},"method":"get","params":[{"desc":"Page","default":"1","type":"int","name":"page","_id":"55de05d0746ace2b00dd6f99","ref":"","in":"query","required":false},{"_id":"55de05d0746ace2b00dd6f98","ref":"","in":"query","required":false,"desc":"","default":"5","type":"int","name":"offset"}],"results":{"codes":[{"language":"json","code":"{\n  \"paging\": {\n    \"total\": 1\n  },\n  \"results\": [\n    {\n      \"id\": \"5890c98b3ef600a730d21f3c\",\n      \"creationDate\": \"2017-01-31T14:29:47.778-03:00\",\n      \"paymentDate\": \"2017-01-31T14:29:47.779-03:00\",\n      \"paymentMethod\": \"Paypal\",\n      \"ammount\": 1337.0,\n      \"paymentForDays\": 30,\n      \"currency\": \"ARS\",\n      \"invoiceUrl\": \"https://api.cliengo.com/1.0/account/me/payments/5890c98b3ef600a730d21f3c/downloadInvoice\"\n    }\n  ]\n}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/account/payments","auth":"required"},"githubsync":"","type":"get","hidden":false,"isReference":false,"next":{"description":"","pages":[]},"slug":"testinput","version":"55aa7d983be8f60d00041d45","body":"","excerpt":"","parentDoc":null,"project":"55aa7d973be8f60d00041d42","sync_unique":"","title":"/account/payments","user":"55aa7d625d3abb0d0012f3da","category":"55aacfb3e2bdcb0d00c7466f","editedParams2":true,"link_external":false,"childrenPages":[]}

get/account/payments


Query Params

page:
integer1
Page
offset:
integer5

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5876316fb5092c1900586e66","link_url":"","parentDoc":null,"updates":[],"__v":3,"body":"","createdAt":"2017-01-11T13:21:51.118Z","excerpt":"","isReference":false,"version":"55aa7d983be8f60d00041d45","category":"55aacfb3e2bdcb0d00c7466f","githubsync":"","title":"/account/subscription","type":"post","next":{"pages":[],"description":""},"project":"55aa7d973be8f60d00041d42","slug":"accountsubscription","user":"55aa7d625d3abb0d0012f3da","api":{"method":"post","params":[{"required":true,"desc":"Expects: MERCADOPAGO, PAYPAL.","default":"","type":"string","name":"paymentMethod","_id":"5876316fb5092c1900586e68","ref":"","in":"body"},{"ref":"","in":"body","required":true,"desc":"The token used to validate the payment. Has to be obtained with MercadoPago/Paypal beforehand.","default":"","type":"string","name":"token","_id":"5876316fb5092c1900586e67"},{"in":"body","required":true,"desc":"Plan to which the user is subscribing to.","default":"","type":"string","name":"newPlan","_id":"5876447e36358c0f004bde28","ref":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"paymentMethod\":\"MERCADOPAGO\",\n  \"token\":\"sha256AESsha1ahreloco\",\n\t\"newPlan\":\"CLIENGO_FULL\",\n   \"id\": \"sha256AESsha1ahreloco\",\n   \"public_key\": \"PUBLIC_KEY\",\n   \"card_id\": null,\n   \"luhn_validation\": true,\n   \"status\": \"active\",\n   \"date_used\": null,\n   \"card_number_length\": 16,\n   \"date_created\": \"2015-04-16T13:06:25.525-04:00\",\n   \"first_six_digits\": \"555555\",\n   \"last_four_digits\": \"3704\",\n   \"security_code_length\": 3,\n   \"expiration_month\": 6,\n   \"expiration_year\": 2017,\n   \"date_last_updated\": \"2015-04-16T13:06:25.525-04:00\",\n   \"date_due\": \"2015-04-24T13:06:25.531-04:00\",\n   \"live_mode\": false,\n   \"cardholder\": {\n       \"identification\": {\n           \"number\": \"23456789\",\n           \"type\": \"type\"\n       },\n       \"name\": \"name\"\n   }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/account/subscription","auth":"required","examples":{"codes":[{"language":"text","code":""}]}},"hidden":false,"link_external":false,"order":3,"sync_unique":"","childrenPages":[]}

post/account/subscription


Body Params

paymentMethod:
required
string
Expects: MERCADOPAGO, PAYPAL.
token:
required
string
The token used to validate the payment. Has to be obtained with MercadoPago/Paypal beforehand.
newPlan:
required
string
Plan to which the user is subscribing to.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"58938c205d68453100e0cb72","type":"get","excerpt":"Retrieve a subscription plans for Cliengo by planId","githubsync":"","link_url":"","order":4,"updates":[],"createdAt":"2017-02-02T19:44:32.126Z","isReference":false,"hidden":false,"link_external":false,"next":{"pages":[],"description":""},"slug":"accountplan","title":"/account/plan","version":"55aa7d983be8f60d00041d45","__v":0,"body":"","category":"55aacfb3e2bdcb0d00c7466f","parentDoc":null,"project":"55aa7d973be8f60d00041d42","sync_unique":"","user":"55aa7d625d3abb0d0012f3da","api":{"url":"/account/plan","auth":"required","examples":{"codes":[]},"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": \"CLIENGO_BASIC\",\n  \"name\": \"Cliengo Básico\",\n  \"leadLimit\": 100,\n  \"websiteLimit\": 2,\n  \"userLimit\": 3,\n  \"description\": \"Cliengo básico, 100 leads por mes\",\n  \"priceARS\": 450,\n  \"priceUSD\": 29.0,\n  \"integrationsAllowed\": true,\n  \"imageUrl\": \"https://res.cloudinary.com/hbrrdozyj/image/upload/v1484836411/plan_basic_afyhbl.png\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"childrenPages":[]}

get/account/plan

Retrieve a subscription plans for Cliengo by planId


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"58ac80e540540e2500381a7b","githubsync":"","link_url":"","project":"55aa7d973be8f60d00041d42","slug":"account-post","type":"post","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","api":{"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"companyId\": \"companyId\",\n  \"websiteId\": \"websiteId\"\n}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/account","auth":"required","examples":{"codes":[{"language":"text","code":"{\n\t\"email\" : \"skynet@ai.com\",\n\t\"name\" : \"John Connor\",\n\t\"password\" : \"123456\",\n\t\"companyName\" : \"Skynet\",\n\t\"site\" : \"www.google.com/deepmind\"\n}"}]},"method":"post"},"next":{"pages":[],"description":""},"body":"**IMPORTANT: **\nThis is a restricted API call. You must be specifically whitelisted in onder to use this endpoint. \nGet in contact with hello@cliengo.com to ask for authorization.","category":"55aacfb3e2bdcb0d00c7466f","excerpt":"","isReference":false,"link_external":false,"order":5,"parentDoc":null,"__v":0,"title":"/account","updates":[],"sync_unique":"","createdAt":"2017-02-21T18:03:17.755Z","hidden":false,"childrenPages":[]}

post/account


**IMPORTANT: ** This is a restricted API call. You must be specifically whitelisted in onder to use this endpoint. Get in contact with hello@cliengo.com to ask for authorization.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



**IMPORTANT: ** This is a restricted API call. You must be specifically whitelisted in onder to use this endpoint. Get in contact with hello@cliengo.com to ask for authorization.
{"_id":"55b690b8c2e909190073eeb5","parentDoc":null,"type":"get","githubsync":"","hidden":false,"link_external":false,"next":{"description":"","pages":[]},"createdAt":"2015-07-27T20:12:40.529Z","isReference":false,"sync_unique":"","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","api":{"auth":"required","examples":{"codes":[]},"method":"get","params":[],"results":{"codes":[{"name":"","code":"{\n  id: \"55b6909444ae8172ac91b07a\",\n  url: \"www.yourwebsite.com\",\n  creationDate: \"2015-07-27T17:12:04.284-03:00\",\n  email: \"demo@yourwebsite.com\",\n  companyId: \"55b6909444ae8172ac91b078\",\n  title: \"Demo websites\",\n  type: \"WEBSITE\"\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/sites"},"order":0,"slug":"websites","updates":[],"excerpt":"","link_url":"","project":"55aa7d973be8f60d00041d42","title":"/sites","__v":2,"body":"A Website is an entity that links any existing website into Cliengo.\n\nAfter you create an Account in Cliengo, the next thing you have to do is to create a Website. In this entity you'll find the main configuration for your Contact adquisition strategy.","category":"55aacfaae2bdcb0d00c7466e","childrenPages":[]}

get/sites


A Website is an entity that links any existing website into Cliengo. After you create an Account in Cliengo, the next thing you have to do is to create a Website. In this entity you'll find the main configuration for your Contact adquisition strategy.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



A Website is an entity that links any existing website into Cliengo. After you create an Account in Cliengo, the next thing you have to do is to create a Website. In this entity you'll find the main configuration for your Contact adquisition strategy.
{"_id":"55b6934d6127b1250036450b","link_external":false,"next":{"description":"","pages":[]},"parentDoc":null,"project":"55aa7d973be8f60d00041d42","title":"/sites","api":{"examples":{"codes":[{"language":"curl","code":"curl --data \"email=demo@yourcompany.com&title=Your_website&url=www.yourdemowebsite.com\" https://api.cliengo.com/1.0/sites?api_key=your_api_key' "}]},"method":"post","params":[{"default":"","desc":"Email asociated with your website. You'll receive Contacts to this email.","in":"body","name":"email","ref":"","required":true,"type":"string","_id":"55b6a6af6127b1250036453e"},{"desc":"Title for your website.","in":"body","name":"title","ref":"","required":true,"type":"string","_id":"55b6a6af6127b1250036453d","default":""},{"in":"body","name":"url","ref":"","required":true,"type":"string","_id":"55b6a6af6127b1250036453c","default":"","desc":"The URL asociated with your website."},{"default":"","desc":"This Carbon Copy Emails will be copied on everty new Contact received. Separate by commas to add many.","in":"body","name":"ccEmails","ref":"","required":false,"type":"string","_id":"55b7de99568be2230092bbbc"},{"desc":"Reference that you can use to link the website to your system.","in":"body","name":"externalId","ref":"","required":false,"type":"string","_id":"55b7de99568be2230092bbbb","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  id: \"55b6909444ae8172ac91b07a\",\n  url: \"www.yourwebsite.com\",\n  creationDate: \"2015-07-27T17:12:04.284-03:00\",\n  email: \"demo@yourwebsite.com\",\n  companyId: \"55b6909444ae8172ac91b078\",\n  title: \"Demo websites\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/sites","auth":"required"},"createdAt":"2015-07-27T20:23:41.375Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"version":"55aa7d983be8f60d00041d45","__v":4,"category":"55aacfaae2bdcb0d00c7466e","editedParams2":true,"body":"","order":1,"updates":[],"slug":"websites-1","sync_unique":"","type":"post","user":"55aa7d625d3abb0d0012f3da","editedParams":true,"link_url":"","childrenPages":[]}

post/sites


Body Params

email:
required
string
Email asociated with your website. You'll receive Contacts to this email.
title:
required
string
Title for your website.
url:
required
string
The URL asociated with your website.
ccEmails:
string
This Carbon Copy Emails will be copied on everty new Contact received. Separate by commas to add many.
externalId:
string
Reference that you can use to link the website to your system.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b690f6c2e909190073eeb8","excerpt":"","githubsync":"","parentDoc":null,"project":"55aa7d973be8f60d00041d42","slug":"websiteswebsiteid","createdAt":"2015-07-27T20:13:42.665Z","api":{"settings":"","url":"/sites/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl 'https://api.cliengo.com/1.0/websites/{websiteId}?api_key=your_api_key' "}]},"method":"get","params":[{"desc":"","in":"path","name":"id","ref":"","required":true,"type":"string","_id":"55ac3c4c63a6b60d00661759","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  id: \"55b6909444ae8172ac91b07a\",\n  url: \"www.yourwebsite.com\",\n  creationDate: \"2015-07-27T17:12:04.284-03:00\",\n  email: \"demo@yourwebsite.com\",\n  companyId: \"55b6909444ae8172ac91b078\",\n  title: \"Demo websites\"\n}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]}},"editedParams":true,"isReference":false,"link_external":false,"title":"/sites/:id","user":"55aa7d625d3abb0d0012f3da","__v":1,"link_url":"","updates":[],"version":"55aa7d983be8f60d00041d45","category":"55aacfaae2bdcb0d00c7466e","editedParams2":true,"hidden":false,"next":{"description":"","pages":[]},"order":2,"sync_unique":"","type":"get","body":"","childrenPages":[]}

get/sites/:id


Path Params

id:
required
string

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b7e074aea7c8190058baaa","link_external":false,"order":3,"project":"55aa7d973be8f60d00041d42","slug":"websiteswebsiteid-1","__v":1,"api":{"auth":"required","examples":{"codes":[{"language":"curl","code":""}]},"method":"put","params":[{"ref":"","in":"body","required":false,"desc":"Email asociated with your website. You'll receive Contacts to this email.","default":"","type":"string","name":"email","_id":"55b6a6af6127b1250036453e"},{"in":"body","required":false,"desc":"Title for your website.","default":"","type":"string","name":"title","_id":"55b6a6af6127b1250036453d","ref":""},{"required":false,"desc":"The URL asociated with your website.","default":"","type":"string","name":"url","_id":"55b6a6af6127b1250036453c","ref":"","in":"body"},{"type":"string","name":"ccEmails","_id":"55b7de99568be2230092bbbc","ref":"","in":"body","required":false,"desc":"This Carbon Copy Emails will be copied on everty new Contact received.","default":""},{"desc":"Reference that you can use to link the website to your system.","default":"","type":"string","name":"externalId","_id":"55b7de99568be2230092bbbb","ref":"","in":"body","required":false},{"_id":"585042bf2272620f002835e0","default":"","desc":"","in":"path","name":"id","ref":"","required":true,"type":"string"}],"results":{"codes":[{"code":"{\n  id: \"55b6909444ae8172ac91b07a\",\n  url: \"www.yourwebsite.com\",\n  creationDate: \"2015-07-27T17:12:04.284-03:00\",\n  email: \"demo@yourwebsite.com\",\n  companyId: \"55b6909444ae8172ac91b078\",\n  title: \"Demo websites\",\n  type: \"WEBSITE\"\n}","language":"json","status":200,"name":""},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/sites/:id"},"createdAt":"2015-07-28T20:05:08.570Z","githubsync":"","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","editedParams2":true,"isReference":false,"sync_unique":"","next":{"description":"","pages":[]},"parentDoc":null,"title":"/sites/:id","type":"put","body":"","category":"55aacfaae2bdcb0d00c7466e","editedParams":true,"excerpt":"Update a Website entity","updates":[],"hidden":false,"link_url":"","childrenPages":[]}

put/sites/:id

Update a Website entity

Path Params

id:
required
string

Body Params

email:
string
Email asociated with your website. You'll receive Contacts to this email.
title:
string
Title for your website.
url:
string
The URL asociated with your website.
ccEmails:
string
This Carbon Copy Emails will be copied on everty new Contact received.
externalId:
string
Reference that you can use to link the website to your system.

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"585047159cafd70f002fd456","githubsync":"","isReference":false,"parentDoc":null,"project":"55aa7d973be8f60d00041d42","slug":"chatbots","title":"/sites/chatbots","type":"get","api":{"auth":"required","examples":{"codes":[{"code":"curl 'https://api.cliengo.com/1.0/sites/chatbots?api_key=your_api_key' ","language":"curl"}]},"method":"get","params":[{"required":false,"desc":"","default":"","type":"string","name":"id","_id":"58a35261254c401b00a04b65","ref":"","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"paging\": {\n    \"total\": 1\n  },\n  \"results\": [\n    {\n      \"askTelephone\": \"REQUIRED\",\n      \"askEmail\": \"REQUIRED\",\n      \"askDni\": \"NOTREQUIRED\",\n      \"color\": \"5ba0d0\",\n      \"saluteTime\": 0,\n      \"welcomeMessage\": \"\",\n      \"language\": \"es\",\n      \"newTitle\": \"\",\n      \"name\": \"Pilar\",\n      \"askTimeToCall\": true,\n      \"companyId\": \"58504f4c93f4f071f9d654ac\",\n      \"telephoneAnswer\": \"\",\n      \"customerSupportTime\": \"9 a 18hs.\",\n      \"addressAnswer\": \"\",\n      \"id\": \"58504f6e93f4f071f9d65535\"\n    }\n  ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/sites/chatbots"},"createdAt":"2016-12-13T19:08:05.751Z","updates":[],"body":"","category":"581b83288ca41f0f007e4fb6","excerpt":"","link_url":"","order":0,"sync_unique":"","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","__v":1,"hidden":false,"link_external":false,"next":{"pages":[],"description":""},"childrenPages":[]}

get/sites/chatbots


Path Params

id:
string

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"58ada49302f93c19004cb2f7","next":{"pages":[],"description":""},"updates":[],"version":"55aa7d983be8f60d00041d45","project":"55aa7d973be8f60d00041d42","api":{"method":"post","params":[],"results":{"codes":[{"name":"","code":"{\n  \"chatbotId\" : \"5i51492jofaidsfj9o\"\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/sites/chatbots","auth":"required","examples":{"codes":[{"language":"text","code":"{\n\t\"botColor\" : \"#4bbf6a\",\n  \"botName\" : \"Pilar\",\n  \"botWelcomeMsg\" : \"Hey, i'm online, how can i help you?\",\n  \"botProfilePic\" : \"http://url.com/picture.jpg\"\n  \"websiteId\" : \"15428rye8hfaidjalkf\"\n}"}]}},"body":"","category":"581b83288ca41f0f007e4fb6","excerpt":"","parentDoc":null,"order":1,"slug":"siteschatbots","sync_unique":"","__v":0,"hidden":false,"isReference":false,"link_external":false,"user":"55aa7d625d3abb0d0012f3da","createdAt":"2017-02-22T14:47:47.167Z","githubsync":"","link_url":"","title":"/sites/chatbots","type":"post","childrenPages":[]}

post/sites/chatbots



User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"581b8eec24d8c30f00abf153","isReference":false,"project":"55aa7d973be8f60d00041d42","sync_unique":"","title":"/sites/:id/chatbot","body":"","category":"581b83288ca41f0f007e4fb6","hidden":false,"slug":"chatbotswebsiteid","__v":1,"api":{"auth":"required","examples":{"codes":[{"code":"curl 'https://api.cliengo.com/1.0/sites/:id/chatbot?api_key=your_api_key' ","language":"curl"}]},"method":"get","params":[{"_id":"58502f7df744712700462b28","default":"","desc":"","in":"path","name":"id","ref":"","required":false,"type":"string"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"askTelephone\": \"OPTIONAL\",\n  \"askEmail\": \"OPTIONAL\",\n  \"askDni\": \"NOTREQUIRED\",\n  \"colorHex\": \"5BA0D0\",\n  \"language\": \"es\",\n  \"saluteTime\": 15,\n  \"telephoneAnswer\": \"\",\n  \"addressAnswer\": \"Yes our address is right in your heart.\",\n  \"initialMessage\": \"Hey there, how are you?\",\n  \"isRobotAnswer\": \"Hey there, i'm a chatbot! People usually call me skynet though.\",\n  \"priceAnswer\": \"\",\n  \"customerSupportTime\": \"9 to 18 hs\",\n  \"botName\": \"Pilar\",\n  \"initialMessageOn\": true,\n  \"newTitleOn\": false,\n  \"telephoneAnswerOn\": false,\n  \"answerCvOn\": false,\n  \"customerSupportTimeOn\": false,\n  \"isRobotAnswerOn\": false,\n  \"priceAnswerOn\": false,\n  \"addressAnswerOn\": false,\n  \"dontAskTimeToCall\": false,\n  \"botNameOn\": true,\n  \"companyId\": \"581b8133d4c611028e9b0e19\",\n  \"enabled\": true\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/sites/:id/chatbot"},"createdAt":"2016-11-03T19:24:28.256Z","next":{"pages":[],"description":""},"order":2,"excerpt":"","githubsync":"","link_external":false,"link_url":"","parentDoc":null,"type":"get","updates":[],"user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","childrenPages":[]}

get/sites/:id/chatbot


Path Params

id:
string

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"581b83f0f749100f00964ad0","next":{"pages":[],"description":""},"order":3,"sync_unique":"","updates":[],"__v":7,"isReference":false,"link_url":"","user":"55aa7d625d3abb0d0012f3da","hidden":false,"project":"55aa7d973be8f60d00041d42","slug":"chat-bots","type":"put","version":"55aa7d983be8f60d00041d45","body":"","category":"581b83288ca41f0f007e4fb6","excerpt":"Customize your ChatBot via API!","githubsync":"","title":"/sites/:id/chatbot","api":{"auth":"required","examples":{"codes":[{"code":"curl 'https://api.cliengo.com/1.0/chatbots/<websiteId>?api_key=your_api_key' ","language":"curl"},{"language":"groovy","code":"def leadaki = new HTTPBuilder(http://www.api.leadaki.com/1.0/chatbots/<websiteId>?api_key=APIKEY)\ndef reqBody = [newTitle: 'Sales Chat', botName: 'Alejandro']\nleadaki.put(reqBody)"}]},"method":"put","params":[{"in":"path","required":true,"desc":"","default":"","type":"string","name":"id","_id":"58502f5d7f4101390054092e","ref":""},{"desc":"Tells the bot how much to insist on getting a email (REQUIRED, NOTREQUIRED, OPTIONAL)","default":"REQUIRED","type":"string","name":"askEmail","_id":"581b88a6bdfa410f0087c270","ref":"","in":"body","required":false},{"_id":"581b88a6bdfa410f0087c26f","ref":"","in":"body","required":false,"desc":"Tells the bot how much to insist on getting a ID/DNI (REQUIRED, NOTREQUIRED, OPTIONAL)","default":"NOTREQUIRED","type":"string","name":"askDni"},{"_id":"581b88a6bdfa410f0087c271","ref":"","in":"body","required":false,"desc":"Tells the bot how much to insist on getting a telephone (REQUIRED, NOTREQUIRED, OPTIONAL)","default":"REQUIRED","type":"string","name":"askTelephone"},{"name":"askTimeToCall","_id":"581b88a6bdfa410f0087c261","ref":"","in":"body","required":false,"desc":"If set in true, after obtaining the client's phone, the bot will ask at which time they'd rather be called.","default":"false","type":"boolean"},{"type":"string","name":"question1","_id":"581b88a6bdfa410f0087c26d","ref":"","in":"body","required":false,"desc":"Additional question for when the flow finishes","default":""},{"desc":"Additional question for when the flow finishes","default":"","type":"string","name":"question2","_id":"581b88a6bdfa410f0087c26c","ref":"","in":"body","required":false},{"_id":"581b88a6bdfa410f0087c26b","ref":"","in":"body","required":false,"desc":"Additional question for when the flow finishes","default":"","type":"string","name":"question3"},{"_id":"581b88a6bdfa410f0087c266","ref":"","in":"body","required":false,"desc":"Defines what your bot says when someone asks for your company address.","default":"","type":"string","name":"addressAnswer"},{"name":"telephoneAnswer","_id":"581b88a6bdfa410f0087c267","ref":"","in":"body","required":false,"desc":"Defines what your bot says when someone asks for your company phone.","default":"","type":"string"},{"ref":"","in":"body","required":false,"desc":"Customized bot answer for when it announces that you are chatting with a robot","default":"","type":"string","name":"isRobotAnswer","_id":"581b8d1ebdfa410f0087c277"},{"default":"","type":"string","name":"welcomeMessage","_id":"581b88a6bdfa410f0087c265","ref":"","in":"body","required":false,"desc":"Defines what your bot says when it pops up (see saluteTime)"},{"in":"body","required":false,"desc":"Defines what your bot says when someone asks for your company customer support time.","default":"","type":"string","name":"customerSupportTime","_id":"581b88a6bdfa410f0087c264","ref":""},{"desc":"An image URL or a base64 encoded image","default":"","type":"string","name":"profilePic","_id":"58adb18175df0f1b001ed585","ref":"","in":"body","required":false},{"_id":"581b88a6bdfa410f0087c26e","ref":"","in":"body","required":false,"desc":"Change chat color based on a hexadecimal color (Ex: 5BA0D0)","default":"5BA0D0","type":"string","name":"color"},{"_id":"581b88a6bdfa410f0087c26a","ref":"","in":"body","required":false,"desc":"Chat language (en, es, pt)","default":"es","type":"string","name":"language"},{"_id":"581b88a6bdfa410f0087c268","ref":"","in":"body","required":false,"desc":"Chatbot window title","default":"","type":"string","name":"newTitle"},{"name":"name","_id":"581b88a6bdfa410f0087c263","ref":"","in":"body","required":false,"desc":"Your chatbot name.","default":"Pilar","type":"string"},{"ref":"","in":"body","required":false,"desc":"Time until the chat pops on a website in seconds.","default":"15","type":"int","name":"saluteTime","_id":"581b88a6bdfa410f0087c269"},{"in":"body","required":false,"desc":"Makes your bot answer/not answer when someone asks for your company customer support time.","default":"false","type":"boolean","name":"customerSupportTimeOn","_id":"581b88a6bdfa410f0087c262","ref":""},{"desc":"If set on true, the bot will reveal it's true self at the begging of the chat. (Will tell the user it's a chat bot and not a real operator)","default":"false","type":"boolean","name":"isRobotAnswerOn","_id":"581b8d1ebdfa410f0087c276","ref":"","in":"body","required":false}],"results":{"codes":[{"name":"","code":"{\n\t\"chatbotId\" : \"ID\"\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/sites/:id/chatbot"},"createdAt":"2016-11-03T18:37:36.924Z","link_external":false,"parentDoc":null,"childrenPages":[]}

put/sites/:id/chatbot

Customize your ChatBot via API!

Path Params

id:
required
string

Body Params

askEmail:
stringREQUIRED
Tells the bot how much to insist on getting a email (REQUIRED, NOTREQUIRED, OPTIONAL)
askDni:
stringNOTREQUIRED
Tells the bot how much to insist on getting a ID/DNI (REQUIRED, NOTREQUIRED, OPTIONAL)
askTelephone:
stringREQUIRED
Tells the bot how much to insist on getting a telephone (REQUIRED, NOTREQUIRED, OPTIONAL)
askTimeToCall:
booleanfalse
If set in true, after obtaining the client's phone, the bot will ask at which time they'd rather be called.
question1:
string
Additional question for when the flow finishes
question2:
string
Additional question for when the flow finishes
question3:
string
Additional question for when the flow finishes
addressAnswer:
string
Defines what your bot says when someone asks for your company address.
telephoneAnswer:
string
Defines what your bot says when someone asks for your company phone.
isRobotAnswer:
string
Customized bot answer for when it announces that you are chatting with a robot
welcomeMessage:
string
Defines what your bot says when it pops up (see saluteTime)
customerSupportTime:
string
Defines what your bot says when someone asks for your company customer support time.
profilePic:
string
An image URL or a base64 encoded image
color:
string5BA0D0
Change chat color based on a hexadecimal color (Ex: 5BA0D0)
language:
stringes
Chat language (en, es, pt)
newTitle:
string
Chatbot window title
name:
stringPilar
Your chatbot name.
saluteTime:
integer15
Time until the chat pops on a website in seconds.
customerSupportTimeOn:
booleanfalse
Makes your bot answer/not answer when someone asks for your company customer support time.
isRobotAnswerOn:
booleanfalse
If set on true, the bot will reveal it's true self at the begging of the chat. (Will tell the user it's a chat bot and not a real operator)

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"584f002b1318690f009c7b1f","link_url":"","parentDoc":null,"slug":"chatbots-triggers-get","sync_unique":"","title":"/sites/:id/chatbot/triggers","api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"get","params":[{"in":"path","required":false,"desc":"","default":"","type":"string","name":"id","_id":"58a352b42ae7ed0f00d372b9","ref":""}],"results":{"codes":[{"name":"","code":"{\n\t\"response\":\"Nice! You speak Latin!\",\n  \"stopNextMessage\": true,\n  \"ignoreLead\": false,\n  \"matches\" : [\n    {\n  \t\t\"type\": \"equals\",\n  \t\t\"value\": \"lorem ipsum dolor sit amet\"\n\t\t},\n    {\n  \t\t\"type\": \"regex\",\n  \t\t\"value\": \".*ipsum.*dol.*amet\"\n\t\t},\n  \t{\n  \t\t\"type\": \"contains\",\n  \t\t\"value\": \"ipsum dolor sit\"\n\t\t},\n\t\t{\n  \t\t\"type\": \"startswith\",\n  \t\t\"value\": \"lorem ipsum\"\n\t\t},\n    {\n  \t\t\"type\": \"endswith\",\n  \t\t\"value\": \"sit amet\"\n\t\t},\n    {\n  \t\t\"type\": \"phrase\",\n  \t\t\"value\": \"lorems ipsums doloris sitis ametos\"\n\t\t}    \n  ]\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/sites/:id/chatbot/triggers"},"createdAt":"2016-12-12T19:53:15.772Z","user":"55aa7d625d3abb0d0012f3da","project":"55aa7d973be8f60d00041d42","body":"[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"response\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Bot's answer to the message.\",\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type (default)\",\n    \"h-2\": \"Description\",\n    \"1-0\": \"stopNextMessage\",\n    \"1-1\": \"boolean (true)\",\n    \"1-2\": \"Will only send the response to the trigger. The bot will continue the conversation as normal once the user sends another message.\",\n    \"2-0\": \"ignoreLead\",\n    \"2-1\": \"boolean (false)\",\n    \"2-2\": \"Marks the lead as spam.\",\n    \"3-0\": \"matchesList\",\n    \"3-1\": \"array_object\",\n    \"3-2\": \"List of matchers for the trigger. Defined in the json below.\",\n    \"4-0\": \"matches[i].type\",\n    \"4-1\": \"One of this strings:\\n\\n-phrase\\n-contains\\n-startswith\\n-endswith\\n-equals\",\n    \"4-2\": \"IMPORTANT: ALL match strategies are **case-insensitive**)\\n\\n**phrase**: Use some intelligence to match if root keywords in user message match with \\\"value\\\"\\n\\n**regex**: Match the regular expression in \\\"value\\\"\\n\\n**equals**: Matches if user message is exactly **equals** to \\\"value\\\"\\n\\n**contains**: Matches if user message **contains** \\\"value\\\"\\n\\n**startswith**:  Matches if user message **starts with** \\\"value\\\"\\n\\n**endswith**: Matches if user message **ends with** \\\"value\\\"\",\n    \"5-0\": \"matches[i].value\",\n    \"5-1\": \"string\",\n    \"5-2\": \"the string value you want to match.\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]","githubsync":"","link_external":false,"next":{"pages":[],"description":""},"type":"get","version":"55aa7d983be8f60d00041d45","__v":3,"excerpt":"","hidden":false,"updates":[],"category":"581b83288ca41f0f007e4fb6","isReference":false,"order":4,"childrenPages":[]}

get/sites/:id/chatbot/triggers


Path Params

id:
string
[block:parameters] { "data": { "0-0": "response", "0-1": "string", "0-2": "Bot's answer to the message.", "h-0": "Field", "h-1": "Type (default)", "h-2": "Description", "1-0": "stopNextMessage", "1-1": "boolean (true)", "1-2": "Will only send the response to the trigger. The bot will continue the conversation as normal once the user sends another message.", "2-0": "ignoreLead", "2-1": "boolean (false)", "2-2": "Marks the lead as spam.", "3-0": "matchesList", "3-1": "array_object", "3-2": "List of matchers for the trigger. Defined in the json below.", "4-0": "matches[i].type", "4-1": "One of this strings:\n\n-phrase\n-contains\n-startswith\n-endswith\n-equals", "4-2": "IMPORTANT: ALL match strategies are **case-insensitive**)\n\n**phrase**: Use some intelligence to match if root keywords in user message match with \"value\"\n\n**regex**: Match the regular expression in \"value\"\n\n**equals**: Matches if user message is exactly **equals** to \"value\"\n\n**contains**: Matches if user message **contains** \"value\"\n\n**startswith**: Matches if user message **starts with** \"value\"\n\n**endswith**: Matches if user message **ends with** \"value\"", "5-0": "matches[i].value", "5-1": "string", "5-2": "the string value you want to match." }, "cols": 3, "rows": 6 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:parameters] { "data": { "0-0": "response", "0-1": "string", "0-2": "Bot's answer to the message.", "h-0": "Field", "h-1": "Type (default)", "h-2": "Description", "1-0": "stopNextMessage", "1-1": "boolean (true)", "1-2": "Will only send the response to the trigger. The bot will continue the conversation as normal once the user sends another message.", "2-0": "ignoreLead", "2-1": "boolean (false)", "2-2": "Marks the lead as spam.", "3-0": "matchesList", "3-1": "array_object", "3-2": "List of matchers for the trigger. Defined in the json below.", "4-0": "matches[i].type", "4-1": "One of this strings:\n\n-phrase\n-contains\n-startswith\n-endswith\n-equals", "4-2": "IMPORTANT: ALL match strategies are **case-insensitive**)\n\n**phrase**: Use some intelligence to match if root keywords in user message match with \"value\"\n\n**regex**: Match the regular expression in \"value\"\n\n**equals**: Matches if user message is exactly **equals** to \"value\"\n\n**contains**: Matches if user message **contains** \"value\"\n\n**startswith**: Matches if user message **starts with** \"value\"\n\n**endswith**: Matches if user message **ends with** \"value\"", "5-0": "matches[i].value", "5-1": "string", "5-2": "the string value you want to match." }, "cols": 3, "rows": 6 } [/block]
{"_id":"585030ffb832763900aa5bab","__v":2,"api":{"auth":"required","examples":{"codes":[]},"method":"post","params":[{"in":"body","required":false,"desc":"Bot's answer to the message.","default":"","type":"string","name":"response","_id":"58506caaeee93f1900161b74","ref":""},{"required":false,"desc":"Will only send the response to the trigger. The bot will continue the conversation as normal once the user sends another message.","default":"true","type":"boolean","name":"stopNextMessage","_id":"58506caaeee93f1900161b73","ref":"","in":"body"},{"ref":"","in":"body","required":false,"desc":"Marks the lead as spam.","default":"false","type":"boolean","name":"ignoreLead","_id":"58506caaeee93f1900161b72"},{"in":"body","required":false,"desc":"List of matchers for the trigger. Defined in the json below.","default":"","type":"array_object","name":"matchesList","_id":"58506caaeee93f1900161b71","ref":""},{"desc":"","default":"","type":"string","name":"id","_id":"58a352ca2ae7ed0f00d372bc","ref":"","in":"path","required":false}],"results":{"codes":[{"language":"text","code":""}]},"settings":"","url":"/sites/:id/chatbot/triggers"},"link_external":false,"slug":"chatbots-triggers-post","next":{"pages":[],"description":""},"parentDoc":null,"project":"55aa7d973be8f60d00041d42","category":"581b83288ca41f0f007e4fb6","githubsync":"","hidden":false,"link_url":"","sync_unique":"","title":"/sites/:id/chatbot/triggers","user":"55aa7d625d3abb0d0012f3da","body":"Check full fields documentation [at Triggers-GET](doc:chatbots-triggers-get)","createdAt":"2016-12-13T17:33:51.154Z","version":"55aa7d983be8f60d00041d45","excerpt":"","isReference":false,"order":5,"type":"post","updates":[],"childrenPages":[]}

post/sites/:id/chatbot/triggers


Path Params

id:
string

Body Params

response:
string
Bot's answer to the message.
stopNextMessage:
booleantrue
Will only send the response to the trigger. The bot will continue the conversation as normal once the user sends another message.
ignoreLead:
booleanfalse
Marks the lead as spam.
matchesList:
array of objects
List of matchers for the trigger. Defined in the json below.
Check full fields documentation [at Triggers-GET](doc:chatbots-triggers-get)

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}


Check full fields documentation [at Triggers-GET](doc:chatbots-triggers-get)
{"_id":"58502a94b832763900aa5ba6","api":{"auth":"required","examples":{"codes":[]},"method":"put","params":[{"_id":"585068a69cafd70f002fd479","ref":"","in":"body","required":false,"desc":"Bot's answer to the message.","default":"","type":"string","name":"response"},{"_id":"585068a69cafd70f002fd478","ref":"","in":"body","required":false,"desc":"Will only send the response to the trigger. The bot will continue the conversation as normal once the user sends another message.","default":"true","type":"boolean","name":"stopNextMessage"},{"_id":"585068a69cafd70f002fd477","ref":"","in":"body","required":false,"desc":"Marks the lead as spam.","default":"false","type":"boolean","name":"ignoreLead"},{"name":"matchesList","_id":"585068a69cafd70f002fd476","ref":"","in":"body","required":false,"desc":"List of matchers for the trigger. Defined in the json below.","default":"","type":"array_object"},{"type":"string","name":"id","_id":"58a352be3dfce00f00e3791b","ref":"","in":"path","required":false,"desc":"","default":""}],"results":{"codes":[{"language":"text","code":""}]},"settings":"","url":"/sites/:id/chatbot/triggers"},"link_external":false,"link_url":"","project":"55aa7d973be8f60d00041d42","sync_unique":"","updates":[],"category":"581b83288ca41f0f007e4fb6","order":6,"parentDoc":null,"excerpt":"","githubsync":"","isReference":false,"next":{"pages":[],"description":""},"slug":"chatbots-triggers-put","user":"55aa7d625d3abb0d0012f3da","type":"put","version":"55aa7d983be8f60d00041d45","__v":2,"body":"Check full fields documentation [at Triggers-GET](doc:chatbots-triggers-get)","createdAt":"2016-12-13T17:06:28.329Z","hidden":false,"title":"/sites/:id/chatbot/triggers","childrenPages":[]}

put/sites/:id/chatbot/triggers


Path Params

id:
string

Body Params

response:
string
Bot's answer to the message.
stopNextMessage:
booleantrue
Will only send the response to the trigger. The bot will continue the conversation as normal once the user sends another message.
ignoreLead:
booleanfalse
Marks the lead as spam.
matchesList:
array of objects
List of matchers for the trigger. Defined in the json below.
Check full fields documentation [at Triggers-GET](doc:chatbots-triggers-get)

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}


Check full fields documentation [at Triggers-GET](doc:chatbots-triggers-get)
{"_id":"55aa86cc3be8f60d00041d58","editedParams":true,"excerpt":"Get all contacts","githubsync":"","next":{"description":"","pages":[]},"sync_unique":"","createdAt":"2015-07-18T17:03:08.339Z","link_url":"","order":0,"slug":"contacts-get","updates":[],"__v":22,"api":{"auth":"required","examples":{"codes":[{"code":"curl \"https://api.cliengo.com/1.0/contacts?api_key={your_api_key}\"","name":"","language":"curl"}]},"method":"get","params":[{"_id":"55bb984ca8400c2d00873eb0","ref":"","in":"query","required":false,"desc":"find this query String within fields name, email and phone.","default":"","type":"string","name":"query"},{"_id":"55bb984ca8400c2d00873eaf","ref":"","in":"query","required":false,"desc":"The user's ID who the contact is assigned","default":"","type":"string","name":"assignedTo"},{"_id":"55bb984ca8400c2d00873eae","ref":"","in":"query","required":false,"desc":"filter contacts received in this websiteId","default":"","type":"string","name":"websiteId"},{"_id":"55bb984ca8400c2d00873ead","ref":"","in":"query","required":false,"desc":"the contact status. Posible values are: new, active, long_term and client","default":"","type":"string","name":"status"},{"_id":"5720f9d12ef7950e00fe6f80","ref":"","in":"query","required":false,"desc":"filter date since","default":"","type":"yyyy-mm-dd","name":"since"},{"_id":"5720f9d12ef7950e00fe6f7f","ref":"","in":"query","required":false,"desc":"filter date until","default":"","type":"yyyy-mm-dd","name":"until"},{"_id":"55bb984ca8400c2d00873eac","ref":"","in":"query","required":false,"desc":"you can move the lower limit of the result block (Default is 0)","default":"","type":"string","name":"offset"},{"_id":"55bb984ca8400c2d00873eab","ref":"","in":"query","required":false,"desc":"To reduce the page size you can change the limit parameter (Default is 25)","default":"","type":"string","name":"limit"}],"results":{"codes":[{"status":200,"name":"","code":"{\n  paging: {\n    limit: 50,\n    total: 2,\n    offset: 0\n\t},\n  results: [\n    {\n      id: \"55b7d5700364dfc80124b69c\",\n      status: \"new\",\n      name: \"Hueso Mansini\",\n      email: \"hueso@deportivomerlo.com\",\n      phone: \"4758948575\",\n      creationDate: \"2015-07-28T16:18:08.185-03:00\",\n      ip: \"172.34.5.6\",\n      conversionUrl: \"referer\",\n      landingUrl: \"refererTracking\",\n      message: \"mensaje nuevo\"\n    },\n    {\n      id: \"55b7d5700364dfc80124b69d\",\n      status: \"new\",\n      name: \"Pablo Picaso\",\n      email: \"pablo@picaso.com\",\n      phone: \"4758948575\",\n      creationDate: \"2015-07-28T16:18:08.215-03:00\",\n      ip: \"171.24.4.55\",\n      conversionUrl: \"referer\",\n      landingUrl: \"refererTracking\",\n      message: \"mensaje nuevo\"\n    }\n  ]\n}","language":"json"}]},"settings":"","url":"/contacts"},"body":"You can retrieve all Contacts you have in Cliengo CRM.","category":"55aacfca3be8f60d00041d8a","hidden":false,"type":"get","user":"55aa7d625d3abb0d0012f3da","editedParams2":true,"isReference":false,"link_external":false,"parentDoc":null,"project":"55aa7d973be8f60d00041d42","title":"/contacts","version":"55aa7d983be8f60d00041d45","childrenPages":[]}

get/contacts

Get all contacts

Query Params

query:
string
find this query String within fields name, email and phone.
assignedTo:
string
The user's ID who the contact is assigned
websiteId:
string
filter contacts received in this websiteId
status:
string
the contact status. Posible values are: new, active, long_term and client
since:
yyyy-mm-dd
filter date since
until:
yyyy-mm-dd
filter date until
offset:
string
you can move the lower limit of the result block (Default is 0)
limit:
string
To reduce the page size you can change the limit parameter (Default is 25)
You can retrieve all Contacts you have in Cliengo CRM.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You can retrieve all Contacts you have in Cliengo CRM.
{"_id":"55b79144568be2230092ba94","next":{"description":"","pages":[]},"type":"post","api":{"method":"post","params":[{"desc":"Contact Name","default":"","type":"string","name":"name","_id":"55b791d3aea7c8190058b94e","ref":"","in":"body","required":true},{"_id":"55b791d3aea7c8190058b94d","ref":"","in":"body","required":true,"desc":"E-mail contact","default":"","type":"string","name":"email"},{"_id":"55b791d3aea7c8190058b94a","ref":"","in":"body","required":true,"desc":"Website","default":"","type":"string","name":"websiteId"},{"_id":"55b791d3aea7c8190058b94c","ref":"","in":"body","required":false,"desc":"Phone","default":"","type":"string","name":"phone"},{"name":"ip","_id":"55b791d3aea7c8190058b949","ref":"","in":"body","required":false,"desc":"IP","default":"","type":"string"},{"type":"string","name":"conversionUrl","_id":"55b791d3aea7c8190058b948","ref":"","in":"body","required":false,"desc":"Conversion URL","default":""},{"desc":"Landing URL","default":"","type":"string","name":"landingUrl","_id":"55b791d3aea7c8190058b947","ref":"","in":"body","required":false},{"_id":"55b791d3aea7c8190058b946","ref":"","in":"body","required":false,"desc":"Message","default":"","type":"string","name":"message"},{"_id":"55b7d84a31bccb190081c0c0","ref":"","in":"body","required":false,"desc":"Free external reference","default":"","type":"string","name":"externalStatus"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  id: \"55b7ddad0364dfc80124b6ae\"\n  status: \"new\"\n  name: \"John\"\n  email: \"john@somedomain.com\"\n  phone: \"+54 11 9999-9999\"\n  creationDate: \"2015-07-28T16:53:17.907-03:00\"\n  websiteId: \"55b7dce30364dfc80124b6aa\"\n  ip: \"123.4.5.6\"\n  message: \"Hi! I'm John\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/contacts","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST 'https://api.cliengo.com/1.0/contacts' --data \"email=john@doerino.com&name=John Doerino&websiteId=add564573435&ip=128.4.3.5&conversionUrl=&landingUrl=www.example.com&message=mensaje&externalStatus=&api_key=YOURAPIKEY\"","name":""}]}},"editedParams2":true,"githubsync":"","link_url":"","order":1,"project":"55aa7d973be8f60d00041d42","slug":"contact","updates":[],"body":"","excerpt":"Add contact","editedParams":true,"link_external":false,"parentDoc":null,"sync_unique":"","version":"55aa7d983be8f60d00041d45","__v":4,"category":"55aacfca3be8f60d00041d8a","createdAt":"2015-07-28T14:27:16.084Z","user":"55aa7d625d3abb0d0012f3da","hidden":false,"isReference":false,"title":"/contacts","childrenPages":[]}

post/contacts

Add contact

Body Params

name:
required
string
Contact Name
email:
required
string
E-mail contact
websiteId:
required
string
Website
phone:
string
Phone
ip:
string
IP
conversionUrl:
string
Conversion URL
landingUrl:
string
Landing URL
message:
string
Message
externalStatus:
string
Free external reference

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b78741568be2230092ba73","type":"get","body":"","link_external":false,"order":2,"project":"55aa7d973be8f60d00041d42","title":"/contacts/:contactId","category":"55aacfca3be8f60d00041d8a","createdAt":"2015-07-28T13:44:33.397Z","editedParams2":true,"next":{"description":"","pages":[]},"updates":[],"sync_unique":"","version":"55aa7d983be8f60d00041d45","__v":6,"excerpt":"Get contact for ID","hidden":false,"isReference":false,"slug":"contactid","parentDoc":null,"user":"55aa7d625d3abb0d0012f3da","api":{"auth":"required","examples":{"codes":[{"name":"","code":"curl 'https://api.cliengo.com/1.0/contact/{contactId}/?api_key={your_api_key}' ","language":"curl"}]},"method":"get","params":[{"type":"string","_id":"55b787aa568be2230092ba78","default":"","desc":"ID Contact","in":"path","name":"contactId","ref":"","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  id: \"55b7d5700364dfc80124b69d\",\n  status: \"new\",\n  name: \"Pablo Picaso\",\n  email: \"pablo@picaso.com\",\n  phone: \"4758948575\",\n  creationDate: \"2015-07-28T16:18:08.215-03:00\",\n  ip: \"171.24.4.55\",\n  conversionUrl: \"referer\",\n  landingUrl: \"refererTracking\",\n  message: \"mensaje nuevo\"\n}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/contacts/:contactId"},"editedParams":true,"githubsync":"","link_url":"","childrenPages":[]}

get/contacts/:contactId

Get contact for ID

Path Params

contactId:
required
string
ID Contact

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b9290f8fd1a02b00f49694","isReference":false,"link_external":false,"type":"put","version":"55aa7d983be8f60d00041d45","__v":2,"body":"","githubsync":"","parentDoc":null,"project":"55aa7d973be8f60d00041d42","slug":"contacts","title":"/contacts/:contactId","api":{"url":"/contacts/:contactId","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT 'https://api.cliengo.com/1.0/contac' --data \"websiteId=55b7dce30364dfc80124b6aa&email=diego@leadaki.com&name=diego&phone=5437485696&ip=123.4.5.6&conversionUrl=&landingUrl=&status=active&message=mensaje&externalStatus=1234&api_key=your_api_key\"","name":""}]},"method":"put","params":[{"required":false,"desc":"","default":"","type":"string","name":"name","_id":"55b791d3aea7c8190058b94e","ref":"","in":"body"},{"type":"string","name":"email","_id":"55b791d3aea7c8190058b94d","ref":"","in":"body","required":false,"desc":"","default":""},{"required":false,"desc":"","default":"","type":"string","name":"phone","_id":"55b791d3aea7c8190058b94c","ref":"","in":"body"},{"ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"websiteId","_id":"55b791d3aea7c8190058b94a"},{"default":"","type":"string","name":"ip","_id":"55b791d3aea7c8190058b949","ref":"","in":"body","required":false,"desc":""},{"default":"","type":"string","name":"conversionUrl","_id":"55b791d3aea7c8190058b948","ref":"","in":"body","required":false,"desc":""},{"in":"body","required":false,"desc":"","default":"","type":"string","name":"landingUrl","_id":"55b791d3aea7c8190058b947","ref":""},{"desc":"","default":"","type":"string","name":"message","_id":"55b791d3aea7c8190058b946","ref":"","in":"body","required":false},{"_id":"55b7d84a31bccb190081c0c0","ref":"","in":"body","required":false,"desc":"Free reference user","default":"","type":"string","name":"externalStatus"},{"_id":"585043faf744712700462b64","ref":"","in":"path","required":true,"desc":"","default":"","type":"string","name":"contactId"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  id: \"55b7ddad0364dfc80124b6ae\"\n  status: \"active\"\n  name: \"diego\"\n  email: \"diego@cliengo.com\"\n  phone: \"5437485696\"\n  creationDate: \"2015-07-28T16:53:17.907-03:00\"\n  websiteId: \"55b7dce30364dfc80124b6aa\"\n  ip: \"123.4.5.6\"\n  message: \"esto es un mensaje\"\n}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":""},"editedParams2":true,"createdAt":"2015-07-29T19:27:11.423Z","editedParams":true,"hidden":false,"order":3,"sync_unique":"","updates":[],"category":"55aacfca3be8f60d00041d8a","user":"55aa7d625d3abb0d0012f3da","next":{"description":"","pages":[]},"excerpt":"Update contact","link_url":"","childrenPages":[]}

put/contacts/:contactId

Update contact

Path Params

contactId:
required
string

Body Params

name:
string
email:
string
phone:
string
websiteId:
string
ip:
string
conversionUrl:
string
landingUrl:
string
message:
string
externalStatus:
string
Free reference user

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b79032568be2230092ba91","user":"55aa7d625d3abb0d0012f3da","__v":1,"api":{"settings":"","url":"/contacts/:contactId/messages","auth":"required","examples":{"codes":[{"name":"","code":"curl 'https://api.cliengo.com/1.0/contacts/{contactId}/messages?api_key=TEST_API_KEY'","language":"curl"}]},"method":"get","params":[{"_id":"55b79032568be2230092ba92","default":"","desc":"Id Contact","name":"contactId","ref":"","required":true,"type":"string","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\nresults: [\n    {\n      creationDate: \"2014-07-04T18:06:05.170-03:00\",\n      message: \"Mensaje de prueba\"\n    },\n    {\n      creationDate: \"2014-07-04T18:07:08.796-03:00\",\n      message: \"Adiós!!!!\"\n    }\n\t],\n\tsize: 2\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"body":"","editedParams2":true,"isReference":false,"order":4,"version":"55aa7d983be8f60d00041d45","editedParams":true,"excerpt":"Get contact messages","hidden":false,"link_external":false,"next":{"pages":[],"description":""},"parentDoc":null,"title":"/contacts/:contactId/messages","category":"55aacfca3be8f60d00041d8a","createdAt":"2015-07-28T14:22:42.692Z","githubsync":"","link_url":"","sync_unique":"","updates":[],"project":"55aa7d973be8f60d00041d42","slug":"contactcontactidmessages","type":"get","childrenPages":[]}

get/contacts/:contactId/messages

Get contact messages

Path Params

contactId:
required
string
Id Contact

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b7e64b568be2230092bbe9","link_external":false,"version":"55aa7d983be8f60d00041d45","editedParams2":true,"isReference":false,"next":{"description":"","pages":[]},"project":"55aa7d973be8f60d00041d42","title":"/contacts/:contactId/messages","type":"post","__v":3,"body":"","createdAt":"2015-07-28T20:30:03.009Z","hidden":false,"link_url":"","sync_unique":"","updates":[],"user":"55aa7d625d3abb0d0012f3da","api":{"method":"post","params":[{"required":true,"desc":"","default":"","type":"string","name":"message","_id":"55b8dc9ee6d2a30d008e0403","ref":"","in":"body"},{"type":"string","name":"contactId","_id":"585044147f4101390054095a","ref":"","in":"path","required":true,"desc":"","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n\tcreationDate: \"Jul 29, 2015 11:37:17 AM\" \n\tmessage: \"mensaje 2\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""},{"language":"text","code":""}]},"settings":"","url":"/contacts/:contactId/messages","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST 'https://api.cliengo.com/1.0/contacts/{contactId}/message'  --data \"message={you_message}&api_key=your_api_key\"","name":""}]}},"excerpt":"Add contact messages","githubsync":"","parentDoc":null,"slug":"contactscontactidmessages","category":"55aacfca3be8f60d00041d8a","editedParams":true,"order":5,"childrenPages":[]}

post/contacts/:contactId/messages

Add contact messages

Path Params

contactId:
required
string

Body Params

message:
required
string

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b7aa36aea7c8190058b9bf","hidden":false,"sync_unique":"","excerpt":"Get contact notes","link_external":false,"next":{"description":"","pages":[]},"order":6,"slug":"contactcontactidnotes","version":"55aa7d983be8f60d00041d45","__v":1,"createdAt":"2015-07-28T16:13:42.357Z","editedParams":true,"editedParams2":true,"githubsync":"","isReference":false,"updates":[],"user":"55aa7d625d3abb0d0012f3da","body":"","category":"55aacfca3be8f60d00041d8a","link_url":"","parentDoc":null,"project":"55aa7d973be8f60d00041d42","title":"/contacts/:contactId/notes","type":"get","api":{"settings":"","url":"/contacts/:contactId/notes","auth":"required","examples":{"codes":[{"language":"curl","code":"curl 'https://api.cliengo.com/1.0/contacts/{contactId}/messages?api_key=TEST_API_KEY'\n","name":""}]},"method":"get","params":[{"desc":"","name":"contactId","ref":"","required":true,"type":"string","in":"path","_id":"55b7aa36aea7c8190058b9c0","default":""}],"results":{"codes":[{"name":"","code":"{\n\tresults: [1]\n\t\t0:  {\n\t\t\t\tcreationDate: \"2015-07-29T12:24:58.606-03:00\"\n        creatorId: \"55b8f02f03641e00511a46b5\"\n        message: \"mensaje 2\"\n        }\n\tsize: 1\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]}},"childrenPages":[]}

get/contacts/:contactId/notes

Get contact notes

Path Params

contactId:
required
string

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b7e66a31bccb190081c0fa","slug":"contactcontactidnotes-1","version":"55aa7d983be8f60d00041d45","githubsync":"","parentDoc":null,"project":"55aa7d973be8f60d00041d42","hidden":false,"isReference":false,"link_url":"","next":{"pages":[],"description":""},"api":{"method":"post","params":[{"required":true,"desc":"Text note","default":"","type":"string","name":"message","_id":"55b8f134146ef121002157c3","ref":"","in":"body"},{"ref":"","in":"path","required":true,"desc":"","default":"","type":"string","name":"contactId","_id":"58504432f744712700462b65"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  creationDate: \"2015-07-29T12:29:51.113-03:00\"\n  creatorId: \"55b8f02f03641e00511a46b5\"\n  message: \"mensaje de prueba\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/contacts/:contactId/notes","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST 'https://api.cliengo.com/1.0/contacts/{contactId}/message' --data \"api_key=your_api_key&message={you_message}\" ","name":""}]}},"category":"55aacfca3be8f60d00041d8a","editedParams":true,"editedParams2":true,"order":7,"title":"/contacts/:contactId/notes","sync_unique":"","type":"post","updates":[],"__v":3,"createdAt":"2015-07-28T20:30:34.765Z","excerpt":"Add contact notes","link_external":false,"body":"","user":"55aa7d625d3abb0d0012f3da","childrenPages":[]}

post/contacts/:contactId/notes

Add contact notes

Path Params

contactId:
required
string

Body Params

message:
required
string
Text note

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b8f4378fd1a02b00f4959f","api":{"auth":"required","examples":{"codes":[{"code":"curl 'https://api.cliengo.com/1.0/contacts/{contactId}/phone-calls?api_key=TEST_API_KEY'\n","language":"curl","name":""}]},"method":"get","params":[{"in":"path","required":true,"desc":"","default":"","type":"string","name":"contactId","_id":"5850443f658d6c2d00df13b3","ref":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  results: [2]\n    0:  {\n      id: \"null\"\n      creationDate: \"2015-07-29T16:17:26.102-03:00\"\n      answerTime: \"\"\n      duration: \"\"\n      endTime: \"\"\n      from: \"541155555551\"\n      startTime: \"\"\n      to: \"541155555555\"\n    }-\n    1:  {\n      id: \"null\"\n      creationDate: \"2015-07-29T16:19:41.099-03:00\"\n      answerTime: \"\"\n      duration: \"\"\n      endTime: \"\"\n      from: \"541155555551\"\n      startTime: \"\"\n      to: \"541155555555\"\n    }\n  size: 2\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/contacts/:contactId/phone-calls"},"project":"55aa7d973be8f60d00041d42","excerpt":"Get contact phone calls","hidden":false,"link_url":"","order":8,"type":"get","version":"55aa7d983be8f60d00041d45","__v":9,"category":"55aacfca3be8f60d00041d8a","isReference":false,"parentDoc":null,"sync_unique":"","user":"55aa7d625d3abb0d0012f3da","body":"","link_external":false,"next":{"description":"","pages":[]},"slug":"contactscontactidcalls-1","title":"/contacts/:contactId/phone-calls","updates":[],"createdAt":"2015-07-29T15:41:43.640Z","githubsync":"","childrenPages":[]}

get/contacts/:contactId/phone-calls

Get contact phone calls

Path Params

contactId:
required
string

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b8f3b28fd1a02b00f4958c","category":"55aacfca3be8f60d00041d8a","githubsync":"","hidden":false,"link_url":"","next":{"description":"","pages":[]},"link_external":false,"project":"55aa7d973be8f60d00041d42","type":"post","updates":[],"user":"55aa7d625d3abb0d0012f3da","parentDoc":null,"slug":"contactscontactidcalls","createdAt":"2015-07-29T15:39:30.534Z","editedParams":true,"editedParams2":true,"excerpt":"Add contact phone calls","isReference":false,"order":9,"version":"55aa7d983be8f60d00041d45","__v":2,"api":{"settings":"","url":"/contacts/:contactId/phone-calls","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST 'https://api.cliengo.com/1.0/contacts/phone-calls'  --data \"callStatus=&callerName=John Doe&event=&to=&callUUID=&recordingURL=&totalCost=&answerTime=&direction=&billRate=&hangupCause=&duration=&endTime=&startTime=&from=&api_key=YOURAPIKEY\"","name":""}]},"method":"post","params":[{"_id":"55b8f3b28fd1a02b00f4958d","ref":"","in":"body","required":true,"desc":"From cal","default":"","type":"string","name":"from"},{"name":"to","_id":"55b8f3b28fd1a02b00f49599","ref":"","in":"body","required":true,"desc":"To call","default":"","type":"string"},{"type":"string","name":"callStatus","_id":"55b8f3b28fd1a02b00f4959c","ref":"","in":"body","required":false,"desc":"Call status","default":""},{"desc":"Caller name","default":"","type":"string","name":"callerName","_id":"55b8f3b28fd1a02b00f4959b","ref":"","in":"body","required":false},{"_id":"55b8f3b28fd1a02b00f4959a","ref":"","in":"body","required":false,"desc":"Event","default":"","type":"string","name":"event"},{"name":"callUUID","_id":"55b8f3b28fd1a02b00f49598","ref":"","in":"body","required":false,"desc":"Call ID","default":"","type":"string"},{"type":"string","name":"recordingURL","_id":"55b8f3b28fd1a02b00f49597","ref":"","in":"body","required":false,"desc":"Recording URL","default":""},{"_id":"55b8f3b28fd1a02b00f49596","ref":"","in":"body","required":false,"desc":"Total cost","default":"","type":"string","name":"totalCost"},{"name":"answerTime","_id":"55b8f3b28fd1a02b00f49595","ref":"","in":"body","required":false,"desc":"Answer Time","default":"","type":"string"},{"type":"string","name":"direction","_id":"55b8f3b28fd1a02b00f49594","ref":"","in":"body","required":false,"desc":"Direction call","default":""},{"required":false,"desc":"Bill rate","default":"","type":"string","name":"billRate","_id":"55b8f3b28fd1a02b00f49593","ref":"","in":"body"},{"type":"string","name":"hangupCause","_id":"55b8f3b28fd1a02b00f49592","ref":"","in":"body","required":false,"desc":"Hangup cause","default":""},{"desc":"Duration call","default":"","type":"string","name":"duration","_id":"55b8f3b28fd1a02b00f49591","ref":"","in":"body","required":false},{"name":"billDuration","_id":"55b8f3b28fd1a02b00f49590","ref":"","in":"body","required":false,"desc":"Bill duration call","default":"","type":"string"},{"type":"string","name":"endTime","_id":"55b8f3b28fd1a02b00f4958f","ref":"","in":"body","required":false,"desc":"End time","default":""},{"required":false,"desc":"Start time","default":"","type":"string","name":"startTime","_id":"55b8f3b28fd1a02b00f4958e","ref":"","in":"body"},{"ref":"","in":"path","required":true,"desc":"","default":"","type":"string","name":"contactId","_id":"585044632272620f002835e2"}],"results":{"codes":[{"status":200,"language":"json","code":"{\nid: \"null\"\ncreationDate: \"2015-07-29T16:23:03.761-03:00\"\nanswerTime: \"\"\nduration: \"\"\nendTime: \"\"\nfrom: \"541155555551\"\nstartTime: \"\"\nto: \"541155555555\"\n}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]}},"body":"","sync_unique":"","title":"/contacts/:contactId/phone-calls","childrenPages":[]}

post/contacts/:contactId/phone-calls

Add contact phone calls

Path Params

contactId:
required
string

Body Params

from:
required
string
From cal
to:
required
string
To call
callStatus:
string
Call status
callerName:
string
Caller name
event:
string
Event
callUUID:
string
Call ID
recordingURL:
string
Recording URL
totalCost:
string
Total cost
answerTime:
string
Answer Time
direction:
string
Direction call
billRate:
string
Bill rate
hangupCause:
string
Hangup cause
duration:
string
Duration call
billDuration:
string
Bill duration call
endTime:
string
End time
startTime:
string
Start time

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55bbe8b7b72bad0d00c0d5dd","__v":1,"excerpt":"Get all contacts","slug":"contactsstatsbyfirstcontactmethod","sync_unique":"","version":"55aa7d983be8f60d00041d45","project":"55aa7d973be8f60d00041d42","updates":[],"category":"55aacfca3be8f60d00041d8a","editedParams2":true,"githubsync":"","order":10,"parentDoc":null,"type":"get","user":"55aa7d625d3abb0d0012f3da","api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"get","params":[{"_id":"55bb984ca8400c2d00873eb0","default":"","desc":"Days ago for grouping this stats. Cero or means no limit","in":"query","name":"sinceDaysAgo","ref":"","required":false,"type":"int"}],"results":{"codes":[{"name":"","code":"{\n  phone: 10,\n  from: 13,\n  chat: 25\n}","language":"json","status":200}]},"settings":"","url":"/contacts/stats/byFirstContactMethod"},"editedParams":true,"hidden":false,"title":"/contacts/stats/byFirstContactMethod","next":{"description":"","pages":[]},"body":"You can retrieve all Contacts you have in Cliengo CRM.","createdAt":"2015-07-31T21:29:27.495Z","isReference":false,"link_external":false,"link_url":"","childrenPages":[]}

get/contacts/stats/byFirstContactMethod

Get all contacts

Query Params

sinceDaysAgo:
integer
Days ago for grouping this stats. Cero or means no limit
You can retrieve all Contacts you have in Cliengo CRM.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



You can retrieve all Contacts you have in Cliengo CRM.
{"_id":"582f5f4fe367360f00bc5e63","updates":[],"hidden":false,"link_external":false,"next":{"pages":[],"description":""},"title":"/contacts/stats/lastWeek","type":"get","body":"Retrieves last seven days basic statistics. That is, last seven days clients, sales, and conversations.\n\nThis endpoint is still under development.","createdAt":"2016-11-18T20:06:39.368Z","isReference":false,"link_url":"","sync_unique":"","excerpt":"Retrieves last seven days basic statistics. That is, last seven days clients, sales, and conversations.","githubsync":"","order":11,"parentDoc":null,"slug":"contactsstatsnewcontactsbyday","version":"55aa7d983be8f60d00041d45","__v":2,"api":{"method":"get","params":[],"results":{"codes":[{"name":"","code":"[{\n  \"label\": \"Conversaciones\",\n  \"color\": \"#7266ba\",\n  \"data\": [\n    [\"Lu\", 210],\n    [\"Ma\", 120],\n    [\"Mi\", 270],\n    [\"Ju\", 240],\n    [\"Vi\", 160],\n    [\"Sa\", 390],\n    [\"Do\", 150]\n  ]\n}, {\n  \"label\": \"Clientes\",\n  \"color\": \"#2f80e7\",\n  \"data\": [\n    [\"Lu\", 70],\n    [\"Ma\", 85],\n    [\"Mi\", 59],\n    [\"Ju\", 93],\n    [\"Vi\", 66],\n    [\"Sa\", 86],\n    [\"Do\", 60]\n  ]\n}, {\n  \"label\": \"Ventas\",\n  \"color\": \"#00D062\",\n  \"data\": [\n    [\"Lu\", 12],\n    [\"Ma\", 4],\n    [\"Mi\", 8],\n    [\"Ju\", 11],\n    [\"Vi\", 6],\n    [\"Sa\", 15],\n    [\"Do\", 3]\n  ]\n}]","language":"json","status":200},{"code":"{\n  error: \"bad request\"\n}","language":"json","status":400,"name":""}]},"settings":"","url":"/contacts/stats/lastWeek","auth":"required","examples":{"codes":[]}},"category":"55aacfca3be8f60d00041d8a","project":"55aa7d973be8f60d00041d42","user":"55aa7d625d3abb0d0012f3da","childrenPages":[]}

get/contacts/stats/lastWeek

Retrieves last seven days basic statistics. That is, last seven days clients, sales, and conversations.

Retrieves last seven days basic statistics. That is, last seven days clients, sales, and conversations. This endpoint is still under development.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Retrieves last seven days basic statistics. That is, last seven days clients, sales, and conversations. This endpoint is still under development.
{"_id":"584077ffc05073190006357f","category":"55aacfca3be8f60d00041d8a","parentDoc":null,"project":"55aa7d973be8f60d00041d42","title":"/contacts/count","updates":[],"version":"55aa7d983be8f60d00041d45","api":{"settings":"","url":"/contacts/count","auth":"required","examples":{"codes":[]},"method":"get","params":[{"in":"query","name":"websiteId","ref":"","required":false,"type":"string","_id":"5841b074c7e458190091c8d3","default":"","desc":"contacts received in this websiteId"}],"results":{"codes":[{"language":"json","status":200,"name":"","code":"{\n  count: 1200\n}"},{"name":"","code":"{\n  error: \"bad-request\"\n}","language":"json","status":400}]}},"createdAt":"2016-12-01T19:20:31.659Z","link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":12,"githubsync":"","hidden":false,"isReference":false,"type":"get","__v":1,"body":"Retrieves the total amount o contacts for the company\n\nThis endpoint is under development","excerpt":"Retrieves the total amount o contacts for the company","slug":"contactscount","sync_unique":"","user":"55aa7d625d3abb0d0012f3da","childrenPages":[]}

get/contacts/count

Retrieves the total amount o contacts for the company

Query Params

websiteId:
string
contacts received in this websiteId
Retrieves the total amount o contacts for the company This endpoint is under development

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Retrieves the total amount o contacts for the company This endpoint is under development
{"_id":"58408297cee8ec1900c45836","category":"55aacfca3be8f60d00041d8a","createdAt":"2016-12-01T20:05:43.912Z","link_external":false,"slug":"contactscountsales","user":"55aa7d625d3abb0d0012f3da","type":"get","api":{"method":"get","params":[],"results":{"codes":[{"code":"{\n  count: 1200\n}","language":"json","status":200,"name":""},{"name":"","code":"{\n  error: \"bad-request\"\n}","language":"json","status":400}]},"settings":"","url":"/contacts/countsales","auth":"required","examples":{"codes":[]}},"githubsync":"","link_url":"","next":{"pages":[],"description":""},"parentDoc":null,"sync_unique":"","title":"/contacts/countsales","__v":0,"hidden":false,"updates":[],"body":"Retrieves the total amount of contacts which converted to sales for the company\n\nThis endpoint is under development","excerpt":"Retrieves the total amount of contacts which converted to sales for the company","isReference":false,"order":13,"project":"55aa7d973be8f60d00041d42","version":"55aa7d983be8f60d00041d45","childrenPages":[]}

get/contacts/countsales

Retrieves the total amount of contacts which converted to sales for the company

Retrieves the total amount of contacts which converted to sales for the company This endpoint is under development

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Retrieves the total amount of contacts which converted to sales for the company This endpoint is under development
{"_id":"55b7cc6c31bccb190081c08e","category":"55b7cae4aea7c8190058ba5b","isReference":false,"sync_unique":"","__v":5,"api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl \"https://api.cliengo.com/1.0/users/?api_key={your_api_key}\"","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n  results: [\n    {\n      name: \"Yepes\",\n      email: \"marianoyepes@gmail.com\",\n      privileges:\"basic,clients_read,clients_write\",\n      creationDate: \"2012-11-25T00:00:00.000-03:00\",\n      id: \"525ee44a44aea092fc6f75d4\"\n    },\n    {\n      name: \"Mario\",\n      email: \"mariomarian@dinahuapi.com\",\n      privileges: \"\",\n      creationDate: \"2015-07-28T15:23:42.457-03:00\",\n      id: \"55b7c8aed4c651f76bbd1b49\"\n    }\n],\nsize: 9\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/users"},"link_external":false,"parentDoc":null,"body":"","createdAt":"2015-07-28T18:39:40.237Z","excerpt":"Gets all users for your company.\n\nIf you have no permissions to view other users in your company, you will be returned a JSON with just your own user.","next":{"description":"","pages":[]},"project":"55aa7d973be8f60d00041d42","slug":"users","type":"get","updates":[],"user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","githubsync":"","hidden":false,"link_url":"","order":0,"title":"/users","childrenPages":[]}

get/users

Gets all users for your company. If you have no permissions to view other users in your company, you will be returned a JSON with just your own user.


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b7cff7aea7c8190058ba6f","user":"55aa7d625d3abb0d0012f3da","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"For security reasons, the user password isn't returned in the JSON.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"User Privileges\"\n}\n[/block]\nUser privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between.\n\nExample:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"clients_write,clients_read,users_read\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe set of privileges on the example would let the new user to be able to:\n* See clients within the company.\n* Create and edit clients within the company.\n* Only be able to see the users within the company, but not editing them.\n\nThere are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field.\n\nYou can see the list of privileges below:\n\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Privilege\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"clients_read\",\n    \"0-1\": \"Grants read permissions for clients within the company.\",\n    \"1-0\": \"clients_write\",\n    \"1-1\": \"Grants writing permissions for clients within the company.\",\n    \"2-0\": \"clients_read_assigned\",\n    \"2-1\": \"The user will only be able to read clients assigned to them.\",\n    \"3-0\": \"clients_write_assigned\",\n    \"3-1\": \"The user will only be able to write clients assigned to them.\",\n    \"4-0\": \"website_read\",\n    \"4-1\": \"Grants read permissions for websites within the company.\",\n    \"5-0\": \"website_write\",\n    \"5-1\": \"Grants write permissions for websites within the company.\",\n    \"6-0\": \"stats_read\",\n    \"6-1\": \"Grants read permissions for stats within the company.\",\n    \"7-0\": \"appointments_read\",\n    \"7-1\": \"Grants read permissions for appointments within the company.\",\n    \"8-0\": \"appointments_write\",\n    \"8-1\": \"Grants write permissions for appointments within the company.\",\n    \"9-0\": \"users_read\",\n    \"9-1\": \"Grants read permissions for users within the company.\",\n    \"10-0\": \"users_write\",\n    \"10-1\": \"Grants write permissions for users within the company.\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]","category":"55b7cae4aea7c8190058ba5b","isReference":false,"editedParams":true,"link_external":false,"title":"/users","type":"post","excerpt":"Creates user and returns JSON with data of the created user.","link_url":"","project":"55aa7d973be8f60d00041d42","__v":3,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  name: \"John Doe\",\n  email: \"john@doe.com\",\n  privileges: \"\",\n  creationDate: \"2015-07-28T15:48:43.000-03:00\",\n  id: \"55b7ce8bd4c651f76bbd1b4b\"\n}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/users","auth":"required","examples":{"codes":[{"language":"text","code":"curl -X POST 'https://api.cliengo.com/1.0/users' --data \"email=john@doe.com&name=John Doe&password=\"johndoerocks&api_key=YOURAPIKEY\"","name":""}]},"method":"post","params":[{"_id":"55b7cff7aea7c8190058ba73","default":"Required and Unique","desc":"Email for the user","in":"body","name":"email","ref":"","required":true,"type":"string"},{"type":"string","_id":"55b7cff7aea7c8190058ba70","default":"Required","desc":"Password for the user","in":"body","name":"password","ref":"","required":true},{"required":false,"type":"string","_id":"55b7cff7aea7c8190058ba72","default":"Not required","desc":"Name of the user","in":"body","name":"name","ref":""},{"in":"body","name":"phone","ref":"","required":false,"type":"string","_id":"55b7cff7aea7c8190058ba71","default":"Not required","desc":"Phone of the user"},{"required":false,"type":"array_string","_id":"55b910fbfeef5135009b7d74","default":"Not required, recommended.","desc":"Scroll down for more info.","in":"body","name":"privileges","ref":""}]},"createdAt":"2015-07-28T18:54:47.245Z","editedParams2":true,"parentDoc":null,"slug":"users-1","sync_unique":"","updates":[],"githubsync":"","hidden":false,"next":{"description":"","pages":[]},"order":1,"version":"55aa7d983be8f60d00041d45","childrenPages":[]}

post/users

Creates user and returns JSON with data of the created user.

Body Params

email:
required
stringRequired and Unique
Email for the user
password:
required
stringRequired
Password for the user
name:
stringNot required
Name of the user
phone:
stringNot required
Phone of the user
privileges:
array of stringsNot required, recommended.
Scroll down for more info.
[block:callout] { "type": "info", "title": "For security reasons, the user password isn't returned in the JSON." } [/block] [block:api-header] { "type": "basic", "title": "User Privileges" } [/block] User privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between. Example: [block:code] { "codes": [ { "code": "clients_write,clients_read,users_read", "language": "text" } ] } [/block] The set of privileges on the example would let the new user to be able to: * See clients within the company. * Create and edit clients within the company. * Only be able to see the users within the company, but not editing them. There are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field. You can see the list of privileges below: [block:parameters] { "data": { "h-0": "Privilege", "h-1": "Description", "0-0": "clients_read", "0-1": "Grants read permissions for clients within the company.", "1-0": "clients_write", "1-1": "Grants writing permissions for clients within the company.", "2-0": "clients_read_assigned", "2-1": "The user will only be able to read clients assigned to them.", "3-0": "clients_write_assigned", "3-1": "The user will only be able to write clients assigned to them.", "4-0": "website_read", "4-1": "Grants read permissions for websites within the company.", "5-0": "website_write", "5-1": "Grants write permissions for websites within the company.", "6-0": "stats_read", "6-1": "Grants read permissions for stats within the company.", "7-0": "appointments_read", "7-1": "Grants read permissions for appointments within the company.", "8-0": "appointments_write", "8-1": "Grants write permissions for appointments within the company.", "9-0": "users_read", "9-1": "Grants read permissions for users within the company.", "10-0": "users_write", "10-1": "Grants write permissions for users within the company." }, "cols": 2, "rows": 11 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "info", "title": "For security reasons, the user password isn't returned in the JSON." } [/block] [block:api-header] { "type": "basic", "title": "User Privileges" } [/block] User privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between. Example: [block:code] { "codes": [ { "code": "clients_write,clients_read,users_read", "language": "text" } ] } [/block] The set of privileges on the example would let the new user to be able to: * See clients within the company. * Create and edit clients within the company. * Only be able to see the users within the company, but not editing them. There are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field. You can see the list of privileges below: [block:parameters] { "data": { "h-0": "Privilege", "h-1": "Description", "0-0": "clients_read", "0-1": "Grants read permissions for clients within the company.", "1-0": "clients_write", "1-1": "Grants writing permissions for clients within the company.", "2-0": "clients_read_assigned", "2-1": "The user will only be able to read clients assigned to them.", "3-0": "clients_write_assigned", "3-1": "The user will only be able to write clients assigned to them.", "4-0": "website_read", "4-1": "Grants read permissions for websites within the company.", "5-0": "website_write", "5-1": "Grants write permissions for websites within the company.", "6-0": "stats_read", "6-1": "Grants read permissions for stats within the company.", "7-0": "appointments_read", "7-1": "Grants read permissions for appointments within the company.", "8-0": "appointments_write", "8-1": "Grants write permissions for appointments within the company.", "9-0": "users_read", "9-1": "Grants read permissions for users within the company.", "10-0": "users_write", "10-1": "Grants write permissions for users within the company." }, "cols": 2, "rows": 11 } [/block]
{"_id":"55b7eb1daea7c8190058bad2","githubsync":"","hidden":false,"link_url":"","body":"","category":"55b7cae4aea7c8190058ba5b","editedParams":true,"editedParams2":true,"excerpt":"","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","sync_unique":"","createdAt":"2015-07-28T20:50:37.307Z","order":2,"parentDoc":null,"project":"55aa7d973be8f60d00041d42","slug":"usersuserid","__v":1,"isReference":false,"title":"/users/:userId","type":"get","updates":[],"api":{"method":"get","params":[{"name":"userId","ref":"","required":true,"type":"string","_id":"55b7eb1daea7c8190058bad3","default":"","desc":"User ID","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  name: \"John Doe\",\n  email: \"john@doe.com\",\n  privileges: \"\",\n  creationDate: \"2015-07-28T17:36:43.646-03:00\",\n  id: \"55b7e7dbd4c62a298ff3fabc\"\n}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"/users/:userId","auth":"required","examples":{"codes":[{"language":"curl","code":"curl 'https://api.cliengo.com/1.0/users/55b7e7dbd4c62a298ff3fabc?api_key={your_api_key}' ","name":""}]}},"link_external":false,"next":{"description":"","pages":[]},"childrenPages":[]}

get/users/:userId


Path Params

userId:
required
string
User ID

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"55b7ec0d31bccb190081c11c","editedParams2":true,"excerpt":"","githubsync":"","link_external":false,"link_url":"","next":{"description":"","pages":[]},"createdAt":"2015-07-28T20:54:37.025Z","slug":"usersuserid-1","type":"put","version":"55aa7d983be8f60d00041d45","order":3,"project":"55aa7d973be8f60d00041d42","isReference":false,"sync_unique":"","updates":[],"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"User Privileges\"\n}\n[/block]\nUser privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between.\n\nExample:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"clients_write,clients_read,users_read\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe set of privileges on the example would let the new user to be able to:\n* See clients within the company.\n* Create and edit clients within the company.\n* Only be able to see the users within the company, but not editing them.\n\nThere are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field.\n\nYou can see the list of privileges below:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"clients_read\",\n    \"1-0\": \"clients_write\",\n    \"2-0\": \"clients_read_assigned\",\n    \"3-0\": \"clients_write_assigned\",\n    \"4-0\": \"website_read\",\n    \"5-0\": \"website_write\",\n    \"6-0\": \"stats_read\",\n    \"7-0\": \"appointments_read\",\n    \"8-0\": \"appointments_write\",\n    \"9-0\": \"users_read\",\n    \"10-0\": \"users_write\",\n    \"0-1\": \"Grants read permissions for clients within the company.\",\n    \"1-1\": \"Grants writing permissions for clients within the company.\",\n    \"2-1\": \"The user will only be able to read clients assigned to them.\",\n    \"3-1\": \"The user will only be able to write clients assigned to them.\",\n    \"4-1\": \"Grants read permissions for websites within the company.\",\n    \"5-1\": \"Grants write permissions for websites within the company.\",\n    \"6-1\": \"Grants read permissions for stats within the company.\",\n    \"7-1\": \"Grants read permissions for appointments within the company.\",\n    \"8-1\": \"Grants write permissions for appointments within the company.\",\n    \"9-1\": \"Grants read permissions for users within the company.\",\n    \"10-1\": \"Grants write permissions for users within the company.\",\n    \"h-0\": \"Privilege\",\n    \"h-1\": \"Description\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]","category":"55b7cae4aea7c8190058ba5b","hidden":false,"parentDoc":null,"title":"/users/:userId","user":"55aa7d625d3abb0d0012f3da","__v":2,"editedParams":true,"api":{"results":{"codes":[{"language":"json","code":"{\n  name: \"John Doerino\",\n  email: \"john@doerino.com\",\n  privileges: \"\",\n  creationDate: \"2015-07-28T17:36:43.646-03:00\",\n  id: \"55b7e7dbd4c62a298ff3fabc\"\n}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/users/:userId","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT 'https://api.cliengo.com/1.0/users/55b7e7dbd4c62a298ff3fabc' --data \"email=john@doerino.com&name=John Doerino&api_key=YOURAPIKEY\"","name":""}]},"method":"put","params":[{"in":"path","name":"userId","ref":"","required":true,"type":"string","_id":"55b7ec0d31bccb190081c11d","default":"Required.","desc":"ID of the User."},{"required":false,"type":"string","_id":"55b915cbfeef5135009b7d89","default":"","desc":"Scroll down for information about privileges.","in":"body","name":"privileges","ref":""},{"in":"body","name":"email","ref":"","required":false,"type":"string","_id":"55b915cbfeef5135009b7d88","default":"","desc":""},{"default":"","desc":"","in":"body","name":"name","ref":"","required":false,"type":"string","_id":"55b915cbfeef5135009b7d87"},{"desc":"","in":"body","name":"password","ref":"","required":false,"type":"string","_id":"55b915cbfeef5135009b7d86","default":""},{"in":"body","name":"phone","ref":"","required":false,"type":"string","_id":"55b915cbfeef5135009b7d85","default":"","desc":""}]},"childrenPages":[]}

put/users/:userId


Path Params

userId:
required
stringRequired.
ID of the User.

Body Params

privileges:
string
Scroll down for information about privileges.
email:
string
name:
string
password:
string
phone:
string
[block:api-header] { "type": "basic", "title": "User Privileges" } [/block] User privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between. Example: [block:code] { "codes": [ { "code": "clients_write,clients_read,users_read", "language": "text" } ] } [/block] The set of privileges on the example would let the new user to be able to: * See clients within the company. * Create and edit clients within the company. * Only be able to see the users within the company, but not editing them. There are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field. You can see the list of privileges below: [block:parameters] { "data": { "0-0": "clients_read", "1-0": "clients_write", "2-0": "clients_read_assigned", "3-0": "clients_write_assigned", "4-0": "website_read", "5-0": "website_write", "6-0": "stats_read", "7-0": "appointments_read", "8-0": "appointments_write", "9-0": "users_read", "10-0": "users_write", "0-1": "Grants read permissions for clients within the company.", "1-1": "Grants writing permissions for clients within the company.", "2-1": "The user will only be able to read clients assigned to them.", "3-1": "The user will only be able to write clients assigned to them.", "4-1": "Grants read permissions for websites within the company.", "5-1": "Grants write permissions for websites within the company.", "6-1": "Grants read permissions for stats within the company.", "7-1": "Grants read permissions for appointments within the company.", "8-1": "Grants write permissions for appointments within the company.", "9-1": "Grants read permissions for users within the company.", "10-1": "Grants write permissions for users within the company.", "h-0": "Privilege", "h-1": "Description" }, "cols": 2, "rows": 11 } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "User Privileges" } [/block] User privileges define what a user can edit inside the CRM and the API. You can define them by sending them separated with commas, no spaces in between. Example: [block:code] { "codes": [ { "code": "clients_write,clients_read,users_read", "language": "text" } ] } [/block] The set of privileges on the example would let the new user to be able to: * See clients within the company. * Create and edit clients within the company. * Only be able to see the users within the company, but not editing them. There are two types of privileges, write and read. The read privilege, grants reading permissions. The write privilege will let the user edit and create X field. You can see the list of privileges below: [block:parameters] { "data": { "0-0": "clients_read", "1-0": "clients_write", "2-0": "clients_read_assigned", "3-0": "clients_write_assigned", "4-0": "website_read", "5-0": "website_write", "6-0": "stats_read", "7-0": "appointments_read", "8-0": "appointments_write", "9-0": "users_read", "10-0": "users_write", "0-1": "Grants read permissions for clients within the company.", "1-1": "Grants writing permissions for clients within the company.", "2-1": "The user will only be able to read clients assigned to them.", "3-1": "The user will only be able to write clients assigned to them.", "4-1": "Grants read permissions for websites within the company.", "5-1": "Grants write permissions for websites within the company.", "6-1": "Grants read permissions for stats within the company.", "7-1": "Grants read permissions for appointments within the company.", "8-1": "Grants write permissions for appointments within the company.", "9-1": "Grants read permissions for users within the company.", "10-1": "Grants write permissions for users within the company.", "h-0": "Privilege", "h-1": "Description" }, "cols": 2, "rows": 11 } [/block]
{"_id":"56548c8e9c4c6d0d00aeda0f","editedParams2":true,"link_url":"","parentDoc":null,"version":"55aa7d983be8f60d00041d45","__v":2,"api":{"url":"/conversations","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \"https://api.cliengo.com/1.0/conversations?api_key={your_api_key}\"","name":""}]},"method":"get","params":[{"in":"query","name":"websiteId","ref":"","required":false,"type":"string","_id":"55bb984ca8400c2d00873eae","default":"","desc":"Filter conversations received in this websiteId"},{"default":"","desc":"The conversations status. Posible values are: new, active, long_term and client","in":"query","name":"status","ref":"","required":false,"type":"string","_id":"55bb984ca8400c2d00873ead"},{"ref":"","required":false,"type":"string","_id":"55bb984ca8400c2d00873eac","default":"","desc":"You can move the lower limit of the result block (Default is 0)","in":"query","name":"offset"},{"desc":"To reduce the page size you can change the limit parameter (Default is 25)","in":"query","name":"limit","ref":"","required":false,"type":"string","_id":"55bb984ca8400c2d00873eab","default":""}],"results":{"codes":[{"name":"","code":"[{\n  id: \"55b7d5700364dfc80124b69d\",\n  lastMessage: \"Sí, dale!\",\n  creationDate: \"2015-07-28T16:18:08.215-03:00\",\n  participants : [\n    {\n      id: \"userId_1\",\n     \ttype:\"user\"\n    },\n    {\n      id: \"robotID\",\n     \ttype:\"robot\"\n    },\n    {\n      id: \"0.31676287087611854@leadaki-chats.com\",\n     \ttype:\"visitor\"\n    }\n  ],\n  contactId: \"55dfasdf3452364237235\", //se crea cuando el visitante deja sus datos\n  websiteId: \"3452346a8ns8hn1864224\",\n  totalUnreadMessages: 0,\n},\n{\n  id: \"55b7d5700343523623134\",\n  lastMessage: \"No, dale!\",\n  creationDate: \"2015-07-28T16:18:08.215-03:00\",\n  participants : [\n    {\n      id: \"userId_1\",\n     \ttype:\"user\"\n    },\n    {\n      id: \"robotID\",\n     \ttype:\"robot\"\n    },\n    {\n      id: \"0.31676287087611854@leadaki-chats.com\",\n     \ttype:\"visitor\"\n    }\n  ],\n  contactId: \"55dfasdf87Y7dtastasd\", //se crea cuando el visitante deja sus datos\n  websiteId: \"128123asha8ns8hn18\",\n  totalUnreadMessages: 0,\n}]","language":"json","status":200}]},"settings":""},"hidden":false,"sync_unique":"","type":"get","createdAt":"2015-11-24T16:13:02.844Z","isReference":false,"next":{"description":"","pages":[]},"order":0,"slug":"conversations","link_external":false,"project":"55aa7d973be8f60d00041d42","title":"/conversations","body":"You can retrieve all Conversations you have in Cliengo CRM.","category":"56548b9c9c4c6d0d00aeda0c","editedParams":true,"excerpt":"Get all conversations","githubsync":"","updates":[],"user":"55aa7d625d3abb0d0012f3da","childrenPages":[]}

get/conversations

Get all conversations

Query Params

websiteId:
string
Filter conversations received in this websiteId
status:
string
The conversations status. Posible values are: new, active, long_term and client
offset:
string
You can move the lower limit of the result block (Default is 0)
limit:
string
To reduce the page size you can change the limit parameter (Default is 25)
You can retrieve all Conversations you have in Cliengo CRM.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You can retrieve all Conversations you have in Cliengo CRM.
{"_id":"565c68bcea82b00d00f949c0","slug":"conversationidmessage","version":"55aa7d983be8f60d00041d45","category":"56548b9c9c4c6d0d00aeda0c","link_external":false,"project":"55aa7d973be8f60d00041d42","editedParams":true,"excerpt":"","hidden":false,"parentDoc":null,"sync_unique":"","__v":6,"api":{"method":"post","params":[{"required":false,"desc":"Visitor description","default":"","type":"string","name":"from","_id":"565ef69f1b5fe20d0030b457","ref":"","in":"body"},{"ref":"","in":"body","required":false,"desc":"Message text","default":"","type":"string","name":"message","_id":"566acdb0c7c3cd1700265d10"},{"in":"path","required":true,"desc":"","default":"","type":"string","name":"websiteId","_id":"5850646616482d0f00f3b117","ref":""}],"results":{"codes":[{"name":"","code":"{\n\t\t\"paging\": {\n\t\t\"total\": 2\n\t\t}\n  \t\"results\": [2]\n        0:  {\n            \"conversationId\": \"566ac57203640db344531742\"\n            \"id\": \"566ac57203640db344531743\"\n            \"type\": \"models.chat.MessageText\"\n            \"body\": \"esto es un mensaje de bienvenida!\"\n            \"sender\": {\n                \"id\": \"4323643262346234@leadaki.com\"\n                \"type\": \"models.User\"\n           \t}\n          }\n        1:  {\n            \"conversationId\": \"566ac57203640db344531742\"\n            \"id\": \"566ac58503640db344531744\"\n            \"type\": \"models.chat.MessageText\"\n            \"body\": \"hola este es el mensaje\"\n            \"sender\": {\n            \t\t\"id\": \"566ac56703640db34453171d\"\n            \t\t\"type\": \"models.User\"\n        \t\t}\n    \t\t}\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/conversationId/:websiteId/create","auth":"required","examples":{"codes":[{"code":"curl \"https://api.cliengo.com/1.0/conversations/{websiteId}/message?api_key={your_api_key}\"","language":"curl","name":""}]}},"isReference":false,"link_url":"","next":{"description":"","pages":[]},"githubsync":"","order":1,"title":"/conversations/:websiteId/create","type":"post","updates":[],"body":"","createdAt":"2015-11-30T15:18:20.678Z","editedParams2":true,"user":"55aa7d625d3abb0d0012f3da","childrenPages":[]}

post/conversations/:websiteId/create


Path Params

websiteId:
required
string

Body Params

from:
string
Visitor description
message:
string
Message text

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5654a2a9892a0d2b00cedc0c","link_url":"","title":"/conversations/:conversationId","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","createdAt":"2015-11-24T17:47:21.038Z","hidden":false,"category":"56548b9c9c4c6d0d00aeda0c","api":{"auth":"required","examples":{"codes":[{"code":"curl 'https://api.cliengo.com/1.0/conversations/{conversationsId}/?api_key={your_api_key}' ","language":"curl","name":""}]},"method":"get","params":[{"ref":"","required":true,"type":"string","_id":"55b787aa568be2230092ba78","default":"","desc":"ID Conversation","in":"query","name":"conversationsID"}],"results":{"codes":[{"name":"","code":"{\n  id: \"55b7d5700364dfc80124b69d\",\n  lastMessage: \"Sí, dale!\",\n  creationDate: \"2015-07-28T16:18:08.215-03:00\",\n  participants : [\n    {\n      id: \"userId_1\",\n     \ttype:\"user\"\n    },\n    {\n      id: \"robotID\",\n     \ttype:\"robot\"\n    },\n    {\n      id: \"0.31676287087611854@leadaki-chats.com\",\n     \ttype:\"visitor\"\n    }\n  ],\n  contactId: \"55dfasdf87Y7dtastasd\", //se crea cuando el visitante deja sus datos\n  websiteId: \"128123asha8ns8hn18\",\n  totalUnreadMessages: 0,\n}","language":"json","status":200},{"language":"json","status":400,"name":"","code":"{}"}]},"settings":"","url":"/conversations/:conversationId"},"body":"","editedParams":true,"editedParams2":true,"excerpt":"Get contact for ID","link_external":false,"next":{"description":"","pages":[]},"__v":1,"parentDoc":null,"project":"55aa7d973be8f60d00041d42","slug":"conversations-getbyid","type":"get","updates":[],"order":2,"githubsync":"","isReference":false,"sync_unique":"","childrenPages":[]}

get/conversations/:conversationId

Get contact for ID

Query Params

conversationsID:
required
string
ID Conversation

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5654a46e0af52835008e77a2","next":{"description":"","pages":[]},"parentDoc":null,"__v":1,"api":{"url":"/conversations/:conversationId/messages","auth":"required","examples":{"codes":[{"name":"","code":"curl 'https://api.cliengo.com/1.0/conversations/{conversationId}/messages?api_key=TEST_API_KEY'","language":"curl"}]},"method":"get","params":[{"required":true,"type":"string","_id":"55b79032568be2230092ba92","default":"","desc":"Id conversation","in":"path","name":"conversationId","ref":""}],"results":{"codes":[{"code":"{\n  paging: {\n    limit: 50,\n    total: 2,\n    offset: 0\n  },\n\tresults: [\n    {\n      id:\"117bdasjasd9mj29jd100\",\n      type: \"text/plain\",\n      body: \"hola mundo!\",\n      sender: {\n        id: \"1234\",\n        type : \"robot\",\n        name: null\n      },\n      sentAt: \"2014-09-09T04:44:47+00:00\",\n      isUnread: true, //depende del user que esté consultando la API\n    },\n    {\n      id: \"117bdasjasd9mj29jd101\",\n      type: \"text/plain\",\n      body: \"hola mundo!\",\n      sender: {\n        id: \"1234\",\n        type : \"robot\",\n        name: null\n      },\n      sentAt: \"2014-09-09T04:44:47+00:00\",\n      isUnread: true, //depende del user que esté consultando la API\n    }\n\t]\n}","language":"json","status":200,"name":""},{"language":"json","status":400,"name":"","code":"{}"}]},"settings":""},"createdAt":"2015-11-24T17:54:54.470Z","editedParams":true,"editedParams2":true,"link_url":"","githubsync":"","hidden":false,"link_external":false,"title":"/conversations/:conversationId/messages","updates":[],"body":"","order":3,"slug":"conversations-id-messages-get","sync_unique":"","version":"55aa7d983be8f60d00041d45","user":"55aa7d625d3abb0d0012f3da","category":"56548b9c9c4c6d0d00aeda0c","excerpt":"Get conversation messages","isReference":false,"project":"55aa7d973be8f60d00041d42","type":"get","childrenPages":[]}

get/conversations/:conversationId/messages

Get conversation messages

Path Params

conversationId:
required
string
Id conversation

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5655d211648fc80d00bd0afa","editedParams2":true,"excerpt":"Get conversation messages","link_external":false,"project":"55aa7d973be8f60d00041d42","slug":"conversationsidmessagesid","body":"Message\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  id: \\\"117bdasjasd9mj29jd233\\\",\\n  type: \\\"text/plain\\\",\\n  body: \\\"hola mundo!\\\",\\n\\tsender: {\\n    id: \\\"1234\\\",\\n    type : \\\"robot\\\",\\n    name: null\\n  },\\n\\tconversationId:\\\"asd8bqwwdyqdqydqyasdas\\\",\\n  sentAt: \\\"2014-09-09T04:44:47+00:00\\\",\\n  isUnread: true, //depende del user que esté consultando la API\\n  recipient_status: { //WIP\\n    \\\"777\\\": \\\"sent\\\",\\n    \\\"111\\\": \\\"delivered\\\",\\n    \\\"999\\\": \\\"read\\\",\\n    \\\"1234\\\": \\\"read\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nURL visit\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  type: \\\"message/http\\\",\\n  body: \\\"http://www.cliengo.com/precios\\\",\\n  ...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nAudio\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  type: \\\"audio/mpeg\\\",\\n  body: \\\"http://www.cliengo.com/blaasdadadasd.mp3\\\",\\n  ...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nEmail\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  type: \\\"email\\\",\\n  body: \\\"hola esto vino en un email!\\\",\\n  ...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","api":{"url":"/conversations/:conversationId/messages/:messageId","auth":"required","examples":{"codes":[{"name":"","code":"curl 'https://api.cliengo.com/1.0/conversations/{conversationId}/messages/{messageId}?api_key=TEST_API_KEY'","language":"curl"}]},"method":"get","params":[{"_id":"55b79032568be2230092ba92","default":"","desc":"Id conversation","in":"path","name":"conversationsId","ref":"","required":true,"type":"string"},{"_id":"5655d211648fc80d00bd0afb","default":"","desc":"","in":"path","name":"messageId","ref":"","required":true,"type":"string"}],"results":{"codes":[{"language":"text","code":""}]},"settings":""},"createdAt":"2015-11-25T15:21:53.510Z","link_url":"","title":"/conversations/:conversationId/messages/:messageId","updates":[],"version":"55aa7d983be8f60d00041d45","__v":1,"hidden":false,"isReference":false,"order":4,"parentDoc":null,"sync_unique":"","type":"get","user":"55aa7d625d3abb0d0012f3da","editedParams":true,"githubsync":"","next":{"description":"","pages":[]},"category":"56548b9c9c4c6d0d00aeda0c","childrenPages":[]}

get/conversations/:conversationId/messages/:messageId

Get conversation messages

Path Params

conversationsId:
required
string
Id conversation
messageId:
required
string
Message [block:code] { "codes": [ { "code": "{\n id: \"117bdasjasd9mj29jd233\",\n type: \"text/plain\",\n body: \"hola mundo!\",\n\tsender: {\n id: \"1234\",\n type : \"robot\",\n name: null\n },\n\tconversationId:\"asd8bqwwdyqdqydqyasdas\",\n sentAt: \"2014-09-09T04:44:47+00:00\",\n isUnread: true, //depende del user que esté consultando la API\n recipient_status: { //WIP\n \"777\": \"sent\",\n \"111\": \"delivered\",\n \"999\": \"read\",\n \"1234\": \"read\"\n }\n}", "language": "json" } ] } [/block] URL visit [block:code] { "codes": [ { "code": "{\n type: \"message/http\",\n body: \"http://www.cliengo.com/precios\",\n ...\n}", "language": "json" } ] } [/block] Audio [block:code] { "codes": [ { "code": "{\n type: \"audio/mpeg\",\n body: \"http://www.cliengo.com/blaasdadadasd.mp3\",\n ...\n}", "language": "json" } ] } [/block] Email [block:code] { "codes": [ { "code": "{\n type: \"email\",\n body: \"hola esto vino en un email!\",\n ...\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples



Message [block:code] { "codes": [ { "code": "{\n id: \"117bdasjasd9mj29jd233\",\n type: \"text/plain\",\n body: \"hola mundo!\",\n\tsender: {\n id: \"1234\",\n type : \"robot\",\n name: null\n },\n\tconversationId:\"asd8bqwwdyqdqydqyasdas\",\n sentAt: \"2014-09-09T04:44:47+00:00\",\n isUnread: true, //depende del user que esté consultando la API\n recipient_status: { //WIP\n \"777\": \"sent\",\n \"111\": \"delivered\",\n \"999\": \"read\",\n \"1234\": \"read\"\n }\n}", "language": "json" } ] } [/block] URL visit [block:code] { "codes": [ { "code": "{\n type: \"message/http\",\n body: \"http://www.cliengo.com/precios\",\n ...\n}", "language": "json" } ] } [/block] Audio [block:code] { "codes": [ { "code": "{\n type: \"audio/mpeg\",\n body: \"http://www.cliengo.com/blaasdadadasd.mp3\",\n ...\n}", "language": "json" } ] } [/block] Email [block:code] { "codes": [ { "code": "{\n type: \"email\",\n body: \"hola esto vino en un email!\",\n ...\n}", "language": "json" } ] } [/block]
{"_id":"566a38991766bf0d00e737c8","__v":4,"createdAt":"2015-12-11T02:44:41.207Z","editedParams":true,"editedParams2":true,"excerpt":"","link_external":false,"link_url":"","title":"/conversations/:conversationId/message","version":"55aa7d983be8f60d00041d45","category":"56548b9c9c4c6d0d00aeda0c","order":5,"project":"55aa7d973be8f60d00041d42","type":"put","api":{"settings":"","url":"/conversations/:conversationId/message","auth":"required","examples":{"codes":[]},"method":"put","params":[{"required":false,"desc":"","default":"","type":"string","name":"message","_id":"566a394574d574170070b659","ref":"","in":"body"},{"type":"string","name":"type","_id":"566a394574d574170070b65a","ref":"","in":"body","required":false,"desc":"","default":""},{"desc":"","default":"","type":"string","name":"from","_id":"566a394574d574170070b65b","ref":"","in":"body","required":false},{"name":"fromType","_id":"566f2526de4b662100d60e1a","ref":"","in":"body","required":false,"desc":"","default":"","type":"string"},{"type":"string","name":"conversationId","_id":"585062959d4f700f00e9dba3","ref":"","in":"path","required":true,"desc":"","default":""}],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]}},"githubsync":"","hidden":false,"isReference":false,"next":{"description":"","pages":[]},"slug":"10conversationconversationidmessage","updates":[],"user":"55aa7d625d3abb0d0012f3da","body":"","parentDoc":null,"sync_unique":"","childrenPages":[]}

put/conversations/:conversationId/message


Path Params

conversationId:
required
string

Body Params

message:
string
type:
string
from:
string
fromType:
string

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"58407e4cc6c9322300273fc9","excerpt":"Retrieves the total amount o conversations for the company","isReference":false,"sync_unique":"","updates":[],"__v":3,"createdAt":"2016-12-01T19:47:24.886Z","githubsync":"","link_external":false,"link_url":"","title":"/conversations/:websiteId/count","type":"get","user":"55aa7d625d3abb0d0012f3da","category":"56548b9c9c4c6d0d00aeda0c","body":"Retrieves the total amount o conversations for the company\n\nThis endpoint is under development","hidden":false,"next":{"pages":[],"description":""},"order":6,"parentDoc":null,"project":"55aa7d973be8f60d00041d42","slug":"conversationscount","api":{"params":[{"ref":"","in":"path","required":true,"desc":"","default":"","type":"string","name":"websiteId","_id":"585063b170cbe00f00835bb6"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  count: 1200\n}","name":""},{"status":400,"language":"json","code":"{\n  error: \"bad-request\"\n}","name":""}]},"settings":"","url":"/conversations/:websiteId/count","auth":"required","examples":{"codes":[]},"method":"get"},"version":"55aa7d983be8f60d00041d45","childrenPages":[]}

get/conversations/:websiteId/count

Retrieves the total amount o conversations for the company

Path Params

websiteId:
required
string
Retrieves the total amount o conversations for the company This endpoint is under development

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Retrieves the total amount o conversations for the company This endpoint is under development
{"_id":"5850656816482d0f00f3b118","githubsync":"","hidden":false,"title":"/process/:websiteId/chatbot-triggers","updates":[],"body":"","createdAt":"2016-12-13T21:17:28.278Z","parentDoc":null,"slug":"process-chatbot-triggers-get","sync_unique":"","user":"55aa7d625d3abb0d0012f3da","__v":2,"link_external":false,"next":{"pages":[],"description":""},"project":"55aa7d973be8f60d00041d42","isReference":false,"category":"585065fa70cbe00f00835bb8","excerpt":"","link_url":"","order":0,"type":"get","version":"55aa7d983be8f60d00041d45","api":{"examples":{"codes":[{"code":"curl 'https://api.cliengo.com/1.0/process/{websiteId}/messages/chatbot-triggers?text=do you deliver on weekends&api_key=TEST_API_KEY'","language":"curl"}]},"method":"get","params":[{"type":"string","name":"websiteId","_id":"5850676c16482d0f00f3b119","ref":"","in":"path","required":true,"desc":"","default":""},{"name":"text","ref":"","required":true,"type":"string","_id":"58506c9f16cfb31900c22b6a","default":"do you deliver on weekends?","desc":"Text to match with triggers for this websiteId's chatbot","in":"query"}],"results":{"codes":[{"code":"[\n  {\n    \"response\": \"sure!, this is a triggered response and we deliver on weekends!\",\n    \"stopNextMessage\": false,\n    \"ignoreLead\": false,\n    \"matches\": [\n      {\n        \"type\": \"CONTAINS\",\n        \"value\": \"weekends\"\n      }\n    ]\n  }\n]","language":"json","status":200,"name":""},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/process/:websiteId/chatbot-triggers","auth":"required"},"childrenPages":[]}

get/process/:websiteId/chatbot-triggers


Path Params

websiteId:
required
string

Query Params

text:
required
stringdo you deliver on weekends?
Text to match with triggers for this websiteId's chatbot

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"563141569ead230d00a18915","type":"get","body":"Post an offline convertion to Google AdWords vía Cliengo API. You need the parameter \"gclid\" that is the unique identifier that Google gives to every click made in AdWords.","hidden":false,"link_url":"","user":"55aa7d625d3abb0d0012f3da","excerpt":"","category":"5631407afa40240d007c8c60","createdAt":"2015-10-28T21:42:46.283Z","editedParams2":true,"githubsync":"","isReference":false,"next":{"pages":[],"description":""},"parentDoc":null,"__v":2,"title":"/adwords/uploadOfflineConvertion","updates":[],"project":"55aa7d973be8f60d00041d42","api":{"method":"get","params":[{"in":"query","name":"gclid","ref":"","required":true,"type":"string","_id":"55b6a6af6127b1250036453e","default":"","desc":"Google AdWords Click ID"},{"default":"","desc":"(Optional) In case you have Leadaki's websiteId","in":"query","name":"websiteId","ref":"","required":false,"type":"string","_id":"56327715b904a10d0032f703"},{"desc":"(Optional) If sent, this MUST match an offline convertion list already defined in the AdWords Account related to the gclid.","in":"query","name":"convertionName","ref":"","required":false,"type":"string","_id":"56327715b904a10d0032f702","default":"Compra Offline"}],"results":{"codes":[{"language":"text","code":""}]},"settings":"","url":"/adwords/uploadOfflineConvertion","auth":"required","examples":{"codes":[{"code":"curl 'https://api.cliengo.com/1.0/adwords/uploadOfflineConvertion?gclid={your_gclid}&api_key={your_api_key}'","language":"curl"}]}},"editedParams":true,"link_external":false,"order":0,"slug":"adwords_upload-offline-convertion","sync_unique":"","version":"55aa7d983be8f60d00041d45","childrenPages":[]}

get/adwords/uploadOfflineConvertion


Query Params

gclid:
required
string
Google AdWords Click ID
websiteId:
string
(Optional) In case you have Leadaki's websiteId
convertionName:
stringCompra Offline
(Optional) If sent, this MUST match an offline convertion list already defined in the AdWords Account related to the gclid.
Post an offline convertion to Google AdWords vía Cliengo API. You need the parameter "gclid" that is the unique identifier that Google gives to every click made in AdWords.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples



Post an offline convertion to Google AdWords vía Cliengo API. You need the parameter "gclid" that is the unique identifier that Google gives to every click made in AdWords.
{"_id":"58861116e2f28519005a04b8","createdAt":"2017-01-23T14:20:06.946Z","isReference":false,"link_url":"","project":"55aa7d973be8f60d00041d42","type":"get","user":"55aa7d625d3abb0d0012f3da","body":"","category":"58861760b4816e19005c9941","excerpt":"Retrieve a subscription plans for Cliengo by planId","githubsync":"","parentDoc":null,"title":"/plans/:planId","updates":[],"version":"55aa7d983be8f60d00041d45","__v":1,"hidden":false,"sync_unique":"","link_external":false,"next":{"pages":[],"description":""},"order":0,"slug":"accountplansplanid","api":{"settings":"","url":"/plans/:planId","auth":"required","examples":{"codes":[]},"method":"get","params":[{"name":"planId","ref":"","required":false,"type":"string","_id":"58861291b28b061900f4646b","default":"","desc":"Current available values are: CLIENGO_FREE, CLIENGO_BASIC, CLIENGO_FULL, CLIENGO_PROFESSIONAL, CLIENGO_CUSTOM","in":"path"}],"results":{"codes":[{"language":"json","code":"{\n  \"id\": \"CLIENGO_BASIC\",\n  \"name\": \"Cliengo Básico\",\n  \"leadLimit\": 100,\n  \"websiteLimit\": 2,\n  \"userLimit\": 3,\n  \"description\": \"Cliengo básico, 100 leads por mes\",\n  \"priceARS\": 450,\n  \"priceUSD\": 29.0,\n  \"integrationsAllowed\": true,\n  \"imageUrl\": \"https://res.cloudinary.com/hbrrdozyj/image/upload/v1484836411/plan_basic_afyhbl.png\"\n}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]}},"childrenPages":[]}

get/plans/:planId

Retrieve a subscription plans for Cliengo by planId

Path Params

planId:
string
Current available values are: CLIENGO_FREE, CLIENGO_BASIC, CLIENGO_FULL, CLIENGO_PROFESSIONAL, CLIENGO_CUSTOM

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"588610d6b28b061900f46461","body":"","category":"58861760b4816e19005c9941","excerpt":"Retrieve the different subscriptions plans for Cliengo","link_url":"","version":"55aa7d983be8f60d00041d45","project":"55aa7d973be8f60d00041d42","title":"/plans","__v":0,"api":{"auth":"required","examples":{"codes":[]},"method":"get","params":[],"results":{"codes":[{"language":"json","code":"{\n  \"paging\": {\n    \"total\": 2\n  },\n  \"results\": [\n   {\n      \"id\": \"CLIENGO_BASIC\",\n      \"name\": \"Cliengo Básico\",\n      \"description\": \"Cliengo básico, 100 leads por mes\",\n      \"leadLimit\": 100,\n      \"websiteLimit\": 2,\n      \"userLimit\": 3,\n      \"priceUSD\": 29.0,\n      \"priceARS\": 450,\n      \"integrationsAllowed\": true,\n      \"imageUrl\": \"https://res.cloudinary.com/hbrrdozyj/image/upload/v1484836411/plan_basic_afyhbl.png\"\n    },\n    {\n      \"id\": \"CLIENGO_PROFESSIONAL\",\n      \"name\": \"Cliengo Profesional\",\n      \"description\": \"Cliengo profesional, 400 leads por mes.\",\n      \"leadLimit\": 400,\n      \"websiteLimit\": 3,\n      \"userLimit\": 5,\n      \"priceUSD\": 79.0,\n      \"priceARS\": 1190,\n      \"integrationsAllowed\": true,\n      \"imageUrl\": \"https://res.cloudinary.com/hbrrdozyj/image/upload/v1484836411/plan_professional_fzztlz.png\"\n    }\n  ]\n}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/plans"},"createdAt":"2017-01-23T14:19:02.971Z","isReference":false,"link_external":false,"order":1,"user":"55aa7d625d3abb0d0012f3da","githubsync":"","next":{"pages":[],"description":""},"slug":"plans-list","updates":[],"hidden":false,"parentDoc":null,"sync_unique":"","type":"get","childrenPages":[]}

get/plans

Retrieve the different subscriptions plans for Cliengo


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"58a316e73dfce00f00e377cb","category":"58a316cb254c401b00a049ce","parentDoc":null,"project":"55aa7d973be8f60d00041d42","slug":"contactsidfeedback","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":0,"updates":[],"body":"","createdAt":"2017-02-14T14:40:39.065Z","title":"/contacts/:id/feedback","type":"post","__v":2,"api":{"url":"/contacts/:id/feedback","auth":"required","examples":{"codes":[]},"method":"post","params":[{"type":"boolean","name":"wasContacted","_id":"58a31823254c401b00a049d3","ref":"","in":"path","required":true,"desc":"Si el lead fue/no fue contactado","default":""},{"desc":"Contact Id hashed with SHA512","default":"","type":"string","name":"contact_access_token","_id":"58a318c7254c401b00a049d5","ref":"","in":"path","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"isReference":false,"next":{"pages":[],"description":""},"sync_unique":"","childrenPages":[]}

post/contacts/:id/feedback


Path Params

wasContacted:
required
boolean
Si el lead fue/no fue contactado
contact_access_token:
required
string
Contact Id hashed with SHA512

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"58a318532ae7ed0f00d36fde","slug":"contactsidfeedbackstep2","updates":[],"createdAt":"2017-02-14T14:46:43.711Z","hidden":false,"link_external":false,"parentDoc":null,"excerpt":"","isReference":false,"order":1,"type":"put","__v":2,"api":{"examples":{"codes":[]},"method":"put","params":[{"in":"path","required":true,"desc":"Contact ID hashed with SHA512","default":"","type":"string","name":"contact_access_token","_id":"58a318b430852819007b9e6e","ref":""},{"desc":"Leads comment on the web form","default":"","type":"string","name":"comment","_id":"58a3195930852819007b9e76","ref":"","in":"path","required":false},{"_id":"58a3195930852819007b9e75","ref":"","in":"path","required":false,"desc":"Leads specified time to be contacted","default":"","type":"string","name":"time"},{"name":"phone","_id":"58a3195930852819007b9e74","ref":"","in":"path","required":false,"desc":"Leads phone number","default":"","type":"string"},{"ref":"","in":"path","required":false,"desc":"Boolean specifying if the lead is interested in further communications","default":"","type":"boolean","name":"interested","_id":"58a3195930852819007b9e73"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/contacts/:id/feedback","auth":"required"},"body":"","category":"58a316cb254c401b00a049ce","user":"55aa7d625d3abb0d0012f3da","version":"55aa7d983be8f60d00041d45","githubsync":"","link_url":"","sync_unique":"","next":{"pages":[],"description":""},"project":"55aa7d973be8f60d00041d42","title":"/contacts/:id/feedback","childrenPages":[]}

put/contacts/:id/feedback


Path Params

contact_access_token:
required
string
Contact ID hashed with SHA512
comment:
string
Leads comment on the web form
time:
string
Leads specified time to be contacted
phone:
string
Leads phone number
interested:
boolean
Boolean specifying if the lead is interested in further communications

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format