{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"8071f147-ac57-4dfb-94ae-495cf8c51519","name":"touchSMS V2 Documentation","description":"<!--- EDGILITY_SKIP -->\n![Logo](https://i.imgur.com/TSlhWi2.png)\n<!--- END_EDGILITY_SKIP -->\n\n## Getting Started\n\nWant to jump right in and test our APIs? Hit the `Run in Postman` button in the top right to launch <a href=\"https://www.getpostman.com/\">Postman</a>.\nPostman is free & lets you test and debug API requests.\n\nYou can run the examples for each request by expanding them in the top right.\n\n<p><img src=\"https://assets.postman.com/postman-docs/accessing-saved-examples.jpg\" alt=\"Examples\"></p>\n\n----\n\n## Base URL\n\n    https://app.touchsms.com.au/api/v2\n\n----\n\n# Authentication\n\nAll API requests require an API key. You can generate them by logging into your account, and visiting the `API Keys` page under `Settings` in the sidebar.\n\nClick the `Create API Key` button and enter a name for your key. The system will generate you a new set of API credentials, which consist of a Token Id and a\nToken Secret.\n\nWhen making requests to the API, credentials are passed using [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nMost programming languages and http clients allow you select basic authentication and pass the username/password. For languages that do not support automatically adding basic auth, you must pass a header, formatted as follows.\n\n```\nAuthorization: Basic <credentials>\n```\n\n`<credentials>` is the Base64 encoding of ID and password joined by a single colon `:`. \n\nFor example, in PHP:\n\n```php\n$header = \"Authorization: Basic \" . base64_encode(\"username\" . \":\" . \"password\")\n```\n\n### How to use basic auth with Postman\n\n\n\nIn Postman, you\ncan preset your credentials for all requests by clicking the collection name in the (Called `touchSMS`) and then entering the `Access Token` in the `Username` field\nand the `Token ID` in the `Password` field.\n\n<p><img src=\"https://assets.postman.com/postman-docs/basic-auth.jpg\" alt=\"Basic Auth\"></p>\n\nFor security purposes, all requests to our API must be made over HTTPs.\n\n## API Key related error response\n\nIf an API Key is missing, malformed, or invalid, you will receive a ```401 Unauthorized``` response code and the following JSON response:\n\n```\n{\n    \"message\": \"Unauthenticated.\"\n}\n```\n\n----\n\n## Security\n\nIf you intend to integrate our API into your website, ensure that you do not make requests directly from the user's browser (i.e. from javascript) as this means\nyour API is exposed to anyone visiting your website.\n\nYou should add an endpoint for form handler to your backend to process messages. Remember that you are responsible for any messages send through your account,\nso ensure you have adequate spam prevention.\n\n----\n\n## Timestamps\n\nAll request timestamps show be formatted as ISO8601, e.g. `YYYY-MM-DDTHH:MM:SS`. The timezone is always UTC.\n\n----\n\n## Error Codes\n\nAlways check if your API call was successful or resulted in error. You may check the following\n\n* 200 OK response header.\n* 4XX ERROR response header\n* 5XX ERROR response header\n\nPlease check the table below for common error constants. Note that some API functions can return custom errors of their own (listed in appropriate document\nsections). Check the error response for details, e.g. which field caused an error or which resource you don’t have access to.\n\n<table>\n    <thead>\n    <tr>\n        <th>Status Code</th>\n        <th>Error</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>200</strong></td>\n        <td></td>\n        <td>Request Successful.</td>\n    </tr>\n    <tr>\n        <td><strong>422</strong></td>\n        <td>Validation Failed</td>\n        <td>There was a validation error. Check the supplied response for more details.</td>\n    </tr>\n    <tr>\n        <td><strong>402</strong></td>\n        <td>Not enough credits</td>\n        <td>If your account is out of SMS Credits the system will issue a 402 Payment Required response.</td>\n    </tr>\n    <tr>\n        <td><strong>401</strong></td>\n        <td>Authentication failed</td>\n        <td>If your API Keys are invalid or disabled the system will issue a 401 response.</td>\n    </tr>\n    <tr>\n        <td><strong>405</strong></td>\n        <td>Method Not Allowed</td>\n        <td>If your application tries to make a GET Request to the API the system will issue a 405 Method Not Allowed response.</td>\n    </tr>\n    </tbody>\n</table>\n\n## Troubleshooting common API connection problems.\n\nTo troubleshoot your connection you should be prepared to use Google. If you don't receive a status code, there is probably some kind of networking issue between your server and us.\n\nCheck your network topology, firewalls, proxies and other network components that maybe causing your server to not be able to connect.\n\nIf you are receiving an error status code, first check the request body for detailed error information.\n\n----\n\n## Still got problems?\n\nIf you've already tried to diagnose the problem and you still can't get requests to work, please create a ticket through our support system. You must have detailed information about your problem, see below for a template.\n\n**API endpoint being used?**\n\ni.e. `/api/v2/sms`\n\n**Language being used?**\n\ni.e. `php`, `C#`, etc\n\n**Are you using the relevant library or package?**\n\nY/N\n\n**Have you tested the failing request in Postman? If not, please reproduce the issue there**\n\nY/N\n\n**What are you trying to achieve with the API request?**\n\ni.e. I'm trying to send a sms message to a client with a custom sender ID,\n\n**What error(s) are you getting from the API? Include the description given in the response.**\n\ni.e. `Number is opted out`\n\n**NB: WE MUST HAVE A HTTP REQUEST/RESPONSE CAPTURE (Without this we cannot help you)**\n\nAcceptable formats for this are:\n\n- Curl Snippet (this can be [exported from postman](https://stackoverflow.com/questions/49432735/converting-a-postman-request-to-curl))\n- HAR (Http Archive)\n- Raw HTTP Request\n\nPlease provide the output of attempting the relevant API call with curl, as provided on the API's documentation page.\n\nIf possible, please provide a copy of the relevant source code making the request.\n\n# Testing Numbers\n\nIf you wish to conduct testing during development without actually sending SMSes, you can use the numbers below.\nThese can also be used in integration tests (we suggest setting up a separate test account for this purpose).\nSent messages will not be visible in your account.\n\n### Valid Number\n**61491578888**\n\nThis will cause the API to skip saving this message, but return a result as if it was a normally processed message\n\n### Invalid Number\n**61491570156**\n\nThis will cause the API to respond with an error that the number is not valid\n\n### Opt Out\n**61491570157**\n\nThis will cause the API to respond like the number is opted out\n","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"14542603","team":1575331,"collectionId":"8071f147-ac57-4dfb-94ae-495cf8c51519","publishedId":"UUy1en9E","public":true,"publicUrl":"https://documenter-api.postman.tech/view/14542603/UUy1en9E","privateUrl":"https://go.postman.co/documentation/14542603-8071f147-ac57-4dfb-94ae-495cf8c51519","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"B4C630"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":"touchSMS V2 Api Documentation "}],"appearance":{"default":"light","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":"B4C630"}}]}},"version":"8.10.1","publishDate":"2023-05-31T04:58:21.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"touchSMS V2 Api Documentation ","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"touchSMS V2 API","id":"19af5a20-e140-48d9-8660-9c87fda36f08","owner":"14542603","values":[{"key":"baseUrl","value":"https://app.touchsms.com.au/api","enabled":true},{"key":"username","value":"test","enabled":true},{"key":"token","value":"","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/b7b4d1e56ee4909f0428f99e300d40fdd411a1c1b17e8ca4e9a10b42c231ce2d","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":"touchSMS V2 API","value":"14542603-19af5a20-e140-48d9-8660-9c87fda36f08"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/UUy1en9E"}