{"info":{"_postman_id":"0db1f1cf-f7a1-4002-a2bd-a2bc1092422d","name":"DEXCHANGE SMS","description":"<html><head></head><body><h1 id=\"packages\">Packages</h1>\n<h4 id=\"javascript-httpswwwnpmjscompackagedsms\"><strong>JAVASCRIPT</strong>: <a href=\"https://www.npmjs.com/package/dsms\">https://www.npmjs.com/package/dsms</a></h4>\n<h4 id=\"python-httpspypiorgprojectdexchange-sms\">PYTHON: <a href=\"https://pypi.org/project/dexchange-sms/\">https://pypi.org/project/dexchange-sms/</a></h4>\n<h4 id=\"flutter-httpspubdevpackagesflutter_dexchange_sms\">FLUTTER: <a href=\"https://pub.dev/packages/flutter_dexchange_sms\">https://pub.dev/packages/flutter_dexchange_sms</a></h4>\n<h1 id=\"base-url\">BASE URL</h1>\n<h2 id=\"httpsapi-v2dexchange-smscom\"><code>https://api-v2.dexchange-sms.com</code></h2>\n<h2 id=\"sms-cost\">SMS COST</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>COUNTRY</strong></th>\n<th><strong>COST</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>SENEGAL</td>\n<td>10 XOF / message (160 caracteres) [1 unit]</td>\n</tr>\n<tr>\n<td>OTHERS</td>\n<td>50 XOF / message (160 caracteres) [1 unit]</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Packages","slug":"packages"},{"content":"BASE URL","slug":"base-url"}],"owner":"23992877","collectionId":"0db1f1cf-f7a1-4002-a2bd-a2bc1092422d","publishedId":"2s93ebTrC1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-05-11T14:04:32.000Z"},"item":[{"name":"Message API","item":[{"name":"Send SMS Message","id":"09ed4cd7-11c0-470f-816f-9f0f08b8f5be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"number\": [221773435776, 221777777777],\n    \"signature\": \"DSMS\",\n    \"content\": \"YO\\nCV ?\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-v2.dexchange-sms.com/api/send/sms/","description":"<h3 id=\"example-request\">Example Request</h3>\n","urlObject":{"protocol":"https","path":["api","send","sms",""],"host":["api-v2","dexchange-sms","com"],"query":[],"variable":[]}},"response":[{"id":"43402901-6928-4ea2-8daa-2686d4b03e7b","name":"Send SMS Message","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"number\": [\n        \"221777460452\",\n        \"777460452\"\n        \n    ],\n    \"signature\": \"DSMS\",\n    \"content\": \"YO\\nCV ?\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.dexchange-sms.com/api/send/sms"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Fri, 19 May 2023 02:10:27 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"155"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"9b-KkkJZjRTm/XOYsQRpLJdxGZuXJs\""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Message sent successfully\",\n    \"smsID\": \"SID-86c8b597-6a25-3666-a85f-aa2738b8f9cd\",\n    \"total_sms\": 1,\n    \"total_caracteres\": 7,\n    \"invalidNumber\": [\n        \"777460452\"\n    ]\n}"}],"_postman_id":"09ed4cd7-11c0-470f-816f-9f0f08b8f5be"},{"name":"SEND OTP","id":"6e36c4e8-16a6-4909-be00-49d61bd0da29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"number\": \"221777460452\",\n    \"service\": \"DEMO\",\n    \"lang\": \"fr\",\n    \"canal\": \"whatsapp_OR_sms\"\n\n}","options":{"raw":{"language":"json"}}},"url":"https://api-v2.dexchange-sms.com/api/send/otp","description":"<h5 id=\"this-endpoint-allows-authenticated-users-to-send-a-one-time-password-otp-via-sms-to-a-phone-number-the-otp-is-generated-randomly-and-appended-to-a-message-in-a-specific-language-according-to-the-service-parameter-provided\">This endpoint allows authenticated users to send a one-time password (OTP) via SMS to a phone number. The OTP is generated randomly and appended to a message in a specific language, according to the service parameter provided.</h5>\n<p>URL: <a href=\"https://api.dexchange-sms.com/api/send/otp\"><code>https://api.dexchange-sms.com/api/send/otp</code></a><br />Method: <code>POST</code></p>\n<h2 id=\"required-request-body-parameters\">Required request body parameters:</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Property</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>number</td>\n<td>string</td>\n<td>yes</td>\n<td>The phone number where the SMS should be sent. Must be a string, even if it contains only digits</td>\n</tr>\n<tr>\n<td>service</td>\n<td>string</td>\n<td>yes</td>\n<td>The name of the service for which the OTP is being generated. This parameter determines the language of the OTP message</td>\n</tr>\n<tr>\n<td>lang</td>\n<td>string</td>\n<td>no</td>\n<td>The language in which to generate the OTP message. If not provided, the default language for the service will be used.</td>\n</tr>\n<tr>\n<td>canal</td>\n<td>string</td>\n<td>no (default SMS)</td>\n<td>sms or whatsapp</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-headers\">Request Headers</h3>\n<p>The request must include an <code>Authorization</code> header with a valid API key.</p>\n<h3 id=\"response\">Response</h3>\n<p>The server responds with a JSON object containing the following properties:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td>string</td>\n<td>A message describing the result of the SMS sending</td>\n</tr>\n<tr>\n<td>smsID</td>\n<td>string</td>\n<td>An ID assigned to the sent SMS message</td>\n</tr>\n<tr>\n<td>total_sms</td>\n<td>number</td>\n<td>The total number of SMS units used to send the message</td>\n</tr>\n</tbody>\n</table>\n</div><p>Possible HTTP status codes:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>201</td>\n<td>SMS message sent and saved successfully in database</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Bad request: missing or invalid input data</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized: missing or invalid API key</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Internal server error</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","send","otp"],"host":["api-v2","dexchange-sms","com"],"query":[],"variable":[]}},"response":[{"id":"c68f3335-8153-479a-a144-b7f2f6161af4","name":"SEND OTP","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"number\": \"221777460452\",\n    \"service\": \"DEMO\",\n    \"lang\": \"en\"\n\n}","options":{"raw":{"language":"json"}}},"url":"https://api.dexchange-sms.com/api/send/otp"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Fri, 19 May 2023 02:11:17 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"104"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"68-J1Z96P4Te30bh+ViuZW4wkJFYsk\""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Message sent successfully\",\n    \"smsID\": \"AID-2b41dd52-8663-31c7-9287-74494f9f06e8\",\n    \"total_sms\": 1\n}"}],"_postman_id":"6e36c4e8-16a6-4909-be00-49d61bd0da29"},{"name":"Verify OTP","id":"3afbc086-e37d-42ea-84c1-562a9a30ab7f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"number\": \"221777460452\",\n    \"service\": \"DEMO\",\n    \"otp\": \"214045\"\n\n}","options":{"raw":{"language":"json"}}},"url":"https://api-v2.dexchange-sms.com/api/verify/otp","description":"<h2 id=\"verify-otp-sms\">Verify OTP SMS</h2>\n<p>Verify OTP SMS is an endpoint that verifies an OTP sent to a user's phone number.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li>Route: <code>POST /api/verify/otp</code></li>\n<li>Headers:<ul>\n<li>Authorization: Bearer <code>API_KEY</code><ul>\n<li><code>API_KEY</code> is the API key generated by the user.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Body:</li>\n</ul>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>number</td>\n<td>string</td>\n<td>yes</td>\n<td>The user's phone number.</td>\n</tr>\n<tr>\n<td>otp</td>\n<td>string</td>\n<td>yes</td>\n<td>The OTP to be verified.</td>\n</tr>\n<tr>\n<td>service</td>\n<td>string</td>\n<td>yes</td>\n<td>The name of the service.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response\">Response</h3>\n<ul>\n<li>Success:<ul>\n<li>Status code: <code>200 OK</code></li>\n<li>Body: <code>{ message: \"OTP verified successfully\" }</code></li>\n</ul>\n</li>\n<li>Error:<ul>\n<li>Status code: <code>400 Bad Request</code></li>\n<li>Body: <code>{ message: \"OTP invalide\" }</code></li>\n<li>Status code: <code>400 Bad Request</code></li>\n<li>Body: <code>{ message: \"OTP already verified\" }</code></li>\n<li>Status code: <code>401 Unauthorized</code></li>\n<li>Body: <code>{ message: \"API Key not found\" }</code></li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","verify","otp"],"host":["api-v2","dexchange-sms","com"],"query":[],"variable":[]}},"response":[{"id":"ab9c0626-2dca-4f91-8933-1f6d419df661","name":"Verify OTP","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"number\": \"221777460452\",\n    \"service\": \"DEMO\",\n    \"otp\": \"399358\"\n\n}","options":{"raw":{"language":"json"}}},"url":"{{HOST}}/api/verify/otp"},"status":"Success","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"34"},{"key":"ETag","value":"W/\"22-GUHfk2csf1Z6qQgeyeL+SMqnDXc\""},{"key":"Date","value":"Thu, 11 May 2023 23:01:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"OTP verified successfully\"\n}"}],"_postman_id":"3afbc086-e37d-42ea-84c1-562a9a30ab7f"}],"id":"d7fd83b7-5bb6-4cab-805c-4567e9e2765a","description":"<h2 id=\"api-endpoint-send-sms\">API Endpoint: Send SMS</h2>\n<p>This endpoint allows authorized users to send SMS to multiple recipients.</p>\n<h3 id=\"http-request\">HTTP Request</h3>\n<p><code>POST /api/send/sms</code></p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>The request body must be a JSON object with the following properties:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>number</td>\n<td>array</td>\n<td>yes</td>\n<td>An array of phone numbers (strings) of the SMS recipients</td>\n</tr>\n<tr>\n<td>content</td>\n<td>string</td>\n<td>yes</td>\n<td>The content of the SMS message</td>\n</tr>\n<tr>\n<td>signature</td>\n<td>string</td>\n<td>yes</td>\n<td>The signature to appear on the SMS message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-headers\">Request Headers</h3>\n<p>The request must include an <code>Authorization</code> header with a valid API key.</p>\n<h3 id=\"response\">Response</h3>\n<p>The server responds with a JSON object containing the following properties:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td>string</td>\n<td>A message describing the result of the SMS sending</td>\n</tr>\n<tr>\n<td>smsID</td>\n<td>string</td>\n<td>An ID assigned to the sent SMS message</td>\n</tr>\n<tr>\n<td>total_sms</td>\n<td>number</td>\n<td>The total number of SMS units used to send the message</td>\n</tr>\n<tr>\n<td>total_caracteres</td>\n<td>number</td>\n<td>The total number of characters in the SMS message</td>\n</tr>\n</tbody>\n</table>\n</div><p>Possible HTTP status codes:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>201</td>\n<td>SMS message sent and saved successfully in database</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Bad request: missing or invalid input data</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized: missing or invalid API key</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Internal server error</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"note-if-your-signature-is-in-pending-verification-or-has-not-been-yet-verified-the-api-will-use-the-default-sms-signature-dsms\"><strong>Note: If your signature is in pending verification or has not been yet verified the API will use the default SMS signature: DSMS</strong></h4>\n","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"656a11e3-ca76-49e8-9b31-f13029afe568","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"fd454734-9c26-4e1f-9dd7-52c6f346efda","type":"text/javascript","exec":[""]}}],"_postman_id":"d7fd83b7-5bb6-4cab-805c-4567e9e2765a"},{"name":"BALANCE","id":"15771413-2189-4dda-bf83-f13161faea78","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"apikey\": \"YOUR_API_KEY\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-v2.dexchange-sms.com/api/balance","urlObject":{"protocol":"https","path":["api","balance"],"host":["api-v2","dexchange-sms","com"],"query":[],"variable":[]}},"response":[{"id":"dbd7ea8f-2379-4aab-a8f4-0f3cdda6f37e","name":"GET BALANCE","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"apikey\": \"YOUR_API_KEY\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.dexchange-sms.com/api/balance"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 14 Jun 2023 03:48:04 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"79"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"4f-MSaTtQGny29cF3Eq/qbuCzfaTjI\""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Balance found\",\n    \"solde_sms\": 9374,\n    \"email\": \"email@gmail.com\"\n}"}],"_postman_id":"15771413-2189-4dda-bf83-f13161faea78"}]}