{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"393668da-dafe-4154-a5da-913213151558","name":"Karbot API - How to Use 👨‍🏫","description":"**Karbot API** is a REST interface that provides access to key services for the Karbot platform. Its main functionality focuses on sending messages through WhatsApp.\n\nHere is a more technical overview of how to use our services, including Authentication, Fetch Line, Fetch Templates, Send Template Message, and Send Session Message.\n\n## **Webhook/Callback URL**\n\nWebhooks handle incoming messages from users responding on WhatsApp, serving as a critical channel for delivering timely notifications and managing errors.\n\nWhen a customer sends a message or responds to templates on WhatsApp, Karbot immediately generates a notification through an HTTP POST request to the webhook previously configured for the corresponding line.\n\nTo enable automatic reception of customer responses, it is necessary to configure the webhook in the Karbot platform from the business line details section. It is recommended to contact an administrator to complete this configuration.\n\n**Note:** The configured webhook must return an HTTP_SUCCESS code (code: 2xx) along with an empty response. If this is not done within 10 seconds, the notification will be considered a failure, and the webhook cannot be set up.\n\n**Example of a received text message:**\n\n``` json\n{\n    \"app\": \"LineName\",\n    \"timestamp\": 1702489054213,\n    \"version\": 2,\n    \"type\": \"message\",\n    \"payload\": {\n        \"id\": \"ABGHUhMkEBMXDwIKOiGSN8IQ58Kc4w\",\n        \"source\": \"5211234567891\",\n        \"type\": \"text\",\n        \"payload\": {\n            \"text\": \"hi\"\n        },\n        \"sender\": {\n            \"phone\": \"5211234567891\",\n            \"name\": \"client name\",\n            \"country_code\": \"52\",\n            \"dial_code\": \"11234567891\"\n        }\n    }\n}\n\n ```\n\n**Example Request when a quick reply is pressed:**\n\n``` json\n{\n    \"app\": \"LineName\",\n    \"timestamp\": 1702533767736,\n    \"version\": 2,\n    \"type\": \"message\",\n    \"payload\": {\n        \"id\": \"ABGHUhMzgIVDbwIKOoGepkzTRjELjA\",\n        \"source\": \"5211234567891\",\n        \"type\": \"quick_reply\",\n        \"payload\": {\n            \"text\": \"Contact\",\n            \"type\": \"button\"\n        },\n        \"sender\": {\n            \"phone\": \"5211234567891\",\n            \"name\": \"client name\",\n            \"country_code\": \"52\",\n            \"dial_code\": \"11234567891\"\n        },\n        \"context\": {\n            \"id\": \"bd6fd4da-a2e4-4098-87ca-88f9c81f2dc5\",\n            \"gsId\": \"3dfd76c4-2ac5-4435-99db-be9a412d0e5a\",\n            \"forwarded\": false,\n            \"frequently_forwarded\": false\n        }\n    }\n}\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"37004296","team":6343375,"collectionId":"393668da-dafe-4154-a5da-913213151558","publishedId":"2sAYQWJDBf","public":true,"publicUrl":"https://docs.karbot.mx","privateUrl":"https://go.postman.co/documentation/37004296-393668da-dafe-4154-a5da-913213151558","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"7348FF"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/4a2ade53-fc4e-41cb-90a1-606bd647dbef/bG9nby1rYXJib3QucG5n","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"7348FF"}},{"name":"light","logo":"https://content.pstmn.io/4a2ade53-fc4e-41cb-90a1-606bd647dbef/bG9nby1rYXJib3QucG5n","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"7348FF"}}]}},"version":"8.10.1","publishDate":"2025-01-10T20:04:30.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":"https://content.pstmn.io/4a2ade53-fc4e-41cb-90a1-606bd647dbef/bG9nby1rYXJib3QucG5n","logoDark":"https://content.pstmn.io/4a2ade53-fc4e-41cb-90a1-606bd647dbef/bG9nby1rYXJib3QucG5n"}},"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/bf11f342fea9929727b1f95c3e98185327d4d5c0a22713e04faafc5c0aacf3f7","favicon":"https://karbot.mx/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"}],"canonicalUrl":"https://docs.karbot.mx/view/metadata/2sAYQWJDBf"}