{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"405eb6e0-e38b-48ab-843c-183dee1ff478","name":"Chat2Desk API-tests","description":"This API is designed to work with Chat2Desk service.\n\nEnter your API token to use these commands in your project.\n\n## TERMS\n\nA *client* – is a person, who contacts your company via Chat2Desk service using messengers, online chat, external channel or SMS.\n\nA *channel* – is an account (phone number or id) in messengers WhatsApp, Viber, Telegram, Facebook, Instagram, VKontakte, Live Chat, SMS and others or external channel, used by your company to chat with clients via service Chat2Desk. You may have many channels with different messengers’ accounts on each channel.\n\nAn *external channel* – is a source of messages other than channel specified above, which is not directly connected to the Chat2Desk service. For example, 3rd party live chat, your own messenger or your own CRM. Such external channel can be connected to the service using this API.\n\nA *transport* – is a messenger, social network or SMS, using which, messages are being received or sent via given channel.\n\n## GENERAL INFORMATION\n\n* There are many ways to work with Chat2Desk. All of them are described in [Developers starting guide](https://176009.selcdn.ru/storage/docs/Developers%20starting%20guide.pdf).\n\n* RESTful architecture and methods GET, PUT, DELETE and POST are used.\n\n* Commands’ results are presented in JSON format.\n\n* This API uses HTTPS.\n\n* Authorization is based on token, which is available in Settings/API on Chat2Desk site (under admin). Here are the parameters for all commands:\n\n   `Authorization: <token>`\n\n   `Host: api.chat2desk.com or api.chat24.io`\n\n* Commands that return large list of data support pagination using URL parameters:\n\n  * limit – number of records returned (maximum is 200, default is 20).\n\n  * offset – offset from the 1st record of the list (default is 0).\n\n  Example of the request (list of clients): `/v1/clients?offset=50&limit=30`\n\n* In general, the system is designed to answer those clients who first contacted your company and so are in the list of you clients. But using [clients (POST)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#04edac6a-4b28-48f9-acce-55d4950e90de) you can create a new client and then contact him or her without their first message. Contact these newly created clients reasonably because your WhatsApp- or Viber-account might get **blocked** for spam in case of too many contacts or messages.\n\n## BEFORE YOU BEGIN\n\n* Obtain your <token> on Chat2Desk site in Settings/API. Also make sure that your API-access level is at least demo. This information is also available with [api_modes (GET)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#48398097-c78f-4683-87ea-9663752defe6).\n\n* There are 2 ways to work with messages:\n\n  * Your clients use regular messengers to send messages to your company. In this case use [webhooks (POST)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#46e4c1e2-beb2-4f0e-9f34-5793f25048d6) or [messages (GET)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#77f8a263-1cff-45a5-9dd6-92da1bdaedb4) to receive messages from the clients.\n\n   To send messages use:\n\n   [clients (POST)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#04edac6a-4b28-48f9-acce-55d4950e90de) to create a new client that never texted you before (“Write first” option). This method is needed to send the client a message right after, because the system requires a client id to send a message.\n\n   [messages (POST)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#70e8cf73-da3c-454c-b944-e8d5eaca09f8) to send message to existing client that either texted you by his/her initiative or was created using method above.\n\n  * You use external channel to pass messages to Chat2Desk from some external source of messages (like CRM). In this case you should operate [messages/inbox (POST)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#683dc1dc-3c53-48f6-8b35-961d86da395a) to transfer messages from your clients to the system. To receive operators’ replies and send them back to your clients – you should use web hooks (see [webhooks (POST)](https://documenter.getpostman.com/view/9553101/SW7gSQAM?version=latest#46e4c1e2-beb2-4f0e-9f34-5793f25048d6)).","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"9553101","collectionId":"405eb6e0-e38b-48ab-843c-183dee1ff478","publishedId":"SW7gSQAM","public":true,"publicUrl":"https://documenter-api.postman.tech/view/9553101/SW7gSQAM","privateUrl":"https://go.postman.co/documentation/9553101-405eb6e0-e38b-48ab-843c-183dee1ff478","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"283CFA"},"documentationLayout":"classic-double-column","version":"8.10.0","publishDate":"2019-12-02T07:42:08.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"chat2desk","id":"34efbd0f-0812-4d57-8598-9a40ada925a3","owner":"9553101","values":[{"key":"token","value":"Enter your API token here","enabled":true},{"key":"url","value":"https://api.chat2desk.com","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/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"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":"chat2desk","value":"9553101-34efbd0f-0812-4d57-8598-9a40ada925a3"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/SW7gSQAM"}