{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"f3665182-0fa0-4bf0-a8fa-51d3aafe745f","name":"Lead Agent Public Apis V2","description":"<p>This API is designed to facilitate our users to manage their data and get more leads into their account from external systems. The Lead Agent V2 API is live since 13 February 2020.</p>\n<hr>\n<h1 id=\"doc_auth\">Authorization</h1>\n<p><b>Lead Agent</b> API requests are secured with a token system. Each request must contain a token in the header of a request with a key named <b>{{auth_key}}</b></p>\n<br>\n<h3 id=\"doc_auth_get_token\">How to get a token</h3>\n<p>Login to <a href=\"{{project_url}}\" target=\"_blank\"><b>Lead Agent</b></a> with your credentials. Once you are logged in, click on the Options from top right corner, then click \"Preferences\" from the drop down. On Preferences screen, click on \"API\" tab to get and manage your API keys.</p>\n<img src=\"https://leadagentdev.s3.eu-central-1.amazonaws.com/api_docs/doc_get_token_v2.png\" alt=\"How to get a token\">\n<br>\n<h1 id=\"doc_request\">Request</h1>\n<p>Use the folliwng url to make your requests</p>\n<p><b>{{live_url}}/en/v2</b></p>\n<p>Note: replace \"en\" in above with \"cs\" to get response in Czech language</p>\n<p>Note: You can make 100 requests per minute from a single IP address.</p>\n<hr>\n<h1 id=\"doc_response\">Response</h1>\n<p>The server sends a response in <a href=\"https://www.json.org/\">json</a> format to serve you better as json is the fastest and easy to parse in any programming language. Almost every response envelops some basic attributes that helps developers to understand the response and take an action accordingly. </p>\n<br>\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Attribute Name</th>\n\t\t\t<th>Description</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t<tr>\n\t\t\t<td>status_code</td>\n\t\t\t<td>The request code. You can find the list of codes <a href=\"#doc_status_codes\">here</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>error</td>\n\t\t\t<td>true / false</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>error_code</td>\n\t\t\t<td>If there is any error in the request or data, there will be an error code in the response. Error code helps you to take an action on the base of error. All error codes will be in uppercase with worlds separated by underscores. Examples of error codes are UNAUTHORISED, INVALID_REQUEST etc. You can find the list of codes <a href=\"#doc_error_codes\">here</a></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>error_message</td>\n\t\t\t<td>This attribute contains an explanation of an error.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>data</td>\n\t\t\t<td>This attribute actually contains your requested data from the server.</td>\n\t\t</tr>\n\t</tbody>\n</table>\n<br>\n<h3 id=\"doc_response_success_sample\">Sample Successful Response:</h3>\n<pre><code>\n{\n    \"status_code\": 200,\n    \"error\": false,\n    \"error_message\": \"\",\n    \"error_code\": \"\",\n    \"data\": {\n        \"telephone\": \"700000115\",\n        \"first_name\": \"David\",\n        \"last_name\": \"John\",\n        \"legal_name\": \"David John\",\n        \"formal_name\": \"pane Johne\",\n        \"formality\": \"formal\",\n        \"formality_level\": \"very_formal\",\n        ...\n    }\n}\n</code></pre>\n<br>\n<h3 id=\"doc_response_error_sample\">Sample Response with error:</h3>\n<pre><code>\n{\n    \"status_code\": 401,\n    \"error\": true,\n    \"error_message\": \"You are not authorized for this request.\",\n    \"error_code\": \"UNAUTHORISED\",\n    \"data\": []\n}\n</code></pre>\n<br>\n<hr>\n<h1 id=\"doc_status_codes\">Status Codes</h1>\nFor API responses, we use conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, a named calendar could not be found, etc.), and codes in the 5xx range indicate an error with our servers.\n<br>\n<h3>200 OK</h3>\n<p>The request was successful.</p>\n<br>\n<h3>201 CREATED</h3>\n<p>New resources successfully added to the system.</p>\n<br>\n<h3>202 UPDATED</h3>\n<p>New resources successfully updated</p>\n<br>\n<h3>204 DELETED</h3>\n<p>The resource was successfully deleted.</p>\n<br>\n<h3>400 BAD REQUEST</h3>\n<p>The request is not as it was expected by the server like validation problem or some required data is missing.</p>\n<br>\n<h3>401 UNAUTHORIZED</h3>\n<p>Unauthorized to serve the request. This code may arise for a couple of reasons </p>\n<ul>\n\t<li>The Auth Token was either missing or invalid.</li>\n\t<li>User account is either suspended or closed.</li>\n\t<li>The URL (Referrer) is not under protection list.</li>\n</ul>\n<br>\n<h3>403 FORBIDDEN</h3>\n<p>The resource is forbidden</p>\n<br>\n<h3>404 NOT FOUND</h3>\n<p>The resource you are looking for was not found</p>\n<br>\n<hr>\n<h1 id=\"doc_data\">Data</h1>\n<h3 id=\"doc_data_leads\">Lead</h3>\n<table>\n\t<tr>\n\t\t<th>Column</th>\n\t\t<th>Description</th>\n\t\t<th>Updateable</th>\n\t</tr>\n\t<tr>\n\t\t\t<td>lead_id</td>\n\t\t\t<td>Identifier of a lead</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>first_name</td>\n\t\t\t<td>First name of a lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>last_name</td>\n\t\t\t<td>Last name of a lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>formality</td>\n\t\t\t<td>\"formal\" or \"informal\"</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>formal_name</td>\n\t\t\t<td>Formal/Informal Name of a lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>full_name</td>\n\t\t\t<td>Full Name of a lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>gender</td>\n\t\t\t<td>Gender of a lead. Expected values are Male, Female</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>primary_mobile</td>\n\t\t\t<td>Primary Mobile Number is an object that holds full information of a mobile number like number, code, suffix and country</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>primary_email</td>\n\t\t\t<td>Primary email address of a lead</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>contacts</td>\n\t\t\t<td>This object contains information of all the contacts of a lead including primary contacts.</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>referrer_name</td>\n\t\t\t<td>Name of the referrer of this lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>referrer_telephone</td>\n\t\t\t<td>9 Digit telephone of the referrer of this lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>name_day</td>\n\t\t\t<td>Nameday of the lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>dob</td>\n\t\t\t<td>Date of birth of the lead</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>credit_score</td>\n\t\t\t<td>Credit Score of the lead</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>avatar</td>\n\t\t\t<td>Profile picture of the lead</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>upload_note</td>\n\t\t\t<td>Upload note</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>api_name</td>\n\t\t\t<td>API Name</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>joining_date</td>\n\t\t\t<td>Date when lead was created</td>\n\t\t\t<td>No</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>custom_fields</td>\n\t\t\t<td>All the data of custom fields that created</td>\n\t\t\t<td>Yes</td>\n\t\t</tr>\n</table>\n<br>\n<h3 id=\"doc_data_funnel\">Funnel (Strategy)</h3>\n<table>\n\t<tr>\n\t\t<th>Column</th>\n\t\t<th>Description</th>\n\t</tr>\n\t<tr>\n\t\t<td>funnel_id</td>\n\t\t<td>The Identifier of a funnel (Strategy)</td>\n\t</tr>\n\t<tr>\n\t\t<td>name</td>\n\t\t<td>The name of the funnel (Strategy)</td>\n\t</tr>\n\t<tr>\n\t\t<td>description</td>\n\t\t<td>Description of the funnel (Strategy)</td>\n\t</tr>\n\t<tr>\n\t\t<td>type</td>\n\t\t<td>Type will have one of the following two types. <br>PRIVATE : For personal use<br>PUBLIC : For sale funnel (Strategy)</td>\n\t</tr>\n\t<tr>\n\t\t<td>status</td>\n\t\t<td>Status can be ACTIVE, INACTIVE or PENDING</td>\n\t</tr>\n\t<tr>\n\t\t<td>created_at</td>\n\t\t<td>The date when funnel (Strategy) was created</td>\n\t</tr>\n\t<tr>\n\t\t<td>updated_at</td>\n\t\t<td>The date when last time funnel (Strategy) was updated</td>\n\t</tr>\n</table>\n<br>\n<h3 id=\"doc_data_lead_group\">Lead Group</h3>\n<table>\n\t<tr>\n\t\t<th>Column</th>\n\t\t<th>Description</th>\n\t</tr>\n\t<tr>\n\t\t<td>slug</td>\n\t\t<td>The slug of a Lead Group</td>\n\t</tr>\n\t<tr>\n\t\t<td>name</td>\n\t\t<td>The name of the Lead Group</td>\n\t</tr>\n\t<tr>\n\t\t<td>description</td>\n\t\t<td>Description of Lead Group</td>\n\t</tr>\n\t<tr>\n\t\t<td>total_subscribers</td>\n\t\t<td>Total subscribers of the group</td>\n\t</tr>\n\t<tr>\n\t\t<td>status</td>\n\t\t<td>Status of the Lead Group</td>\n\t</tr>\n\t<tr>\n\t\t<td>created_at</td>\n\t\t<td>The date when group was created</td>\n\t</tr>\n\t<tr>\n\t\t<td>updated_at</td>\n\t\t<td>The date when last time group was updated</td>\n\t</tr>\n</table>\n<hr>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"5757023","team":184693,"collectionId":"f3665182-0fa0-4bf0-a8fa-51d3aafe745f","publishedId":"SzKR11ay","public":true,"publicUrl":"https://apidoc.leadagent.cz","privateUrl":"https://go.postman.co/documentation/5757023-f3665182-0fa0-4bf0-a8fa-51d3aafe745f","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.6","publishDate":"2020-11-22T12:36:50.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"DOCS - Public APIs","id":"71797557-a3db-4715-ae11-2791e2eb2716","owner":"5757023","values":[{"key":"url","value":"https://api.leadagent.cz","enabled":true},{"key":"project_url","value":"https://app.leadagent.cz","enabled":true},{"key":"auth_key","value":"la-authorization","enabled":true},{"key":"api_key","value":"Your API Key","enabled":true},{"key":"live_url","value":"https://api.leadagent.cz","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/bfbfd5c0883e94b2cc311feeb06f44e7c2eb4e861c290b9612e3d7d7aff19d51","favicon":"https://leadagent.cz/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"DOCS - Public APIs","value":"5757023-71797557-a3db-4715-ae11-2791e2eb2716"}],"canonicalUrl":"https://apidoc.leadagent.cz/view/metadata/SzKR11ay"}