{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"dd0d0d67-ce3b-42ae-8073-68e7393a0422","name":"🚀 Programmable WhatsApp API by 2Chat","description":"<img src=\"https://content.pstmn.io/72ddfcb7-9875-49be-b527-08cb93c539a6/czNhMjBhYjZiNTA4MGU3N2IxYjMzZTJiNDI2NmNiNDBkMTU5MWUwNWVjMjFmY2M3YWRlYjMxODhhODZiMmFhZTIgKDEpLnBuZw==\" alt=\"2chat.co\" width=\"166\" height=\"176\">\n\n[2Chat](https://2chat.co?ref=postman) is an automation layer built on top of WhatsApp and other text channels. This API powers that service and is available to developers like you to build upon.\n\n## 📌 Before you begin\n\nClone this collection into Postman's desktop application to run it as doing it from a browser may cause CORS errors.\n\n## 👶 Create an account\n\nYou will need a 2Chat account and a [connected number](https://help.2chat.io/en/articles/7243195-how-to-create-a-whatsapp-channel) to be able to use this API. You can do so [here](https://app.2chat.io/signup).\n\n## 🔒 Authentication\n\nWe enforce HTTP-header-based API-key authentication on the endpoints that provide functionality, like for sending and receiving messages.\n\nYour API Key can be obtained after signing up for the service and renewed/changed at any time.\n\nFor more information about how to get your API key, [check this article](https://help.2chat.io/en/articles/7830948-where-you-can-find-the-api-code-in-2chat) from our help center.\n\n| Header | Value | Description |\n| --- | --- | --- |\n| `X-User-API-Key` | `my_api_key_value` | Your API Key |\n\n### Environment configuration\n\nConfigure the API key you got in the previous step inside the 2Chat environment. If it doesn't exist you, can create it.\n\n<img src=\"https://content.pstmn.io/4dd3213e-a127-400e-a3bd-aa03b9a0391a/aW1hZ2UucG5n\" alt=\"Configuring%20the%20API%20key\" width=\"1962\" height=\"544\">\n\n### Extra environment variables\n\nYou will also need to configure the phone number (`CONNECTED_NUMBER` variable) you have connected to 2Chat.\n\n<img src=\"https://content.pstmn.io/496a606e-01cc-448f-97f3-916b20e7d57f/aW1hZ2UucG5n\" alt=\"Configuring%20the%20collection%20variables\" width=\"2176\" height=\"548\">\n\nYou can leave the `WHATSAPP_GROUP_UUID` unassigned until you want to test the WhatsApp group-related endpoints.\n\n## ⚠️ Authentication error response\n\nIf an API key is missing, malformed, or invalid, you will receive an **HTTP 401** Unauthorized response code.\n\nLikewise, if your account expires, **HTTP 402 Payment required** will arrive as an answer.\n\n## 💨 Rate and usage limits\n\nAPI access rate limits apply on a per-API key basis per unit of time. Also, depending on your plan, you may have usage limits. If you exceed either limit, your request will return an HTTP 429 Too Many Requests status code.\n\nTo prevent abuse, trial accounts are **limited to 10 requests per minute which is 1 request every 6 seconds**. To remove this restriction, [please consider upgrading your account](https://app.2chat.io/billing).\n\n## ❌ 503 response\n\nAn HTTP `503` response from our servers indicates there is an unexpected spike in API access traffic. The server is usually operational within the next few minutes. If the outage persists or you receive any other form of an HTTP `5XX` error, [contact support](https://mailto:support@2chat.co).\n\n## 📙 **Need some help?**\n\nPlease check out our [Developers Portal](https://developers.2chat.co/) and [Help Center](https://help.2chat.io/en/).","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"20444184","team":3319708,"collectionId":"dd0d0d67-ce3b-42ae-8073-68e7393a0422","publishedId":"2s946h9YKd","public":true,"publicUrl":"https://documenter-api.postman.tech/view/20444184/2s946h9YKd","privateUrl":"https://go.postman.co/documentation/20444184-dd0d0d67-ce3b-42ae-8073-68e7393a0422","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Make your WhatsApp and WhatsApp Business programmable.\n\nDo you want to take appointments on your WhatsApp number? Or send a survey after someone makes a purchase? You can code all of that and more using these APIs."},{"name":"title","value":""}],"appearance":{"default":"system_default","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2023-07-18T15:35:23.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":"Make your WhatsApp and WhatsApp Business programmable.\n\nDo you want to take appointments on your WhatsApp number? Or send a survey after someone makes a purchase? You can code all of that and more using these APIs."},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"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/834bfc07550e587402f0f01dfc3179a47ee5d7318eea2a24d48d748849c4dc1c","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"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s946h9YKd"}