{"info":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","description":"<html><head></head><body><p><img src=\"https://i.imgur.com/TSlhWi2.png\" alt=\"Logo\"></p>\n<h2 id=\"getting-started\">Getting Started</h2>\n<p>Want to jump right in and test our APIs? Hit the <code>Run in Postman</code> button in the top right to launch <a href=\"https://www.getpostman.com/\">Postman</a>.\nPostman is free &amp; lets you test and debug API requests.</p>\n<p>You can run the examples for each request by expanding them in the top right.</p>\n<p><img src=\"https://assets.postman.com/postman-docs/accessing-saved-examples.jpg\" alt=\"Examples\"></p>\n\n<hr>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://app.touchsms.com.au/api/v2\n</code></pre><hr>\n<h1 id=\"authentication\">Authentication</h1>\n<p>All API requests require an API key. You can generate them by logging into your account, and visiting the <code>API Keys</code> page under <code>Settings</code> in the sidebar.</p>\n<p>Click the <code>Create API Key</code> button and enter a name for your key. The system will generate you a new set of API credentials, which consist of an <code>Access Token</code> and a\n<code>Token ID</code>.</p>\n<p>When making requests to the API, credentials are passed using <a href=\"https://en.wikipedia.org/wiki/Basic_access_authentication\">Basic Authentication</a>.</p>\n<p>The <code>Access Token</code> is used as the <strong>username</strong>, and the <code>Token ID</code> is used as the <strong>password</strong>. These\nare labelled this way on the <code>API Keys</code> page to make the mapping clear.</p>\n<p>Most 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.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Basic &lt;credentials&gt;\n</code></pre><p><code>&lt;credentials&gt;</code> is the Base64 encoding of the Access Token and Token ID joined by a single colon <code>:</code>.</p>\n<p>For example, in PHP:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">$header = \"Authorization: Basic \" . base64_encode($accessToken . \":\" . $tokenId)\n</code></pre>\n<h3 id=\"how-to-use-basic-auth-with-postman\">How to use basic auth with Postman</h3>\n<p>In Postman, you\ncan preset your credentials for all requests by clicking the collection name in the (Called <code>touchSMS</code>) and then entering the <code>Access Token</code> in the <code>Username</code> field\nand the <code>Token ID</code> in the <code>Password</code> field.</p>\n<p><img src=\"https://assets.postman.com/postman-docs/basic-auth.jpg\" alt=\"Basic Auth\"></p>\n\n<p>For security purposes, all requests to our API must be made over HTTPs.</p>\n<h2 id=\"api-key-related-error-response\">API Key related error response</h2>\n<p>If an API Key is missing, malformed, or invalid, you will receive a <code>401 Unauthorized</code> response code and the following JSON response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"message\": \"Unauthenticated.\"\n}\n</code></pre><hr>\n<h2 id=\"security\">Security</h2>\n<p>If 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.</p>\n<p>You 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.</p>\n<hr>\n<h2 id=\"pagination\">Pagination</h2>\n<p>Endpoints that return a list of resources are paginated. Use the <code>page</code> query param to move through\nthe results:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/contacts?page=2\n</code></pre><p>Paginated responses wrap the results in a <code>data</code> array, alongside <code>links</code> and <code>meta</code> objects\ndescribing the current position in the result set:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    // ... resources for this page\n  ],\n  \"links\": {\n    \"first\": \"https://app.touchsms.com.au/api/v2/contacts?page=1\",\n    \"last\": \"https://app.touchsms.com.au/api/v2/contacts?page=8\",\n    \"prev\": null,\n    \"next\": \"https://app.touchsms.com.au/api/v2/contacts?page=2\"\n  },\n  \"meta\": {\n    \"current_page\": 1,\n    \"from\": 1,\n    \"last_page\": 8,\n    \"path\": \"https://app.touchsms.com.au/api/v2/contacts\",\n    \"per_page\": 50,\n    \"to\": 50,\n    \"total\": 400\n  }\n}\n</code></pre>\n<p>Rather than incrementing <code>page</code> yourself, follow <code>links.next</code> until it is <code>null</code>. This is the safest\nway to walk a full result set.</p>\n<h3 id=\"page-size\">Page size</h3>\n<p>The <code>contacts</code> and <code>groups</code> endpoints accept a <code>per_page</code> query param, between <code>10</code> and <code>200</code>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/contacts?per_page=200\n</code></pre><p>Other endpoints use a fixed page size and will ignore <code>per_page</code>. Current defaults:</p>\n<table>\n    <thead>\n    <tr>\n        <th>Endpoint</th>\n        <th>Default page size</th>\n        <th>Accepts <code>per_page</code></th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>/v2/contacts</strong></td>\n        <td>50</td>\n        <td>Yes (10 to 200)</td>\n    </tr>\n    <tr>\n        <td><strong>/v2/groups</strong></td>\n        <td>50</td>\n        <td>Yes (10 to 200)</td>\n    </tr>\n    <tr>\n        <td><strong>/v2/inbounds</strong></td>\n        <td>100</td>\n        <td>No</td>\n    </tr>\n    <tr>\n        <td><strong>/v2/optouts</strong></td>\n        <td>15</td>\n        <td>No</td>\n    </tr>\n    <tr>\n        <td><strong>/v2/webhook-subscriptions</strong></td>\n        <td>25</td>\n        <td>No</td>\n    </tr>\n    </tbody>\n</table>\n\n<p>Do not rely on these defaults staying fixed. Read <code>meta.per_page</code> from the response if your\nintegration needs to know the page size it was served.</p>\n<p>Not every list endpoint is paginated. <code>/v2/templates</code> and <code>/v2/account/sender-ids</code> return the full\nset in a <code>data</code> array with no <code>links</code> or <code>meta</code>. Check for the presence of <code>meta</code> rather than\nassuming it is there.</p>\n<hr>\n<h2 id=\"timestamps\">Timestamps</h2>\n<p>All request timestamps show be formatted as ISO8601, e.g. <code>YYYY-MM-DDTHH:MM:SS</code>. The timezone is always UTC.</p>\n<hr>\n<h2 id=\"error-codes\">Error Codes</h2>\n<p>Always check if your API call was successful or resulted in error. You may check the following</p>\n<ul>\n<li>200 OK response header.</li>\n<li>4XX ERROR response header</li>\n<li>5XX ERROR response header</li>\n</ul>\n<p>Please 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.</p>\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<h2 id=\"troubleshooting-common-api-connection-problems\">Troubleshooting common API connection problems.</h2>\n<p>To 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.</p>\n<p>Check your network topology, firewalls, proxies and other network components that maybe causing your server to not be able to connect.</p>\n<p>If you are receiving an error status code, first check the request body for detailed error information.</p>\n<hr>\n<h2 id=\"still-got-problems\">Still got problems?</h2>\n<p>If 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.</p>\n<p><strong>API endpoint being used?</strong></p>\n<p>i.e. <code>/api/v2/sms</code></p>\n<p><strong>Language being used?</strong></p>\n<p>i.e. <code>php</code>, <code>C#</code>, etc</p>\n<p><strong>Are you using the relevant library or package?</strong></p>\n<p>Y/N</p>\n<p><strong>Have you tested the failing request in Postman? If not, please reproduce the issue there</strong></p>\n<p>Y/N</p>\n<p><strong>What are you trying to achieve with the API request?</strong></p>\n<p>i.e. I'm trying to send a sms message to a client with a custom sender ID,</p>\n<p><strong>What error(s) are you getting from the API? Include the description given in the response.</strong></p>\n<p>i.e. <code>Number is opted out</code></p>\n<p><strong>NB: WE MUST HAVE A HTTP REQUEST/RESPONSE CAPTURE (Without this we cannot help you)</strong></p>\n<p>Acceptable formats for this are:</p>\n<ul>\n<li>Curl Snippet (this can be <a href=\"https://stackoverflow.com/questions/49432735/converting-a-postman-request-to-curl\">exported from postman</a>)</li>\n<li>HAR (Http Archive)</li>\n<li>Raw HTTP Request</li>\n</ul>\n<p>Please provide the output of attempting the relevant API call with curl, as provided on the API's documentation page.</p>\n<p>If possible, please provide a copy of the relevant source code making the request.</p>\n<h1 id=\"testing-numbers\">Testing Numbers</h1>\n<p>If 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.</p>\n<h3 id=\"valid-number\">Valid Number</h3>\n<p><strong>61491578888</strong></p>\n<p>This will cause the API to skip saving this message, but return a result as if it was a normally processed message</p>\n<h3 id=\"invalid-number\">Invalid Number</h3>\n<p><strong>61491570156</strong></p>\n<p>This will cause the API to respond with an error that the number is not valid</p>\n<h3 id=\"opt-out\">Opt Out</h3>\n<p><strong>61491570157</strong></p>\n<p>This will cause the API to respond like the number is opted out</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Authentication","slug":"authentication"},{"content":"Testing Numbers","slug":"testing-numbers"}],"owner":"14542603","collectionId":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","publishedId":"2sBY4SMJsn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-07-29T00:25:09.000Z"},"item":[{"name":"Messages","item":[{"name":"Send SMS / MMS","id":"0035f38f-68a1-423a-87f4-2c617798912a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/sms","description":"<h1 id=\"send-sms\">Send SMS</h1>\n<h4 id=\"how-many-messages-can-i-send\">How many messages can I send?</h4>\n<p>You can post up to <code>1000</code> messages with each API call. If only a portion of messages fail, the successful ones will be sent.</p>\n<p>If sending MMS messages, you are limited to 10 messages per API call.</p>\n<h4 id=\"request-content-type\">Request content type</h4>\n<p>You must send requests to this endpoint using <code>application/json</code> due to the nested structure of the data.</p>\n<h4 id=\"message-metadata\">Message Metadata</h4>\n<p>You can supply up to 10 key/value pairs as metadata with each message, allowing your integration to identify and associate delivery receipt and inbound replies\nwith entities in your system.</p>\n<p>Each key may be up to 50 characters and must be a string. Each value may be up to 100 characters and may be a string or an integer.</p>\n<h4 id=\"sending-mms-messages\">Sending MMS messages</h4>\n<p>To send as MMS message, use the <code>media</code> property (array). You can attach a single image, up to a size limit of 1MB.\nMMS messages are limited to 10 per request, and are not supported in all countries.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"messages\": [\n    {\n      \"from\": \"+61412345678\",\n      // Must be an MMS supported virtual number\n      \"to\": \"+61412345678\",\n      \"body\": \"Body text, up to 1600 characters\",\n      \"metadata\": {\n        \"mms_subject\": \"My MMS Subject\"\n        // Specify MMS subject, up to 40 chars\n      },\n      \"media\": [\n        // Publically accessible file, up to 1MB. jpg, png, gif supported.\n        \"https://example.com/my_image.jpg\"\n      ]\n    }\n  ]\n}\n</code></pre>\n<h2 id=\"request-body\">Request Body</h2>\n<p>The request body should consist of an <code>array</code> with the key <code>messages</code>, containing each individual message to be sent.</p>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>to</strong></td>\n        <td>string</td>\n        <td>Destination phone number. Ideally in E164 international format including the leading +, ie <code>+61412345678</code>. Local formatting will be parsed but is not recommended.</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>from</strong></td>\n        <td>string</td>\n        <td>Sender ID, either a a Dedicated Number, Verified Phone Number, Verified Alphanumeric Sender ID. When using numbers, use E164 format. To send using the shared pool, use the string \"SHARED_NUMBER\"</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>body</strong></td>\n        <td>string</td>\n        <td>Message content, up to 1600 characters. Unicode is accepted.</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>campaign</strong></td>\n        <td>string</td>\n        <td>Custom campaign name. Shown in reports.</td>\n        <td></td>\n        <td>API Campaign (%date%)</td>\n    </tr>\n    <tr>\n        <td><strong>metadata</strong></td>\n        <td>object</td>\n        <td>Custom metadata to associate with the message. Will be returned with delivery receipts and inbound messages that are replies.</td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>media</strong></td>\n        <td>array</td>\n        <td>Supply a single image URL to send message as an MMS. See MMS section above.</td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>reference</strong></td>\n        <td>string</td>\n        <td>Custom reporting reference. Available in exported reports and delivery receipts.</td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>date</strong></td>\n        <td>datetime</td>\n        <td>Schedule a message at a specific time. Must be in ISO8601 format in UTC timezone. Eg 2021-02-17T22:52:07Z</td>\n        <td></td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"request-level-options\">Request-Level Options</h3>\n<p>The following parameters can be included at the root level of the request (alongside the <code>messages</code> array):</p>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>opt_out_list_id</strong></td>\n        <td>integer</td>\n        <td>ID of an existing opt-out list to check recipients against. Recipients found in this list will be rejected with error code RECIPIENT_OPTED_OUT. Cannot be used with opt_out_list_name.</td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_list_name</strong></td>\n        <td>string</td>\n        <td>Name of an existing opt-out list to check recipients against. Recipients found in this list will be rejected with error code RECIPIENT_OPTED_OUT. Cannot be used with opt_out_list_id.</td>\n        <td></td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>reject_duplicates</strong></td>\n        <td>boolean</td>\n        <td>When true, prevents sending duplicate messages with the same from, to, and body within this request. Duplicates will be filtered out before processing.</td>\n        <td></td>\n        <td>false</td>\n    </tr>\n    <tr>\n        <td><strong>reject_duplicates_by_recipient</strong></td>\n        <td>boolean</td>\n        <td>When true, prevents sending duplicate messages to the same recipient (to field) within this request, regardless of from or body content. Only the first message to each recipient will be sent.</td>\n        <td></td>\n        <td>false</td>\n    </tr>\n    </tbody>\n</table>\n\n<h4 id=\"using-opt-out-lists\">Using Opt-Out Lists</h4>\n<p>You can prevent messages from being sent to recipients who have opted out by specifying an opt-out list. Use either the list ID or name (but not both):</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"opt_out_list_id\": 123,\n  \"messages\": [\n    {\n      \"from\": \"+61412345678\",\n      \"to\": \"+61412345679\",\n      \"body\": \"Your message here\"\n    }\n  ]\n}\n</code></pre>\n<p>Or using the list name:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"opt_out_list_name\": \"Marketing Opt-Outs\",\n  \"messages\": [\n    {\n      \"from\": \"+61412345678\",\n      \"to\": \"+61412345679\",\n      \"body\": \"Your message here\"\n    }\n  ]\n}\n</code></pre>\n<h4 id=\"duplicate-prevention\">Duplicate Prevention</h4>\n<p>You can prevent duplicate messages within a single request using the duplicate rejection options:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"reject_duplicates\": true,\n  \"messages\": [\n    {\n      \"from\": \"+61412345678\",\n      \"to\": \"+61412345679\",\n      \"body\": \"Your message here\"\n    },\n    {\n      \"from\": \"+61412345678\",\n      \"to\": \"+61412345679\",\n      \"body\": \"Your message here\"\n    }\n  ]\n}\n</code></pre>\n<p>In this example, only the first message would be sent as they have identical from, to, and body values.</p>\n<p>Alternatively, use <code>reject_duplicates_by_recipient</code> to allow only one message per recipient:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"reject_duplicates_by_recipient\": true,\n  \"messages\": [\n    {\n      \"from\": \"+61412345678\",\n      \"to\": \"+61412345679\",\n      \"body\": \"First message\"\n    },\n    {\n      \"from\": \"+61412345680\",\n      \"to\": \"+61412345679\",\n      \"body\": \"Second message\"\n    }\n  ]\n}\n</code></pre>\n<p>In this example, only the first message would be sent as both messages are going to the same recipient.</p>\n<h2 id=\"response\">Response</h2>\n<p>The response will contain both successful and failed messages. Successful messages will be returned in the <code>data.messages[]</code> array, and include the same keys as\nthe request. A <code>meta</code> object is also returned for each message, which contains information about the message length, cost, etc</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"VALID\",\n  \"to\": \"61476647930\",\n  \"from\": \"ALPHASENDER\",\n  \"body\": \"hello world\",\n  \"campaign\": \"API Campaign (2021-07-05)\",\n  \"reference\": null,\n  \"date\": null,\n  \"meta\": {\n    \"size\": 11,\n    \"parts\": 1,\n    \"is_unicode\": false,\n    \"cost\": 1,\n    \"country\": \"AU\"\n  }\n}\n</code></pre>\n<p>Failed messages will be returned in the <code>data.errors[]</code> array, and will contain the input data (same keys) along with the <code>error_code</code> and <code>error_help</code>\nproperties.\nPlease see the table below for possible error codes. The <code>error_help</code> field should be logged in your system, as this contains human-readable information on how\nto resolve the error.</p>\n<h3 id=\"insufficient-credits\">Insufficient Credits</h3>\n<p>If your account does not have sufficient credits to complete a send, a 406 HTTP code will be returned.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Insufficient credits\",\n  \"required\": 102,\n  \"balance\": 11,\n  \"is_postpaid\": false\n}\n</code></pre>\n<h3 id=\"message-error-codes\">Message Error Codes</h3>\n<table>\n  <thead>\n    <tr>\n      <th>Key</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>INVALID_MEDIA</td>\n      <td>MMS media failed validation. Please see MMS docs.</td>\n    </tr>\n    <tr>\n      <td>INVALID_BODY</td>\n      <td>Message body was invalid or missing.</td>\n    </tr>\n    <tr>\n      <td>INVALID_METADATA</td>\n      <td>Metadata failed validation. Please see metadata docs.</td>\n    </tr>\n    <tr>\n      <td>INVALID_RECIPIENT</td>\n      <td>Recipient is invalid or could not be parsed.P Pass number as E164 where possible.</td>\n    </tr>\n    <tr>\n      <td>INVALID_SCHEDULE</td>\n      <td>Schedule date is invalid.</td>\n    </tr>\n    <tr>\n      <td>INVALID_SENDER_ID</td>\n      <td>Sender ID is invalid.</td>\n    </tr>\n    <tr>\n      <td>UNAPPROVED_SENDER_ID</td>\n      <td>Sender ID is not allowed or approved for account. Please register the sender ID in your account's allowed sender ID page under settings.</td>\n    </tr>\n    <tr>\n      <td>RECIPIENT_OPTED_OUT</td>\n      <td>Recipient opted out from communications.</td>\n    </tr>\n  </tbody>\n</table>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","sms"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"3b339f52-01c3-4770-9b32-0d60a22833a7","name":"Send SMS","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"reject_duplicates_by_recipient\": false,\n    \"messages\": [\n        {\n            \"to\": \"0476647930\",\n            \"from\": \"ALPHASENDER\",\n            \"body\": \"hello world\"\n        },\n        {\n            \"to\": \"04123\",\n            \"from\": \"61412345678\",\n            \"body\": \"invalid number\"\n        },\n        {\n            \"to\": \"0476647930\",\n            \"from\": \"TOOOOOOOOOLONG\",\n            \"body\": \"invalid sender\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/sms"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"meta\": {\n            \"totalParts\": 1,\n            \"totalMessages\": 1,\n            \"totalCredits\": 1,\n            \"creditBalance\": 1000,\n            \"hasSufficientCredits\": true\n        },\n        \"messages\": [\n            {\n                \"status\": \"VALID\",\n                \"to\": \"61476647930\",\n                \"from\": \"ALPHASENDER\",\n                \"body\": \"hello world\",\n                \"campaign\": \"API Campaign (2021-07-05)\",\n                \"reference\": null,\n                \"date\": null,\n                \"meta\": {\n                    \"size\": 11,\n                    \"parts\": 1,\n                    \"is_unicode\": false,\n                    \"cost\": 1,\n                    \"country\": \"AU\"\n                }\n            }\n        ],\n        \"errors\": [\n            {\n                \"status\": \"ERROR\",\n                \"error_code\": \"INVALID_RECIPIENT\",\n                \"to\": \"04123\",\n                \"from\": \"61412345678\",\n                \"body\": \"invalid number\",\n                \"campaign\": null,\n                \"reference\": null,\n                \"date\": null\n            },\n            {\n                \"status\": \"ERROR\",\n                \"error_code\": \"INVALID_SENDER_ID\",\n                \"to\": \"61476647930\",\n                \"from\": \"TOOOOOOOOOLONG\",\n                \"body\": \"invalid sender\",\n                \"campaign\": null,\n                \"reference\": null,\n                \"date\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"0035f38f-68a1-423a-87f4-2c617798912a"},{"name":"Send SMS / MMS (Dry)","id":"ad63942a-e521-4748-9220-a5d28729e6cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/sms/dry","description":"<p>This endpoint performs all the validation done by the \"Send SMS\" endpoint, and provides calculations credit usage and message length. </p>\n<p>Messages posted to this endpoint are not sent.</p>\n<p>See the documentation for the \"Send SMS\" endpoint.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","sms","dry"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"de676fe0-04dc-47e5-b58f-dbab14928277","name":"Send SMS Dry","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"reject_duplicates_by_recipient\": false,\n    \"messages\": [\n        {\n            \"to\": \"0476647930\",\n            \"from\": \"ALPHASENDER\",\n            \"body\": \"hello world\"\n        },\n        {\n            \"to\": \"04123\",\n            \"from\": \"61412345678\",\n            \"body\": \"invalid number\"\n        },\n        {\n            \"to\": \"0476647930\",\n            \"from\": \"TOOOOOOOOOLONG\",\n            \"body\": \"invalid sender\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/sms/dry"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"meta\": {\n            \"totalParts\": 1,\n            \"totalMessages\": 1,\n            \"totalCredits\": 1,\n            \"creditBalance\": 1000,\n            \"hasSufficientCredits\": true\n        },\n        \"messages\": [\n            {\n                \"status\": \"VALID\",\n                \"to\": \"61476647930\",\n                \"from\": \"ALPHASENDER\",\n                \"body\": \"hello world\",\n                \"campaign\": \"API Campaign (2021-07-05)\",\n                \"reference\": null,\n                \"date\": null,\n                \"meta\": {\n                    \"size\": 11,\n                    \"parts\": 1,\n                    \"is_unicode\": false,\n                    \"cost\": 1,\n                    \"country\": \"AU\"\n                }\n            }\n        ],\n        \"errors\": [\n            {\n                \"status\": \"ERROR\",\n                \"error_code\": \"INVALID_RECIPIENT\",\n                \"to\": \"04123\",\n                \"from\": \"61412345678\",\n                \"body\": \"invalid number\",\n                \"campaign\": null,\n                \"reference\": null,\n                \"date\": null\n            },\n            {\n                \"status\": \"ERROR\",\n                \"error_code\": \"INVALID_SENDER_ID\",\n                \"to\": \"61476647930\",\n                \"from\": \"TOOOOOOOOOLONG\",\n                \"body\": \"invalid sender\",\n                \"campaign\": null,\n                \"reference\": null,\n                \"date\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"ad63942a-e521-4748-9220-a5d28729e6cc"}],"id":"116925ad-9331-436b-a764-69fdb0031ab9","_postman_id":"116925ad-9331-436b-a764-69fdb0031ab9","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Templates","item":[{"name":"List Templates","id":"1fe1616f-6ed7-40c0-864b-44cbce245e99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/templates","description":"<h1 id=\"list-templates\">List Templates</h1>\n<p>Returns the message templates on your account, ordered by name.</p>\n<p>This endpoint returns all active templates in a single response and is not paginated.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/templates\n</code></pre><h2 id=\"response\">Response</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 1234,\n      \"user\": 5678,\n      \"name\": \"Appointment Reminder\",\n      \"message\": \"Hi {{firstname}}, reminder of your appointment tomorrow.\",\n      \"replies\": true,\n      \"sender_id\": \"SHARED_NUMBER\",\n      \"updated\": \"2024-03-11T02:14:07Z\",\n      \"created\": \"2024-02-02T23:51:19Z\"\n    }\n  ]\n}\n</code></pre>\n<table>\n    <thead>\n    <tr>\n        <th>Field</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Template ID</td>\n    </tr>\n    <tr>\n        <td><strong>user</strong></td>\n        <td>integer</td>\n        <td>ID of the user the template belongs to</td>\n    </tr>\n    <tr>\n        <td><strong>account</strong></td>\n        <td>integer</td>\n        <td>Account ID. Only present on templates shared across an account</td>\n    </tr>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>Template name</td>\n    </tr>\n    <tr>\n        <td><strong>message</strong></td>\n        <td>string</td>\n        <td>Template body. May contain merge fields such as <code>{{firstname}}</code></td>\n    </tr>\n    <tr>\n        <td><strong>replies</strong></td>\n        <td>boolean</td>\n        <td>Whether replies are enabled for messages sent with this template</td>\n    </tr>\n    <tr>\n        <td><strong>sender_id</strong></td>\n        <td>string</td>\n        <td>Sender ID associated with the template</td>\n    </tr>\n    <tr>\n        <td><strong>updated</strong></td>\n        <td>string</td>\n        <td>ISO8601 timestamp, UTC</td>\n    </tr>\n    <tr>\n        <td><strong>created</strong></td>\n        <td>string</td>\n        <td>ISO8601 timestamp, UTC</td>\n    </tr>\n    </tbody>\n</table>\n\n<p>Only active templates are returned. Templates are read-only over the API, they are created and\nedited in the web interface.</p>\n<p>To send a message using a template, read the <code>message</code> field and pass it as the <code>body</code> when calling\nthe send endpoint. Merge fields are not substituted by this endpoint.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","templates"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1fe1616f-6ed7-40c0-864b-44cbce245e99"}],"id":"9f8d146f-c053-4dd7-afaf-208ef4e4d702","_postman_id":"9f8d146f-c053-4dd7-afaf-208ef4e4d702","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Contacts","item":[{"name":"List Contacts","id":"47f70471-ff1c-4294-bea2-6864bad19313","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{baseUrl}}/v2/contacts","description":"<h1 id=\"list-contacts\">List Contacts</h1>\n<h2 id=\"query-params\">Query Params</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>search</strong></td>\n        <td>string</td>\n        <td>Search Term</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>sort_by</strong></td>\n        <td>string</td>\n        <td>Sort field, one of `['id', 'firstname', 'lastname', 'created']`</td>\n        <td>No</td>\n        <td>firstname</td>\n    </tr>\n    <tr>\n        <td><strong>sort_order</strong></td>\n        <td>string</td>\n        <td>Sort order, one of `['asc', 'desc']`</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","contacts"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"b1de04f9-ff1a-4bae-967e-26b463f70772","name":"List Contacts","originalRequest":{"method":"GET","header":[],"url":"{{baseUrl}}/v2/contacts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": 4040,\n            \"country\": 1,\n            \"firstname\": \"James\",\n            \"surname\": \"Cook\",\n            \"email\": \"\",\n            \"number\": 61405600008,\n            \"updated\": \"2021-08-27T01:23:06Z\",\n            \"created\": \"2021-04-07T02:15:22Z\"\n        },\n        {\n            \"id\": 4041,\n            \"country\": 1,\n            \"firstname\": \"Tom\",\n            \"surname\": \"Williamson\",\n            \"email\": \"\",\n            \"number\": 61405600000,\n            \"updated\": \"2021-08-27T01:23:06Z\",\n            \"created\": \"2021-04-07T02:15:25Z\"\n        }\n    ],\n    \"links\": {\n        \"first\": \"https://{{baseUrl}}/v2/contacts?page=1\",\n        \"last\": \"https://{{baseUrl}}/v2/contacts?page=21\",\n        \"prev\": null,\n        \"next\": \"https://{{baseUrl}}/v2/contacts?page=2\"\n    },\n    \"meta\": {\n        \"current_page\": 1,\n        \"from\": 1,\n        \"last_page\": 21,\n        \"path\": \"https://{{baseUrl}}/v2/contacts\",\n        \"per_page\": 100,\n        \"to\": 100,\n        \"total\": 2023\n    }\n}"}],"_postman_id":"47f70471-ff1c-4294-bea2-6864bad19313"},{"name":"Create Contact","id":"7af7fbd9-52f4-43f7-9848-c336fcd72f7b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/contacts","description":"<h1 id=\"create-contact\">Create Contact</h1>\n<p>Create a new contact in, optionally specifying a group.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>number</strong></td>\n        <td>string</td>\n        <td>Mobile number of the Contact</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>firstname</strong></td>\n        <td>string</td>\n        <td>First Name of the Contact</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>surname</strong></td>\n        <td>string</td>\n        <td>Last Name of the Contact</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>email</strong></td>\n        <td>string</td>\n        <td>Email Address of the Contact</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>group</strong></td>\n        <td>string</td>\n        <td>If supplied, the new contact will be added to the group with the supplied title. If the group does not exist it will be created.</td>\n        <td>Optional</td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","contacts"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"056c6eeb-c613-4612-8f90-c8ec1eb5516d","name":"Create Contact","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"James\",\n    \"surname\": \"Cook\",\n    \"number\": \"0412345678\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/contacts"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 111111,\n        \"user\": 1,\n        \"country\": 1,\n        \"firstname\": \"James\",\n        \"surname\": \"Cook\",\n        \"email\": null,\n        \"number\": \"61412345678\",\n        \"updated\": \"2021-09-30T01:05:32Z\",\n        \"created\": \"2021-09-30T01:05:32Z\"\n    }\n}"}],"_postman_id":"7af7fbd9-52f4-43f7-9848-c336fcd72f7b"},{"name":"Update Contact","id":"15b778af-499d-4bf5-8a27-9f35b020c525","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/contacts/{{contact_id}}","description":"<h1 id=\"update-contact\">Update Contact</h1>\n<p>Update a contact.</p>\n<h2 id=\"path-variables\">Path Variables</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Contact's ID</td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>number</strong></td>\n        <td>string</td>\n        <td>Mobile number of the Contact</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>firstname</strong></td>\n        <td>string</td>\n        <td>First Name of the Contact</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>surname</strong></td>\n        <td>string</td>\n        <td>Last Name of the Contact</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>email</strong></td>\n        <td>string</td>\n        <td>Email Address of the Contact</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>group</strong></td>\n        <td>string</td>\n        <td>If supplied, the new contact will be added to the group with the supplied title. If the group does not exist it will be created.</td>\n        <td>Optional</td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","contacts","{{contact_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"11b8cbc2-7a02-449a-94f7-194b9813c519","name":"Update Contact","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"New\",\n    \"surname\": \"Name\",\n    \"number\": \"0412345678\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/api/v1/contacts/{{contact_id}}"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 111111,\n        \"user\": 1,\n        \"country\": 1,\n        \"firstname\": \"New\",\n        \"surname\": \"Name\",\n        \"email\": null,\n        \"number\": \"61412345678\",\n        \"updated\": \"2021-09-30T01:05:32Z\",\n        \"created\": \"2021-09-30T01:05:32Z\"\n    }\n}"}],"_postman_id":"15b778af-499d-4bf5-8a27-9f35b020c525"},{"name":"Show Contact","id":"813d434a-ff83-408c-85a1-4f49567b2480","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/contacts/{{contact_id}}","description":"<h1 id=\"show-contact\">Show Contact</h1>\n<p>Show a contact.</p>\n<h2 id=\"path-variables\">Path Variables</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Contact's ID</td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","contacts","{{contact_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"6190cf8c-954d-489e-a4ad-7d2062616a80","name":"Show Contact","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/contacts/{{contact_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.21.1"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Powered-By","value":"PHP/7.4.22"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Thu, 30 Sep 2021 01:13:33 GMT"},{"key":"X-RateLimit-Limit","value":"240"},{"key":"X-RateLimit-Remaining","value":"239"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 1,\n        \"user\": 1,\n        \"country\": 1,\n        \"firstname\": \"New\",\n        \"surname\": \"Name\",\n        \"email\": null,\n        \"number\": 61412345678,\n        \"updated\": \"2021-09-30T01:05:32Z\",\n        \"created\": \"2021-09-30T01:05:32Z\"\n    }\n}"}],"_postman_id":"813d434a-ff83-408c-85a1-4f49567b2480"},{"name":"Delete Contact","id":"81e220c1-6c85-4370-b8da-718da3257abf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/contacts/{{contact_id}}","description":"<h1 id=\"delete-contact\">Delete Contact</h1>\n<p>Delete a contact.</p>\n<h2 id=\"path-variables\">Path Variables</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Contact's ID</td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","contacts","{{contact_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"cfaac0f5-1b23-49e7-9fab-d1b52676abb0","name":"Delete Contact","originalRequest":{"method":"DELETE","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/contacts/{{contact_id}}"},"status":"No Content","code":204,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.21.1"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Powered-By","value":"PHP/7.4.22"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Thu, 30 Sep 2021 01:13:33 GMT"},{"key":"X-RateLimit-Limit","value":"240"},{"key":"X-RateLimit-Remaining","value":"239"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"81e220c1-6c85-4370-b8da-718da3257abf"}],"id":"25946c46-8adb-4676-ace9-c0586a5eaf0f","_postman_id":"25946c46-8adb-4676-ace9-c0586a5eaf0f","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Optouts","item":[{"name":"List Optouts","id":"0aae615b-fd2d-4f82-aad5-fdc694a2bb45","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{baseUrl}}/v2/optouts","description":"<h1 id=\"list-opt-outs\">List Opt-Outs</h1>\n<p>Get a paginated list of all opt-outs for your account across all opt-out lists.</p>\n<h2 id=\"request\">Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET /api/v2/optouts\n</code></pre>\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Parameter</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>search</strong></td>\n        <td>string</td>\n        <td>Search for partial or whole number</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>page</strong></td>\n        <td>integer</td>\n        <td>Page number for pagination</td>\n        <td>No</td>\n        <td>1</td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"response\">Response</h2>\n<p>Returns a paginated list of opt-out objects.</p>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 12345,\n      \"user\": 1,\n      \"number\": \"+61412345678\",\n      \"method\": \"SMS\",\n      \"opt_out_list\": {\n        \"id\": 1,\n        \"name\": \"Default Opt-Out List\",\n        \"is_default\": true\n      },\n      \"updated\": \"2021-02-17 22:52:07\",\n      \"created\": \"2021-02-17 22:52:07\"\n    },\n    {\n      \"id\": 12346,\n      \"user\": 1,\n      \"number\": \"+61412345679\",\n      \"method\": \"API\",\n      \"opt_out_list\": {\n        \"id\": 2,\n        \"name\": \"Marketing Opt-Outs\",\n        \"is_default\": false\n      },\n      \"updated\": \"2021-02-18 10:30:15\",\n      \"created\": \"2021-02-18 10:30:15\"\n    }\n  ],\n  \"links\": {\n    \"first\": \"http://example.com/api/v2/optouts?page=1\",\n    \"last\": \"http://example.com/api/v2/optouts?page=5\",\n    \"prev\": null,\n    \"next\": \"http://example.com/api/v2/optouts?page=2\"\n  },\n  \"meta\": {\n    \"current_page\": 1,\n    \"from\": 1,\n    \"last_page\": 5,\n    \"per_page\": 100,\n    \"to\": 100,\n    \"total\": 489\n  }\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<table>\n    <thead>\n    <tr>\n        <th>Field</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Unique identifier for the opt-out record</td>\n    </tr>\n    <tr>\n        <td><strong>user</strong></td>\n        <td>integer</td>\n        <td>ID of the user who owns this opt-out</td>\n    </tr>\n    <tr>\n        <td><strong>number</strong></td>\n        <td>string</td>\n        <td>The phone number that opted out (E164 format)</td>\n    </tr>\n    <tr>\n        <td><strong>method</strong></td>\n        <td>string</td>\n        <td>How the opt-out was created (SMS, API, MANUAL, etc.)</td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_list</strong></td>\n        <td>object</td>\n        <td>Details of the opt-out list this opt-out belongs to</td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_list.id</strong></td>\n        <td>integer</td>\n        <td>ID of the opt-out list</td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_list.name</strong></td>\n        <td>string</td>\n        <td>Name of the opt-out list</td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_list.is_default</strong></td>\n        <td>boolean</td>\n        <td>Whether this is the default opt-out list</td>\n    </tr>\n    <tr>\n        <td><strong>updated</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out was last updated</td>\n    </tr>\n    <tr>\n        <td><strong>created</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out was created</td>\n    </tr>\n    </tbody>\n</table>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","optouts"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"604e1240-1b57-4bf4-9543-e9a4beeb9fc7","name":"List Optouts","originalRequest":{"method":"GET","header":[],"url":"{{baseUrl}}/v2/optouts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n      \"data\": [\n          {\n              \"id\": 12345,\n              \"user\": 1,\n              \"number\": \"+61412345678\",\n              \"method\": \"SMS\",\n              \"opt_out_list\": {\n                  \"id\": 1,\n                  \"name\": \"Default Opt-Out List\",\n                  \"is_default\": true\n              },\n              \"updated\": \"2021-02-17 22:52:07\",\n              \"created\": \"2021-02-17 22:52:07\"\n          },\n          {\n              \"id\": 12346,\n              \"user\": 1,\n              \"number\": \"+61412345679\",\n              \"method\": \"API\",\n              \"opt_out_list\": {\n                  \"id\": 2,\n                  \"name\": \"Marketing Opt-Outs\",\n                  \"is_default\": false\n              },\n              \"updated\": \"2021-02-18 10:30:15\",\n              \"created\": \"2021-02-18 10:30:15\"\n          }\n      ],\n      \"links\": {\n          \"first\": \"https://{{baseUrl}}/v2/optouts?page=1\",\n          \"last\": \"https://{{baseUrl}}/v2/optouts?page=5\",\n          \"prev\": null,\n          \"next\": \"https://{{baseUrl}}/v2/optouts?page=2\"\n      },\n      \"meta\": {\n          \"current_page\": 1,\n          \"from\": 1,\n          \"last_page\": 5,\n          \"path\": \"https://{{baseUrl}}/v2/optouts\",\n          \"per_page\": 100,\n          \"to\": 100,\n          \"total\": 489\n      }\n  }\n"}],"_postman_id":"0aae615b-fd2d-4f82-aad5-fdc694a2bb45"},{"name":"Create Optout","id":"33505ad7-c215-46da-bbdf-1e322c9a1824","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/optouts","description":"<h1 id=\"create-optout\">Create Optout</h1>\n<p>Create a new opt out. Messages will no longer be sent to the number.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>number</strong></td>\n        <td>string</td>\n        <td>Mobile number of the Optout. If the number already exists, no new optout will be created</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_list_id</strong></td>\n        <td>integer</td>\n        <td>ID of the opt-out list to add the number to. Must belong to the authenticated user. Cannot be used with opt_out_list_name.</td>\n        <td>No</td>\n        <td>User's default list</td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_list_name</strong></td>\n        <td>string</td>\n        <td>Name of the opt-out list to add the number to. If the list doesn't exist, it will be created. Cannot be used with opt_out_list_id.</td>\n        <td>No</td>\n        <td>User's default list</td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"notes\">Notes</h3>\n<ul>\n<li>If neither <code>opt_out_list_id</code> nor <code>opt_out_list_name</code> is provided, the opt-out will be added to the user's default list.</li>\n<li>If both parameters are provided, a validation error will be returned.</li>\n<li>When using <code>opt_out_list_name</code>, the list will be created automatically if it doesn't exist.</li>\n</ul>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","optouts"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"37b72b82-3dbc-4574-a930-4ed2314aceb3","name":"Create Optout","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"number\": \"0412345678\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/optouts"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"  {\n      \"data\": {\n          \"id\": 28,\n          \"user\": 9,\n          \"number\": \"61412345678\",\n          \"method\": \"API\",\n          \"opt_out_list\": {\n              \"id\": 1,\n              \"name\": \"Default Opt-Out List\",\n              \"is_default\": true\n          },\n          \"updated\": \"2022-07-21T02:35:43.000000Z\",\n          \"created\": \"2022-07-21T02:35:43.000000Z\"\n      }\n  }\n"}],"_postman_id":"33505ad7-c215-46da-bbdf-1e322c9a1824"},{"name":"Show Optout","id":"87b7c51e-6898-451d-a818-223b6b5c685c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/optouts/{{optout_id}}","description":"<h1 id=\"show-optout\">Show Optout</h1>\n<p>Show a optout.</p>\n<h2 id=\"path-variables\">Path Variables</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Optout's ID</td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","optouts","{{optout_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"bebab05b-82fe-40b4-b94b-7aad5dae1a6d","name":"Show Optout","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/optouts/{{optout_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.21.1"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Powered-By","value":"PHP/7.4.22"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Thu, 30 Sep 2021 01:13:33 GMT"},{"key":"X-RateLimit-Limit","value":"240"},{"key":"X-RateLimit-Remaining","value":"239"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n      \"data\": {\n          \"id\": 12345,\n          \"user\": 1,\n          \"number\": \"+61412345678\",\n          \"method\": \"SMS\",\n          \"opt_out_list\": {\n              \"id\": 1,\n              \"name\": \"Default Opt-Out List\",\n              \"is_default\": true\n          },\n          \"updated\": \"2021-02-17 22:52:07\",\n          \"created\": \"2021-02-17 22:52:07\"\n      }\n  }\n"}],"_postman_id":"87b7c51e-6898-451d-a818-223b6b5c685c"},{"name":"Delete Optout","id":"82c676cd-042c-4b98-8779-43716af026d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/optouts/{{optout_id}}","description":"<h1 id=\"delete-optout\">Delete Optout</h1>\n<p>Delete an optout. Use the <code>index</code> endpoint to search for the number you wish to remove, then delete using this endpoint.</p>\n<h2 id=\"path-variables\">Path Variables</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Optout's ID</td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","optouts","{{optout_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"3aa4ecfa-e78b-406c-b88a-49f7052165cc","name":"Delete Optout","originalRequest":{"method":"DELETE","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/optouts/{{optout_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n}"}],"_postman_id":"82c676cd-042c-4b98-8779-43716af026d6"}],"id":"6a2672ae-abed-4bb0-bf57-d2a45956b523","_postman_id":"6a2672ae-abed-4bb0-bf57-d2a45956b523","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Opt Out Lists","item":[{"name":"List Opt Out Lists","id":"3e6478f3-efb9-4581-a66a-b24b4453acc7","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{baseUrl}}/v2/optout-lists","description":"<h1 id=\"list-opt-out-lists\">List Opt-Out Lists</h1>\n<p>Get a list of all opt-out lists for your account. Opt-out lists allow you to organize and manage different groups of opted-out recipients for different campaigns or purposes.</p>\n<h2 id=\"request\">Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET /api/v2/optout-lists\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p>Returns an array of opt-out list objects, ordered by default lists first, then alphabetically by name.</p>\n<p><strong>Note:</strong> Each account has at least one default opt-out list that is automatically created.</p>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"Default Opt-Out List\",\n      \"is_default\": true,\n      \"opt_out_count\": 245,\n      \"created_at\": \"2021-02-17T22:52:07Z\",\n      \"updated_at\": \"2021-02-17T22:52:07Z\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Marketing Opt-Outs\",\n      \"is_default\": false,\n      \"opt_out_count\": 89,\n      \"created_at\": \"2021-03-10T14:30:22Z\",\n      \"updated_at\": \"2021-03-15T09:45:18Z\"\n    }\n  ]\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<table>\n    <thead>\n    <tr>\n        <th>Field</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Unique identifier for the opt-out list</td>\n    </tr>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>Name of the opt-out list</td>\n    </tr>\n    <tr>\n        <td><strong>is_default</strong></td>\n        <td>boolean</td>\n        <td>Whether this is the default opt-out list for the account</td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_count</strong></td>\n        <td>integer</td>\n        <td>Number of opt-outs in this list</td>\n    </tr>\n    <tr>\n        <td><strong>created_at</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out list was created (ISO8601 format)</td>\n    </tr>\n    <tr>\n        <td><strong>updated_at</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out list was last updated (ISO8601 format)</td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","optout-lists"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"57ecd02d-ac7f-4c77-86f8-cc3efbd13ee4","name":"List Opt Out Lists","originalRequest":{"method":"GET","header":[],"url":"{{baseUrl}}/v2/optout-lists"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n      \"data\": [\n          {\n              \"id\": 1,\n              \"name\": \"Default Opt-Out List\",\n              \"is_default\": true,\n              \"opt_out_count\": 245,\n              \"created_at\": \"2021-02-17T22:52:07Z\",\n              \"updated_at\": \"2021-02-17T22:52:07Z\"\n          },\n          {\n              \"id\": 2,\n              \"name\": \"Marketing Opt-Outs\",\n              \"is_default\": false,\n              \"opt_out_count\": 89,\n              \"created_at\": \"2021-03-10T14:30:22Z\",\n              \"updated_at\": \"2021-03-15T09:45:18Z\"\n          }\n      ]\n  }\n"}],"_postman_id":"3e6478f3-efb9-4581-a66a-b24b4453acc7"},{"name":"Show Opt Out List","id":"fb060918-bd97-45df-90df-e5c7beaf4f5b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/optout-lists/{{optout_list_id}}","description":"<h1 id=\"show-opt-out-list\">Show Opt-Out List</h1>\n<p>Get details of a specific opt-out list. This endpoint provides information about the opt-out list including its name, default status, and the number of opt-outs it contains.</p>\n<h2 id=\"request\">Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET /api/v2/optout-lists/{id}\n</code></pre>\n<h3 id=\"path-parameters\">Path Parameters</h3>\n<table>\n    <thead>\n    <tr>\n        <th>Parameter</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>The ID of the opt-out list to retrieve</td>\n        <td>Yes</td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"response\">Response</h2>\n<p>Returns a single opt-out list object.</p>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"id\": 1,\n    \"name\": \"Marketing Opt-Outs\",\n    \"is_default\": false,\n    \"opt_out_count\": 89,\n    \"created_at\": \"2021-03-10T14:30:22Z\",\n    \"updated_at\": \"2021-03-15T09:45:18Z\"\n  }\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<table>\n    <thead>\n    <tr>\n        <th>Field</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Unique identifier for the opt-out list</td>\n    </tr>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>Name of the opt-out list</td>\n    </tr>\n    <tr>\n        <td><strong>is_default</strong></td>\n        <td>boolean</td>\n        <td>Whether this is the default opt-out list for the account</td>\n    </tr>\n    <tr>\n        <td><strong>opt_out_count</strong></td>\n        <td>integer</td>\n        <td>Number of opt-outs in this list</td>\n    </tr>\n    <tr>\n        <td><strong>created_at</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out list was created (ISO8601 format)</td>\n    </tr>\n    <tr>\n        <td><strong>updated_at</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out list was last updated (ISO8601 format)</td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>If the opt-out list doesn't exist or doesn't belong to your account:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"No query results for model [App\\\\Models\\\\OptOutList] {id}\"\n}\n</code></pre>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","optout-lists","{{optout_list_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"81aa10ec-42df-48a2-b764-ad038f82a513","name":"Show Opt out List","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/optout-lists/{{optout_list_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.21.1"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Powered-By","value":"PHP/7.4.22"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Thu, 30 Sep 2021 01:13:33 GMT"},{"key":"X-RateLimit-Limit","value":"240"},{"key":"X-RateLimit-Remaining","value":"239"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 28,\n        \"user\": 9,\n        \"number\": \"61412345678\",\n        \"updated\": \"2022-07-21T02:35:43.000000Z\",\n        \"created\": \"2022-07-21T02:35:43.000000Z\"\n    }\n}"}],"_postman_id":"fb060918-bd97-45df-90df-e5c7beaf4f5b"},{"name":"Show Opt Out List Optouts","id":"25aeb3d3-f8e6-4b35-bb14-87ea56d6a477","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/optout-lists/{{optout_list_id}}/optouts","description":"<h1 id=\"list-opt-outs-for-a-specific-list\">List Opt-Outs for a Specific List</h1>\n<p>Get all opt-outs that belong to a specific opt-out list.</p>\n<h2 id=\"request\">Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET /api/v2/optout-lists/{id}/optouts\n</code></pre>\n<h3 id=\"path-parameters\">Path Parameters</h3>\n<table>\n    <thead>\n    <tr>\n        <th>Parameter</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>The ID of the opt-out list</td>\n        <td>Yes</td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"query-parameters\">Query Parameters</h3>\n<table>\n    <thead>\n    <tr>\n        <th>Parameter</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>search</strong></td>\n        <td>string</td>\n        <td>Search for partial or whole number, first name, or last name</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>page</strong></td>\n        <td>integer</td>\n        <td>Page number for pagination</td>\n        <td>No</td>\n        <td>1</td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"response\">Response</h2>\n<p>Returns a paginated list of opt-out objects that belong to the specified opt-out list.</p>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 12345,\n      \"user\": 1,\n      \"number\": \"+61412345678\",\n      \"method\": \"SMS\",\n      \"opt_out_list\": {\n        \"id\": 1,\n        \"name\": \"Marketing Opt-Outs\",\n        \"is_default\": false\n      },\n      \"updated\": \"2021-02-17 22:52:07\",\n      \"created\": \"2021-02-17 22:52:07\"\n    },\n    {\n      \"id\": 12346,\n      \"user\": 1,\n      \"number\": \"+61412345679\",\n      \"method\": \"API\",\n      \"opt_out_list\": {\n        \"id\": 1,\n        \"name\": \"Marketing Opt-Outs\",\n        \"is_default\": false\n      },\n      \"updated\": \"2021-02-18 10:30:15\",\n      \"created\": \"2021-02-18 10:30:15\"\n    }\n  ],\n  \"links\": {\n    \"first\": \"http://example.com/api/v2/optout-lists/1/optouts?page=1\",\n    \"last\": \"http://example.com/api/v2/optout-lists/1/optouts?page=3\",\n    \"prev\": null,\n    \"next\": \"http://example.com/api/v2/optout-lists/1/optouts?page=2\"\n  },\n  \"meta\": {\n    \"current_page\": 1,\n    \"from\": 1,\n    \"last_page\": 3,\n    \"path\": \"http://example.com/api/v2/optout-lists/1/optouts\",\n    \"per_page\": 50,\n    \"to\": 50,\n    \"total\": 142\n  }\n}\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<table>\n    <thead>\n    <tr>\n        <th>Field</th>\n        <th>Type</th>\n        <th>Description</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>id</strong></td>\n        <td>integer</td>\n        <td>Unique identifier for the opt-out record</td>\n    </tr>\n    <tr>\n        <td><strong>user</strong></td>\n        <td>integer</td>\n        <td>ID of the user who owns this opt-out</td>\n    </tr>\n    <tr>\n        <td><strong>number</strong></td>\n        <td>string</td>\n        <td>The phone number that opted out (E164 format)</td>\n    </tr>\n    <tr>\n        <td><strong>method</strong></td>\n        <td>string</td>\n        <td>How the opt-out was created (SMS, API, MANUAL, etc.)</td>\n    </tr>\n    <tr>\n        <td><strong>updated</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out was last updated</td>\n    </tr>\n    <tr>\n        <td><strong>created</strong></td>\n        <td>datetime</td>\n        <td>When the opt-out was created</td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<p>If the opt-out list doesn't exist or doesn't belong to your account:</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","optout-lists","{{optout_list_id}}","optouts"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"4a4cac76-d4c4-4f20-a21a-ed7053ffb669","name":"Show Opt out List","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/optout-lists/{{optout_list_id}}/optouts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.21.1"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Powered-By","value":"PHP/7.4.22"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Thu, 30 Sep 2021 01:13:33 GMT"},{"key":"X-RateLimit-Limit","value":"240"},{"key":"X-RateLimit-Remaining","value":"239"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n      \"data\": [\n          {\n              \"id\": 12345,\n              \"user\": 1,\n              \"number\": \"+61412345678\",\n              \"method\": \"SMS\",\n              \"opt_out_list\": {\n                  \"id\": 1,\n                  \"name\": \"Marketing Opt-Outs\",\n                  \"is_default\": false\n              },\n              \"updated\": \"2021-02-17 22:52:07\",\n              \"created\": \"2021-02-17 22:52:07\"\n          },\n          {\n              \"id\": 12346,\n              \"user\": 1,\n              \"number\": \"+61412345679\",\n              \"method\": \"API\",\n              \"opt_out_list\": {\n                  \"id\": 1,\n                  \"name\": \"Marketing Opt-Outs\",\n                  \"is_default\": false\n              },\n              \"updated\": \"2021-02-18 10:30:15\",\n              \"created\": \"2021-02-18 10:30:15\"\n          }\n      ],\n      \"links\": {\n          \"first\": \"https://{{baseUrl}}/v2/optout-lists/1/optouts?page=1\",\n          \"last\": \"https://{{baseUrl}}/v2/optout-lists/1/optouts?page=3\",\n          \"prev\": null,\n          \"next\": \"https://{{baseUrl}}/v2/optout-lists/1/optouts?page=2\"\n      },\n      \"meta\": {\n          \"current_page\": 1,\n          \"from\": 1,\n          \"last_page\": 3,\n          \"path\": \"https://{{baseUrl}}/v2/optout-lists/1/optouts\",\n          \"per_page\": 50,\n          \"to\": 50,\n          \"total\": 142\n      }\n  }\n"}],"_postman_id":"25aeb3d3-f8e6-4b35-bb14-87ea56d6a477"}],"id":"e418e4bf-cc9c-40a7-96e1-42193bd307e3","_postman_id":"e418e4bf-cc9c-40a7-96e1-42193bd307e3","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Account","item":[{"name":"Get Account","id":"4691ee61-96fe-4d61-99a7-b39b429d37da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/account","description":"<h1 id=\"account-details\">Account Details</h1>\n<p>Use this method to retrieve your account information. It will return your credit count, default sender ID &amp; username.\nThis endpoint can also be used to test that you are correctly authenticated without sending an SMS.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","account"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"c3091ddd-8623-4b2b-afc4-9e97c4aac557","name":"Get Account","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"{{baseUrl}}/v2/account"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 1,\n        \"firstname\": \"test\",\n        \"surname\": \"test\",\n        \"email\": \"test@test.com\",\n        \"mobile\": \"61412345678\",\n        \"credits\": 24446,\n        \"settings\": {\n            \"timezone\": \"Australia/Sydney\",\n            \"allow_contact_duplicates\": false,\n            \"allow_sms_duplicates\": false\n        }\n    }\n}"}],"_postman_id":"4691ee61-96fe-4d61-99a7-b39b429d37da"},{"name":"Get Sender Ids","id":"f794f247-e4fc-4bf0-82ec-70987edfb9c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/account/sender-ids","description":"<h1 id=\"account-sender-ids\">Account Sender Ids</h1>\n<p>Use this method to retrieve the allowed sender IDs for your account. You must send from a verified sender id.</p>\n<p>Please visit the <a href=\"https://app.touchsms.com.au/settings/sender-ids\">Sender Id Management</a> to add a new sender id.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","account","sender-ids"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"211f4e9c-31db-4d5d-8cf7-141da21ded7c","name":"Get Account","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/account/sender-ids"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"type\": \"shared\",\n            \"type_description\": \"Shared\",\n            \"sender_id\": \"SHARED_NUMBER\",\n            \"label\": \"Shared Local Number\",\n            \"enabled\": true,\n            \"default\": false\n        },\n        {\n            \"type\": \"dedicated\",\n            \"type_description\": \"Dedicated\",\n            \"sender_id\": \"61412345678\",\n            \"label\": \"61412345678 (Virtual Number)\",\n            \"enabled\": true,\n            \"default\": true\n        },\n        {\n            \"type\": \"own\",\n            \"type_description\": \"Own\",\n            \"sender_id\": \"61412345678\",\n            \"label\": \"61412345678\",\n            \"enabled\": true,\n            \"default\": false\n        },\n        {\n            \"type\": \"custom\",\n            \"type_description\": \"Custom\",\n            \"sender_id\": \"TESTDEV\",\n            \"label\": \"TESTDEV\",\n            \"enabled\": true,\n            \"default\": false\n        }\n    ]\n}"}],"_postman_id":"f794f247-e4fc-4bf0-82ec-70987edfb9c4"}],"id":"d8628b40-b09c-426d-9f0e-07e5f1a12fd0","_postman_id":"d8628b40-b09c-426d-9f0e-07e5f1a12fd0","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Inbounds","item":[{"name":"List / Poll Inbounds","id":"ca37baf9-d6fb-47c1-bae7-0813697c1649","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{baseUrl}}/v2/inbounds","description":"<h1 id=\"list-inbounds\">List Inbounds</h1>\n<p>If you wish to receive incoming messages, <strong>it is strongly recommended that you use webhooks</strong>. Please see the \"Webhooks / Callbacks\" section in the sidebar.</p>\n<p>If your system cannot receive webhooks, or you prefer to poll for inbound you can use this endpoint. By passing a time or id, the system will only return inbounds newer than specified.</p>\n<p>Please note, this endpoint is rate limited to 120 requests per hour. For real time notifications, use webhooks.</p>\n<h2 id=\"query-params\">Query Params</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>created_after</strong></td>\n        <td>string</td>\n        <td>ISO8061 date/time. Only messages newer than this timestamp will be returned</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>id_after</strong></td>\n        <td>integer</td>\n        <td>Return only messages newer than a specific inbound ID. Query the API and keep a reference to the last ID seen, passing it to this param to only receive new messages.</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"inbound-media\">Inbound Media</h2>\n<p>Inbound MMS media is returned on the <code>media_urls</code> field, as a flat array of direct URLs to each media\nfile. For a plain SMS the field is empty.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 123456,\n  \"content\": \"Here are the photos\",\n  \"number\": \"61412345678\",\n  \"media_urls\": [\n    \"https://mms.touchsms.com.au/m/01gw171s65ecm8mhpx2086f7pg.jpeg\",\n    \"https://mms.touchsms.com.au/m/01gw171s65ecm8mhpx2086f7ph.jpeg\"\n  ]\n}\n</code></pre>\n<p>These URLs require no authentication to download. See \"Inbound MMS Media\" in the \"Webhooks /\nCallbacks\" section for details on downloading, retention, and handling multiple media files. Note\nthat the <code>message_received</code> webhook returns the same media as a <code>media</code> array of\n<code>{\"key\": ..., \"url\": ...}</code> objects rather than as flat strings.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","inbounds"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"5a2d5624-d409-43ee-9080-f28888e1b7ef","name":"List Inbounds","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{baseUrl}}/v2/inbounds?created_after=2022-01-30T07:33:17Z&id_after=1234","host":["{{baseUrl}}"],"path":["v2","inbounds"],"query":[{"key":"created_after","value":"2022-01-30T07:33:17Z"},{"key":"id_after","value":"1234"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": 1350660,\n            \"content\": \"Hello World\",\n            \"number\": \"TEST\",\n            \"new\": false,\n            \"optout\": false,\n            \"updated\": \"2022-01-23T08:55:48.000000Z\",\n            \"created\": \"2022-01-23T08:55:48.000000Z\",\n            \"contact\": null,\n            \"message\": null\n        },\n        {\n            \"id\": 1330561,\n            \"content\": \"Welcome to touchSMS\",\n            \"number\": \"61412334567\",\n            \"new\": false,\n            \"optout\": false,\n            \"updated\": \"2022-01-27T03:05:08.000000Z\",\n            \"created\": \"2022-01-27T03:05:08.000000Z\",\n            \"contact\": null,\n            \"message\": null\n        }\n               ],\n    \"links\": {\n        \"first\": \"https://{{baseUrl}}/v2/inbounds?page=1\",\n        \"last\": \"https://{{baseUrl}}/v2/inbounds?page=4\",\n        \"prev\": null,\n        \"next\": \"https://{{baseUrl}}/v2/inbounds?page=2\"\n    },\n    \"meta\": {\n        \"current_page\": 1,\n        \"from\": 1,\n        \"last_page\": 4,\n        \"links\": [\n            {\n                \"url\": null,\n                \"label\": \"<\",\n                \"active\": false\n            },\n            {\n                \"url\": \"https://{{baseUrl}}/v2/inbounds?page=1\",\n                \"label\": \"1\",\n                \"active\": true\n            },\n            {\n                \"url\": \"https://{{baseUrl}}/v2/inbounds?page=2\",\n                \"label\": \"2\",\n                \"active\": false\n            },\n            {\n                \"url\": \"https://{{baseUrl}}/v2/inbounds?page=3\",\n                \"label\": \"3\",\n                \"active\": false\n            },\n            {\n                \"url\": \"https://{{baseUrl}}/v2/inbounds?page=4\",\n                \"label\": \"4\",\n                \"active\": false\n            },\n            {\n                \"url\": \"https://{{baseUrl}}/v2/inbounds?page=2\",\n                \"label\": \">\",\n                \"active\": false\n            }\n        ],\n        \"path\": \"https://{{baseUrl}}/v2/inbounds\",\n        \"per_page\": 100,\n        \"to\": 100,\n        \"total\": 314\n    }\n}"}],"_postman_id":"ca37baf9-d6fb-47c1-bae7-0813697c1649"}],"id":"372a9a60-391f-4d99-9162-e5e479cbf7c9","_postman_id":"372a9a60-391f-4d99-9162-e5e479cbf7c9","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Verify (OTP)","item":[{"name":"Create Verification","id":"2a61f2ce-0ded-4131-9300-f50c6e7df2df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify","description":"<h1 id=\"create-verification\">Create Verification</h1>\n<p>Create a new verification.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>destination</strong></td>\n        <td>string</td>\n        <td>Mobile number to send verification to. E164 format preferred, API will attempt to parse other formats.</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>source</strong></td>\n        <td>string</td>\n        <td>SenderID / Source of verification SMS. Note, the sender must be added on your account as a verified sender ID.</td>\n        <td>No</td>\n        <td>Account Default Sender</td>\n    </tr>\n    <tr>\n        <td><strong>template</strong></td>\n        <td>string</td>\n        <td>Message template (content). Must contain `%code%`, may be up to 300 characters.</td>\n        <td>No</td>\n        <td>Your verification code is %code%</td>\n    </tr>\n    <tr>\n        <td><strong>metadata</strong></td>\n        <td>object</td>\n        <td>Attach metadata to the verification. For example, you could pass the action the user was attempting. See section below on validation of metadata.</td>\n        <td>No</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>expiry_seconds</strong></td>\n        <td>integer</td>\n        <td>How long the verification will be usable for. Once expired, a verification cannot be used</td>\n        <td>No</td>\n        <td>300</td>\n    </tr>\n    <tr>\n        <td><strong>token_length</strong></td>\n        <td>integer</td>\n        <td>Length of the generated code. Defaults to 6 characters.</td>\n        <td>No</td>\n        <td>6</td>\n    </tr>\n    </tbody>\n</table>\n\n\n<h4 id=\"message-metadata\">Message Metadata</h4>\n<p>You can supply up to 10 key/value pairs as metadata with each message, allowing your integration to identify and associate delivery receipt and inbound replies with entities in your system.</p>\n<p>Each key may be up to 50 characters and must be a string. Each value may be up to 100 characters and may be a string or an integer.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v3","verify"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"e24728b5-89e4-4883-9e37-a4f2fbf797b5","name":"Create Verification","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"destination\": \"0412345678\",\n    \"template\": \"Your verification code is %code%\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"sent\",\n        \"type\": \"sms\",\n        \"destination\": \"61412345678\",\n        \"source\": \"61491570159\",\n        \"metadata\": null,\n        \"template\": \"Your verification code is %code%\",\n        \"expires_at\": \"2023-02-11T07:57:08.000000Z\",\n        \"created_at\": \"2023-02-11T07:52:08.000000Z\"\n    }\n}"}],"_postman_id":"2a61f2ce-0ded-4131-9300-f50c6e7df2df"},{"name":"Check Verification","id":"a16828a1-61b6-480a-94b1-74cf46ce7338","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify/{{verify_id}}/verify","description":"<h1 id=\"check-verification\">Check Verification</h1>\n<p>Check a new verification.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>code</strong></td>\n        <td>string</td>\n        <td>Code submitted by the user.</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"response\">Response</h2>\n<p>The API will return the verification, along with some details indicating if it failed or passed.</p>\n<p>You can use the <code>verify_success</code> key to determine if the verification succeeded. </p>\n<p>If there is an error, it will be in the <code>verify_error</code> key, and explain why the verification failed.</p>\n<h4 id=\"success-response\">Success Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"verified\",\n        ...\n    },\n    \"verify_success\": true,\n    \"verify_error\": null\n}\n</code></pre>\n<h4 id=\"failure-response\">Failure Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"sent\",\n        ...\n    },\n    \"verify_success\": false,\n    \"verify_error\": \"Provided code does not match verify\"\n}\n</code></pre>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v3","verify","{{verify_id}}","verify"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"32238468-7b75-4fce-a70e-9ca637dc5c64","name":"Check Verification - Success","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"code\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify/{{verify_id}}/verify"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"verified\",\n        \"type\": \"sms\",\n        \"destination\": \"61412345678\",\n        \"source\": \"61491570159\",\n        \"metadata\": null,\n        \"template\": \"Your verification code is %code%\",\n        \"expires_at\": \"2023-02-11T07:57:08.000000Z\",\n        \"created_at\": \"2023-02-11T07:52:08.000000Z\"\n    },\n    \"verify_success\": true,\n    \"verify_error\": null\n}"},{"id":"b80e452e-4bea-4b51-b987-9f767f816131","name":"Check Verification - Failure","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"code\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify/{{verify_id}}/verify"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"sent\",\n        \"type\": \"sms\",\n        \"destination\": \"61412345678\",\n        \"source\": \"61491570159\",\n        \"metadata\": null,\n        \"template\": \"Your verification code is %code%\",\n        \"expires_at\": \"2023-02-11T07:57:08.000000Z\",\n        \"created_at\": \"2023-02-11T07:52:08.000000Z\"\n    },\n    \"verify_success\": false,\n    \"verify_error\": \"Provided code does not match verify\"\n}"}],"_postman_id":"a16828a1-61b6-480a-94b1-74cf46ce7338"},{"name":"Check Verification By Destination","id":"d2614982-9294-42a9-8ad7-70eeb8f3f707","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify/verify-by","description":"<h1 id=\"check-verification-by-destination\">Check Verification By Destination</h1>\n<p>Check a new verification by destination number.</p>\n<p>Note: It is recommended to check verifications by their ID, not by destination number. If you use this endpoint, ensure two users cannot use the same number at the same time, and that the user does not change the verification number throughout the process in your app.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>destination</strong></td>\n        <td>string</td>\n        <td>Mobile number being verified.</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    <tr>\n        <td><strong>code</strong></td>\n        <td>string</td>\n        <td>Code submitted by the user.</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>\n\n<h2 id=\"response\">Response</h2>\n<p>Please see the documentation for the \"Check Verification\" request. This endpoint returns the same response.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v3","verify","verify-by"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"d916b9c1-6036-42f6-9f2f-011412dcf4e2","name":"Check Verification - Success","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"destination\": \"61412345678\",\n    \"code\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify/verify-by"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"verified\",\n        \"type\": \"sms\",\n        \"destination\": \"61412345678\",\n        \"source\": \"61491570159\",\n        \"metadata\": null,\n        \"template\": \"Your verification code is %code%\",\n        \"expires_at\": \"2023-02-11T07:57:08.000000Z\",\n        \"created_at\": \"2023-02-11T07:52:08.000000Z\"\n    },\n    \"verify_success\": true,\n    \"verify_error\": null\n}"},{"id":"70c4c979-66fe-4e15-943e-32d746d22e76","name":"Check Verification - Failure","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"destination\": \"61412345678\",\n    \"code\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify/verify-by"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"verified\",\n        \"type\": \"sms\",\n        \"destination\": \"61412345678\",\n        \"source\": \"61491570159\",\n        \"metadata\": null,\n        \"template\": \"Your verification code is %code%\",\n        \"expires_at\": \"2023-02-11T07:57:08.000000Z\",\n        \"created_at\": \"2023-02-11T07:52:08.000000Z\"\n    },\n    \"verify_success\": false,\n    \"verify_error\": \"Provided code does not match verify\"\n}"}],"_postman_id":"d2614982-9294-42a9-8ad7-70eeb8f3f707"},{"name":"Cancel Verification","id":"ebebfa3f-0d13-421f-ba4a-3a7d9ea14769","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"url":"{{baseUrl}}/v3/verify/{{verify_id}}/cancel","description":"<h1 id=\"cancel-verification\">Cancel Verification</h1>\n<p>Cancel a verification. Once cancelled, it cannot be verified.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v3","verify","{{verify_id}}","cancel"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"fe7dd738-8b80-4e31-9ef2-bc12bca8a7a0","name":"Cancel Verification","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"url":"{{baseUrl}}/v3/verify/{{verify_id}}/cancel"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"cancelled\",\n        \"type\": \"sms\",\n        \"destination\": \"61412345678\",\n        \"source\": \"61491570159\",\n        \"metadata\": null,\n        \"template\": \"Your verification code is %code%\",\n        \"expires_at\": \"2023-02-11T07:57:08.000000Z\",\n        \"created_at\": \"2023-02-11T07:52:08.000000Z\"\n    }\n}"}],"_postman_id":"ebebfa3f-0d13-421f-ba4a-3a7d9ea14769"},{"name":"Cancel Verification By Destination","id":"e3056cb9-d39f-457d-8da1-c50cd3b7a8db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"url":"{{baseUrl}}/v3/verify/cancel-by","description":"<h1 id=\"cancel-verification-by-destination\">Cancel Verification By Destination</h1>\n<p>Cancel all verifications by destination</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n        <th>Default</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>destination</strong></td>\n        <td>string</td>\n        <td>Mobile number being verified.</td>\n        <td>Yes</td>\n        <td></td>\n    </tr>\n    </tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v3","verify","cancel-by"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"a4620afb-1d9a-449e-abf8-730977bbbf7e","name":"Cancel Verification By Destination","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"destination\": \"61412345678\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v3/verify/cancel-by"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"cb4d9527-1d3a-4def-85ba-f1fec9489c4f\",\n        \"status\": \"cancelled\",\n        \"type\": \"sms\",\n        \"destination\": \"61412345678\",\n        \"source\": \"61491570159\",\n        \"metadata\": null,\n        \"template\": \"Your verification code is %code%\",\n        \"expires_at\": \"2023-02-11T07:57:08.000000Z\",\n        \"created_at\": \"2023-02-11T07:52:08.000000Z\"\n    }\n}"}],"_postman_id":"e3056cb9-d39f-457d-8da1-c50cd3b7a8db"}],"id":"e07e2b76-36d4-45fd-8b68-b18bb755df32","description":"<h1 id=\"verification-otp-api\">Verification (OTP) API</h1>\n<p>Our SMS Verification API is a highly scalable, secure, and reliable solution for verifying user's mobile number during sign up and account creation processes.</p>\n<p>Save hundreds of hours of developer time by integrating our purpose build verification API.</p>\n<h2 id=\"verification-flow\">Verification Flow</h2>\n<p>To verify a user, first you must create a verify request. touchSMS will then send a code via SMS to the supplied destination, and returns an ID to you. Once the user receives the SMS, your application sends that code to us, and we verify the number.</p>\n<ol>\n<li>Create Verification <code>/api/v3/verify</code> - Verification is created, and returned. Persist the returned <code>id</code> (uuid) for the next step.</li>\n<li>touchSMS sends verification code. </li>\n<li>User inputs code into your application</li>\n<li>Check Validation<ol>\n<li><strong>Recommended</strong> Check Validation by ID <code>/api/v3/verify/{verify_id}/verify</code> - Submit the code and received the results of the validation</li>\n<li><em>Not Recommended</em> Check Validation by Destination <code>/api/v3/verify/verify-by</code> - Submit destination number and code, and receive the results of the validation</li>\n</ol>\n</li>\n</ol>\n<p>See the associated methods in the sidebar under \"Verify\"</p>\n","_postman_id":"e07e2b76-36d4-45fd-8b68-b18bb755df32","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Webhook Subscriptions","item":[{"name":"List Webhook Subscriptions","id":"95328ec0-20e4-4a9f-910a-297b2e319fbe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/webhook-subscriptions","description":"<h1 id=\"webhook-subscriptions\">Webhook Subscriptions</h1>\n<p>Webhook subscriptions can be managed through the API as well as through the web interface. See the\n\"Webhooks / Callbacks\" section for the payloads each event sends and for signature verification.</p>\n<h2 id=\"list-webhook-subscriptions\">List Webhook Subscriptions</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/webhook-subscriptions\n</code></pre><p>Returns the webhook subscriptions on your account, newest first. Paginated, 25 per page.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 123,\n      \"status\": \"Active\",\n      \"event\": \"message_received\",\n      \"name\": \"Inbound to CRM\",\n      \"url\": \"https://example.com/hooks/inbound\",\n      \"request_method\": \"POST\",\n      \"request_encoding_type\": \"json\",\n      \"headers\": [\n        {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n      ],\n      \"created_at\": \"2024-02-02T23:51:19Z\",\n      \"updated_at\": \"2024-03-11T02:14:07Z\"\n    }\n  ],\n  \"links\": {},\n  \"meta\": {}\n}\n</code></pre>\n<h3 id=\"subscription-status\">Subscription Status</h3>\n<ul>\n<li><code>Active</code> The subscription is enabled and receiving events.</li>\n<li><code>Disabled</code> The subscription has been disabled manually.</li>\n<li><code>Disabled Failing</code> The subscription was disabled automatically after repeated delivery failures.</li>\n</ul>\n<p>A subscription in <code>Disabled Failing</code> will not receive events until it is re-enabled. If your endpoint\nwas down, check for this state once it is back up.</p>\n<hr />\n<h2 id=\"create-webhook-subscription\">Create Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /v2/webhook-subscriptions\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Inbound to CRM\",\n  \"event\": \"message_received\",\n  \"url\": \"https://example.com/hooks/inbound\",\n  \"request_method\": \"POST\",\n  \"request_encoding_type\": \"json\",\n  \"headers\": [\n    {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n  ]\n}\n</code></pre>\n<p>Returns <code>201</code> with the created subscription.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>A name for the subscription. Shown in the web interface.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>event</strong></td>\n        <td>string</td>\n        <td>The event to subscribe to. One of <code>message_received</code>, <code>message_dlr</code>, <code>optout_created</code>, <code>message_received_3cx</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>url</strong></td>\n        <td>string</td>\n        <td>The URL to send the webhook to. Must be a valid URL, and cannot point at a `touchSMS` owned domain.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_method</strong></td>\n        <td>string</td>\n        <td><code>POST</code> or <code>GET</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_encoding_type</strong></td>\n        <td>string</td>\n        <td><code>json</code> or <code>form</code>. Required when <code>request_method</code> is <code>POST</code>.</td>\n        <td>Conditional</td>\n    </tr>\n    <tr>\n        <td><strong>headers</strong></td>\n        <td>array</td>\n        <td>Custom headers to send with the webhook. Must be present, send an empty array if you do not need any. Maximum 10.</td>\n        <td>Yes</td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"headers\">Headers</h3>\n<p><code>headers</code> is an array of objects, each with a <code>key</code> and a <code>value</code>, rather than a plain object:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"headers\": [\n  {\"key\": \"X-Api-Key\", \"value\": \"abc123\"},\n  {\"key\": \"X-Source\", \"value\": \"touchsms\"}\n]\n</code></pre>\n<p>The key must be a valid HTTP header name, between 3 and 50 characters. The value must be between 3\nand 200 characters. Up to 10 headers are allowed.</p>\n<p>Note that <code>headers</code> is required even when empty. Send <code>\"headers\": []</code> if you have none.</p>\n<hr />\n<h2 id=\"update-webhook-subscription\">Update Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /v2/webhook-subscriptions/{id}\n</code></pre><p>Takes the same body as create. All fields are required, so send the full object rather than only the\nfields you are changing.</p>\n<hr />\n<h2 id=\"delete-webhook-subscription\">Delete Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE /v2/webhook-subscriptions/{id}\n</code></pre><p>Returns <code>204 No Content</code>.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","webhook-subscriptions"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"95328ec0-20e4-4a9f-910a-297b2e319fbe"},{"name":"Create Webhook Subscription","id":"bb1d0690-76cf-4128-bc99-b21a75653d51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/webhook-subscriptions","description":"<h1 id=\"webhook-subscriptions\">Webhook Subscriptions</h1>\n<p>Webhook subscriptions can be managed through the API as well as through the web interface. See the\n\"Webhooks / Callbacks\" section for the payloads each event sends and for signature verification.</p>\n<h2 id=\"list-webhook-subscriptions\">List Webhook Subscriptions</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/webhook-subscriptions\n</code></pre><p>Returns the webhook subscriptions on your account, newest first. Paginated, 25 per page.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 123,\n      \"status\": \"Active\",\n      \"event\": \"message_received\",\n      \"name\": \"Inbound to CRM\",\n      \"url\": \"https://example.com/hooks/inbound\",\n      \"request_method\": \"POST\",\n      \"request_encoding_type\": \"json\",\n      \"headers\": [\n        {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n      ],\n      \"created_at\": \"2024-02-02T23:51:19Z\",\n      \"updated_at\": \"2024-03-11T02:14:07Z\"\n    }\n  ],\n  \"links\": {},\n  \"meta\": {}\n}\n</code></pre>\n<h3 id=\"subscription-status\">Subscription Status</h3>\n<ul>\n<li><code>Active</code> The subscription is enabled and receiving events.</li>\n<li><code>Disabled</code> The subscription has been disabled manually.</li>\n<li><code>Disabled Failing</code> The subscription was disabled automatically after repeated delivery failures.</li>\n</ul>\n<p>A subscription in <code>Disabled Failing</code> will not receive events until it is re-enabled. If your endpoint\nwas down, check for this state once it is back up.</p>\n<hr />\n<h2 id=\"create-webhook-subscription\">Create Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /v2/webhook-subscriptions\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Inbound to CRM\",\n  \"event\": \"message_received\",\n  \"url\": \"https://example.com/hooks/inbound\",\n  \"request_method\": \"POST\",\n  \"request_encoding_type\": \"json\",\n  \"headers\": [\n    {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n  ]\n}\n</code></pre>\n<p>Returns <code>201</code> with the created subscription.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>A name for the subscription. Shown in the web interface.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>event</strong></td>\n        <td>string</td>\n        <td>The event to subscribe to. One of <code>message_received</code>, <code>message_dlr</code>, <code>optout_created</code>, <code>message_received_3cx</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>url</strong></td>\n        <td>string</td>\n        <td>The URL to send the webhook to. Must be a valid URL, and cannot point at a `touchSMS` owned domain.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_method</strong></td>\n        <td>string</td>\n        <td><code>POST</code> or <code>GET</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_encoding_type</strong></td>\n        <td>string</td>\n        <td><code>json</code> or <code>form</code>. Required when <code>request_method</code> is <code>POST</code>.</td>\n        <td>Conditional</td>\n    </tr>\n    <tr>\n        <td><strong>headers</strong></td>\n        <td>array</td>\n        <td>Custom headers to send with the webhook. Must be present, send an empty array if you do not need any. Maximum 10.</td>\n        <td>Yes</td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"headers\">Headers</h3>\n<p><code>headers</code> is an array of objects, each with a <code>key</code> and a <code>value</code>, rather than a plain object:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"headers\": [\n  {\"key\": \"X-Api-Key\", \"value\": \"abc123\"},\n  {\"key\": \"X-Source\", \"value\": \"touchsms\"}\n]\n</code></pre>\n<p>The key must be a valid HTTP header name, between 3 and 50 characters. The value must be between 3\nand 200 characters. Up to 10 headers are allowed.</p>\n<p>Note that <code>headers</code> is required even when empty. Send <code>\"headers\": []</code> if you have none.</p>\n<hr />\n<h2 id=\"update-webhook-subscription\">Update Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /v2/webhook-subscriptions/{id}\n</code></pre><p>Takes the same body as create. All fields are required, so send the full object rather than only the\nfields you are changing.</p>\n<hr />\n<h2 id=\"delete-webhook-subscription\">Delete Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE /v2/webhook-subscriptions/{id}\n</code></pre><p>Returns <code>204 No Content</code>.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","webhook-subscriptions"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bb1d0690-76cf-4128-bc99-b21a75653d51"},{"name":"Update Webhook Subscription","id":"16370bb1-926f-441d-a723-613ebd73fba8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v2/webhook-subscriptions/{{webhook_subscription_id}}","description":"<h1 id=\"webhook-subscriptions\">Webhook Subscriptions</h1>\n<p>Webhook subscriptions can be managed through the API as well as through the web interface. See the\n\"Webhooks / Callbacks\" section for the payloads each event sends and for signature verification.</p>\n<h2 id=\"list-webhook-subscriptions\">List Webhook Subscriptions</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/webhook-subscriptions\n</code></pre><p>Returns the webhook subscriptions on your account, newest first. Paginated, 25 per page.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 123,\n      \"status\": \"Active\",\n      \"event\": \"message_received\",\n      \"name\": \"Inbound to CRM\",\n      \"url\": \"https://example.com/hooks/inbound\",\n      \"request_method\": \"POST\",\n      \"request_encoding_type\": \"json\",\n      \"headers\": [\n        {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n      ],\n      \"created_at\": \"2024-02-02T23:51:19Z\",\n      \"updated_at\": \"2024-03-11T02:14:07Z\"\n    }\n  ],\n  \"links\": {},\n  \"meta\": {}\n}\n</code></pre>\n<h3 id=\"subscription-status\">Subscription Status</h3>\n<ul>\n<li><code>Active</code> The subscription is enabled and receiving events.</li>\n<li><code>Disabled</code> The subscription has been disabled manually.</li>\n<li><code>Disabled Failing</code> The subscription was disabled automatically after repeated delivery failures.</li>\n</ul>\n<p>A subscription in <code>Disabled Failing</code> will not receive events until it is re-enabled. If your endpoint\nwas down, check for this state once it is back up.</p>\n<hr />\n<h2 id=\"create-webhook-subscription\">Create Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /v2/webhook-subscriptions\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Inbound to CRM\",\n  \"event\": \"message_received\",\n  \"url\": \"https://example.com/hooks/inbound\",\n  \"request_method\": \"POST\",\n  \"request_encoding_type\": \"json\",\n  \"headers\": [\n    {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n  ]\n}\n</code></pre>\n<p>Returns <code>201</code> with the created subscription.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>A name for the subscription. Shown in the web interface.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>event</strong></td>\n        <td>string</td>\n        <td>The event to subscribe to. One of <code>message_received</code>, <code>message_dlr</code>, <code>optout_created</code>, <code>message_received_3cx</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>url</strong></td>\n        <td>string</td>\n        <td>The URL to send the webhook to. Must be a valid URL, and cannot point at a `touchSMS` owned domain.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_method</strong></td>\n        <td>string</td>\n        <td><code>POST</code> or <code>GET</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_encoding_type</strong></td>\n        <td>string</td>\n        <td><code>json</code> or <code>form</code>. Required when <code>request_method</code> is <code>POST</code>.</td>\n        <td>Conditional</td>\n    </tr>\n    <tr>\n        <td><strong>headers</strong></td>\n        <td>array</td>\n        <td>Custom headers to send with the webhook. Must be present, send an empty array if you do not need any. Maximum 10.</td>\n        <td>Yes</td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"headers\">Headers</h3>\n<p><code>headers</code> is an array of objects, each with a <code>key</code> and a <code>value</code>, rather than a plain object:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"headers\": [\n  {\"key\": \"X-Api-Key\", \"value\": \"abc123\"},\n  {\"key\": \"X-Source\", \"value\": \"touchsms\"}\n]\n</code></pre>\n<p>The key must be a valid HTTP header name, between 3 and 50 characters. The value must be between 3\nand 200 characters. Up to 10 headers are allowed.</p>\n<p>Note that <code>headers</code> is required even when empty. Send <code>\"headers\": []</code> if you have none.</p>\n<hr />\n<h2 id=\"update-webhook-subscription\">Update Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /v2/webhook-subscriptions/{id}\n</code></pre><p>Takes the same body as create. All fields are required, so send the full object rather than only the\nfields you are changing.</p>\n<hr />\n<h2 id=\"delete-webhook-subscription\">Delete Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE /v2/webhook-subscriptions/{id}\n</code></pre><p>Returns <code>204 No Content</code>.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","webhook-subscriptions","{{webhook_subscription_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"16370bb1-926f-441d-a723-613ebd73fba8"},{"name":"Delete Webhook Subscription","id":"f83ca42f-db2d-4f3f-817d-9017c9a62451","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/v2/webhook-subscriptions/{{webhook_subscription_id}}","description":"<h1 id=\"webhook-subscriptions\">Webhook Subscriptions</h1>\n<p>Webhook subscriptions can be managed through the API as well as through the web interface. See the\n\"Webhooks / Callbacks\" section for the payloads each event sends and for signature verification.</p>\n<h2 id=\"list-webhook-subscriptions\">List Webhook Subscriptions</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/webhook-subscriptions\n</code></pre><p>Returns the webhook subscriptions on your account, newest first. Paginated, 25 per page.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 123,\n      \"status\": \"Active\",\n      \"event\": \"message_received\",\n      \"name\": \"Inbound to CRM\",\n      \"url\": \"https://example.com/hooks/inbound\",\n      \"request_method\": \"POST\",\n      \"request_encoding_type\": \"json\",\n      \"headers\": [\n        {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n      ],\n      \"created_at\": \"2024-02-02T23:51:19Z\",\n      \"updated_at\": \"2024-03-11T02:14:07Z\"\n    }\n  ],\n  \"links\": {},\n  \"meta\": {}\n}\n</code></pre>\n<h3 id=\"subscription-status\">Subscription Status</h3>\n<ul>\n<li><code>Active</code> The subscription is enabled and receiving events.</li>\n<li><code>Disabled</code> The subscription has been disabled manually.</li>\n<li><code>Disabled Failing</code> The subscription was disabled automatically after repeated delivery failures.</li>\n</ul>\n<p>A subscription in <code>Disabled Failing</code> will not receive events until it is re-enabled. If your endpoint\nwas down, check for this state once it is back up.</p>\n<hr />\n<h2 id=\"create-webhook-subscription\">Create Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /v2/webhook-subscriptions\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Inbound to CRM\",\n  \"event\": \"message_received\",\n  \"url\": \"https://example.com/hooks/inbound\",\n  \"request_method\": \"POST\",\n  \"request_encoding_type\": \"json\",\n  \"headers\": [\n    {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n  ]\n}\n</code></pre>\n<p>Returns <code>201</code> with the created subscription.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>A name for the subscription. Shown in the web interface.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>event</strong></td>\n        <td>string</td>\n        <td>The event to subscribe to. One of <code>message_received</code>, <code>message_dlr</code>, <code>optout_created</code>, <code>message_received_3cx</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>url</strong></td>\n        <td>string</td>\n        <td>The URL to send the webhook to. Must be a valid URL, and cannot point at a `touchSMS` owned domain.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_method</strong></td>\n        <td>string</td>\n        <td><code>POST</code> or <code>GET</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_encoding_type</strong></td>\n        <td>string</td>\n        <td><code>json</code> or <code>form</code>. Required when <code>request_method</code> is <code>POST</code>.</td>\n        <td>Conditional</td>\n    </tr>\n    <tr>\n        <td><strong>headers</strong></td>\n        <td>array</td>\n        <td>Custom headers to send with the webhook. Must be present, send an empty array if you do not need any. Maximum 10.</td>\n        <td>Yes</td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"headers\">Headers</h3>\n<p><code>headers</code> is an array of objects, each with a <code>key</code> and a <code>value</code>, rather than a plain object:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"headers\": [\n  {\"key\": \"X-Api-Key\", \"value\": \"abc123\"},\n  {\"key\": \"X-Source\", \"value\": \"touchsms\"}\n]\n</code></pre>\n<p>The key must be a valid HTTP header name, between 3 and 50 characters. The value must be between 3\nand 200 characters. Up to 10 headers are allowed.</p>\n<p>Note that <code>headers</code> is required even when empty. Send <code>\"headers\": []</code> if you have none.</p>\n<hr />\n<h2 id=\"update-webhook-subscription\">Update Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /v2/webhook-subscriptions/{id}\n</code></pre><p>Takes the same body as create. All fields are required, so send the full object rather than only the\nfields you are changing.</p>\n<hr />\n<h2 id=\"delete-webhook-subscription\">Delete Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE /v2/webhook-subscriptions/{id}\n</code></pre><p>Returns <code>204 No Content</code>.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}},"urlObject":{"path":["v2","webhook-subscriptions","{{webhook_subscription_id}}"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f83ca42f-db2d-4f3f-817d-9017c9a62451"}],"id":"36804aea-3a65-42ba-abc4-b2edcd1c6e69","description":"<h1 id=\"webhook-subscriptions\">Webhook Subscriptions</h1>\n<p>Webhook subscriptions can be managed through the API as well as through the web interface. See the\n\"Webhooks / Callbacks\" section for the payloads each event sends and for signature verification.</p>\n<h2 id=\"list-webhook-subscriptions\">List Webhook Subscriptions</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/webhook-subscriptions\n</code></pre><p>Returns the webhook subscriptions on your account, newest first. Paginated, 25 per page.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 123,\n      \"status\": \"Active\",\n      \"event\": \"message_received\",\n      \"name\": \"Inbound to CRM\",\n      \"url\": \"https://example.com/hooks/inbound\",\n      \"request_method\": \"POST\",\n      \"request_encoding_type\": \"json\",\n      \"headers\": [\n        {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n      ],\n      \"created_at\": \"2024-02-02T23:51:19Z\",\n      \"updated_at\": \"2024-03-11T02:14:07Z\"\n    }\n  ],\n  \"links\": {},\n  \"meta\": {}\n}\n</code></pre>\n<h3 id=\"subscription-status\">Subscription Status</h3>\n<ul>\n<li><code>Active</code> The subscription is enabled and receiving events.</li>\n<li><code>Disabled</code> The subscription has been disabled manually.</li>\n<li><code>Disabled Failing</code> The subscription was disabled automatically after repeated delivery failures.</li>\n</ul>\n<p>A subscription in <code>Disabled Failing</code> will not receive events until it is re-enabled. If your endpoint\nwas down, check for this state once it is back up.</p>\n<hr />\n<h2 id=\"create-webhook-subscription\">Create Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /v2/webhook-subscriptions\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Inbound to CRM\",\n  \"event\": \"message_received\",\n  \"url\": \"https://example.com/hooks/inbound\",\n  \"request_method\": \"POST\",\n  \"request_encoding_type\": \"json\",\n  \"headers\": [\n    {\"key\": \"X-Api-Key\", \"value\": \"abc123\"}\n  ]\n}\n</code></pre>\n<p>Returns <code>201</code> with the created subscription.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<table>\n    <thead>\n    <tr>\n        <th>Key</th>\n        <th>Type</th>\n        <th>Description</th>\n        <th>Required</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td><strong>name</strong></td>\n        <td>string</td>\n        <td>A name for the subscription. Shown in the web interface.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>event</strong></td>\n        <td>string</td>\n        <td>The event to subscribe to. One of <code>message_received</code>, <code>message_dlr</code>, <code>optout_created</code>, <code>message_received_3cx</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>url</strong></td>\n        <td>string</td>\n        <td>The URL to send the webhook to. Must be a valid URL, and cannot point at a `touchSMS` owned domain.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_method</strong></td>\n        <td>string</td>\n        <td><code>POST</code> or <code>GET</code>.</td>\n        <td>Yes</td>\n    </tr>\n    <tr>\n        <td><strong>request_encoding_type</strong></td>\n        <td>string</td>\n        <td><code>json</code> or <code>form</code>. Required when <code>request_method</code> is <code>POST</code>.</td>\n        <td>Conditional</td>\n    </tr>\n    <tr>\n        <td><strong>headers</strong></td>\n        <td>array</td>\n        <td>Custom headers to send with the webhook. Must be present, send an empty array if you do not need any. Maximum 10.</td>\n        <td>Yes</td>\n    </tr>\n    </tbody>\n</table>\n\n<h3 id=\"headers\">Headers</h3>\n<p><code>headers</code> is an array of objects, each with a <code>key</code> and a <code>value</code>, rather than a plain object:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"headers\": [\n  {\"key\": \"X-Api-Key\", \"value\": \"abc123\"},\n  {\"key\": \"X-Source\", \"value\": \"touchsms\"}\n]\n</code></pre>\n<p>The key must be a valid HTTP header name, between 3 and 50 characters. The value must be between 3\nand 200 characters. Up to 10 headers are allowed.</p>\n<p>Note that <code>headers</code> is required even when empty. Send <code>\"headers\": []</code> if you have none.</p>\n<hr />\n<h2 id=\"update-webhook-subscription\">Update Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /v2/webhook-subscriptions/{id}\n</code></pre><p>Takes the same body as create. All fields are required, so send the full object rather than only the\nfields you are changing.</p>\n<hr />\n<h2 id=\"delete-webhook-subscription\">Delete Webhook Subscription</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE /v2/webhook-subscriptions/{id}\n</code></pre><p>Returns <code>204 No Content</code>.</p>\n","_postman_id":"36804aea-3a65-42ba-abc4-b2edcd1c6e69","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}},{"name":"Webhooks / Callbacks","item":[],"id":"f3c27d0c-a1e4-4281-afaf-308693388da2","description":"<h1 id=\"using-webhooks\">Using Webhooks</h1>\n<p>Webhooks are used to alert your application when events occur, such a receiving an inbound message or a delivery status change. In the <code>touchSMS</code> settings, you\ncan configure as many webhook subscriptions as required.</p>\n<h2 id=\"creating-and-editing-webhook-subscriptions\">Creating and editing Webhook Subscriptions</h2>\n<p>Open the webhook settings from the sidebar, by opening the settings submenu and clicking \"Webhooks\", or go to <a href=\"https://app.touchsms.com.au/settings/webhooks\">https://app.touchsms.com.au/settings/webhooks</a>.</p>\n<p>Click \"Create webhook subscription\" to create a new subscription, or edit an existing subscription.</p>\n<p>You can add custom headers, select the request method (<code>GET</code> or <code>POST</code>) and the encoding type (<code>json</code> or <code>form</code>).</p>\n<h2 id=\"available-events\">Available Events</h2>\n<h3 id=\"message_received\"><code>message_received</code></h3>\n<p>A webhook will be sent when an inbound message is received for your account (to a virtual number, or to a shared number).</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"event\": \"message_received\", // Always message_received\n  \"date\": \"2022-01-13T04:23:57Z\", // Date message was received\n  \"id\": 123456, // Inbound message ID\n  \"to\": \"SHARED_NUMBER\", // Number that received the message, either a dedicated number or \"SHARED_NUMBER\" for share numbers\n  \"from\": \"61412345678\", // Number the message was received fro\n  \"content\": \"Hello Reply\", // Message body\n  \"media\": [ // Any media files, if the message was an MMS\n    {\"key\": \"01gw171s65ecm8mhpx2086f7pg\", \"url\": \"https://mms.touchsms.com.au/m/01gw171s65ecm8mhpx2086f7pg.jpeg\"}\n  ],\n  \"is_opt_out\": false, // If the message resulted in an opt out\n  \"in_reply_to_message\": { // Contains details of the message that the inbound is responding to. null if no outbound matched\n    \"id\": 654321, // Outbound message ID\n    \"content\": \"Hello World\", // Outbound message body\n    \"metadata\": {\n      \"your_system_id\": \"c5969b2c-d33a-402d-9d7e-f82c98f85be7\"\n    }, // Outbound message metadata, supplied via API \n    \"reference\": null, // Outbound message reference, supplied via API \n    \"campaign_id\": 123456 // Outbound message campaign ID (used for reporting)\n  }\n}\n</code></pre>\n<h4 id=\"inbound-mms-media\">Inbound MMS Media</h4>\n<p>When an inbound message is an MMS, the <code>media</code> array contains one entry per media file. For a plain\nSMS the array is present but empty (<code>[]</code>).</p>\n<p>Each entry has two fields:</p>\n<ul>\n<li><code>key</code>: the media file's unique identifier. Stable for the life of the file.</li>\n<li><code>url</code>: a direct, fully qualified URL to the media file itself.</li>\n</ul>\n<p>The webhook does <strong>not</strong> embed the media file contents. Download the file from the <code>url</code>.</p>\n<h5 id=\"downloading-media\">Downloading media</h5>\n<p><code>url</code> is a direct link to the file and requires <strong>no authentication</strong>. No API key, no session, and no\nuser login. A server can fetch it unattended with a plain <code>GET</code>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -O \"https://mms.touchsms.com.au/m/01gw171s65ecm8mhpx2086f7pg.jpeg\"\n</code></pre><p>Because these URLs are unauthenticated, treat them as secrets: anyone who obtains a URL can retrieve\nthe file. Avoid forwarding them to untrusted recipients, and prefer attaching the downloaded file to\nany onward email rather than passing the link through.</p>\n<p>The file extension reflects the media type as received from the carrier (commonly <code>.jpeg</code>, <code>.png</code>,\nor <code>.gif</code>). Do not assume a particular type. Read the <code>Content-Type</code> response header when\nprocessing the download.</p>\n<h5 id=\"multiple-media-files\">Multiple media files</h5>\n<p>An MMS may contain several media files. The <code>media</code> array is ordered as received from the carrier and\nis not limited to a single entry, so always iterate it rather than reading <code>media[0]</code>.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"event\": \"message_received\",\n  \"date\": \"2022-01-13T04:23:57Z\",\n  \"id\": 123456,\n  \"to\": \"SHARED_NUMBER\",\n  \"from\": \"61412345678\",\n  \"content\": \"Here are the photos\", // Any text sent alongside the media. Empty string if the MMS had no text\n  \"media\": [\n    {\"key\": \"01gw171s65ecm8mhpx2086f7pg\", \"url\": \"https://mms.touchsms.com.au/m/01gw171s65ecm8mhpx2086f7pg.jpeg\"},\n    {\"key\": \"01gw171s65ecm8mhpx2086f7ph\", \"url\": \"https://mms.touchsms.com.au/m/01gw171s65ecm8mhpx2086f7ph.jpeg\"},\n    {\"key\": \"01gw171s65ecm8mhpx2086f7pj\", \"url\": \"https://mms.touchsms.com.au/m/01gw171s65ecm8mhpx2086f7pj.png\"}\n  ],\n  \"is_opt_out\": false,\n  \"in_reply_to_message\": null\n}\n</code></pre>\n<h5 id=\"retention\">Retention</h5>\n<p><strong>Download media as soon as you receive the webhook, and store your own copy.</strong> Media files are\nretained according to the storage retention policy for your account, and the <code>url</code> is not guaranteed\nto remain resolvable indefinitely. Treat the URL as a means of collecting the file once, not as\nlong-term storage you can fetch from on demand.</p>\n<p>If a download fails, retry it promptly rather than deferring. Your webhook endpoint should not\nreturn a success response until the media is safely stored.</p>\n<h3 id=\"message_dlr\"><code>message_dlr</code></h3>\n<p>A webhook will be sent each time the delivery status for any messages you send changes. </p>\n<h4 id=\"structure\">Structure</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"event\": \"message_dlr\", // Always message_dlr\n  \"date\": \"2022-06-06T10:35:45Z\", // Date status changed\n  \"id\": 123456, // Outbound message ID\n  \"to\": \"61411802860\", // Destination number of the message\n  \"from\": \"61419046139\", // Number the message was sent from, \"SHARED_NUMBER\" for share numbers\n  \"content\": \"Test\", // Outbound message body\n  \"metadata\": {\n    \"your_system_id\": \"c5969b2c-d33a-402d-9d7e-f82c98f85be7\"\n  },\n  \"reference\": null, // Outbound message reference, supplied via API \n  \"campaign_id\": 618, // Outbound message campaign ID (used for reporting)\n  \"status\": \"delivered\" // New message status (see below)\n}\n</code></pre>\n<h4 id=\"message-delivery-statuses\">Message Delivery Statuses</h4>\n<p>Any status beginning with <code>failed</code> should be considered a delivery failure. </p>\n<ul>\n<li><code>delivered</code> Message was delivered to the user (in some cases, to the user's carrier)</li>\n<li><code>failed</code> Generic failed status</li>\n<li><code>failed_rejected</code> Carrier rejected the message</li>\n<li><code>failed_expired</code> Message could not be delivered to the user before it expired</li>\n<li><code>failed_insufficient_balance</code> Account balance too low to send message.  (not billed)</li>\n<li><code>cancelled</code> Message sent to testing numbers.  (not billed)</li>\n<li><code>filtered</code> Message blocked by spam filters (including upstream).</li>\n<li><code>filtered_duplicate</code> Message filtered as it was detected as duplicate (not billed)</li>\n</ul>\n<h2 id=\"optout_created\"><code>optout_created</code></h2>\n<p>A webhook will be sent each time an opt-out is created on your account (either via the UI, API, opt out link or opt out sms reply). Note that imported opt-outs do not trigger webhooks.</p>\n<h4 id=\"structure-1\">Structure</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"event\": \"optout_created\", // Always optout_created\n  \"id\": 123456, // Optout ID\n  \"number\": \"61419046139\", // Number that was opted out\n  \"method\": \"SMS\", // How the opt-out was created (SMS, API, MANUAL, etc.)\n  \"country\": {\n    \"id\": 1, // Country Id\n    \"iso\": \"AU\", // ISO 2 Letter Country Code\n    \"name\": \"Australia\" // Country Name\n  },\n  \"opt_out_list\": {\n    \"id\": 1, // Opt-out list ID\n    \"name\": \"Default Opt-Out List\", // Opt-out list name\n    \"is_default\": true // Whether this is the default opt-out list\n  },\n  \"created\": \"2022-06-06T10:35:45Z\" // Date opt out was created\n}\n</code></pre>\n<h4 id=\"opt-out-methods\">Opt-out Methods</h4>\n<p>The <code>method</code> field indicates how the opt-out was created:</p>\n<ul>\n<li><code>SMS</code> - Opt-out created via SMS reply (e.g., replying \"STOP\")</li>\n<li><code>API</code> - Opt-out created via API endpoint</li>\n<li><code>MANUAL</code> - Opt-out created manually through the web interface</li>\n<li><code>IMPORT</code> - Opt-out created via import (note: imports do not trigger webhooks)</li>\n<li><code>LINK</code> - Opt-out created via opt-out link</li>\n</ul>\n<h2 id=\"retries\">Retries</h2>\n<p>Webhooks will be retired up to <code>15</code> times, with exponentially increasing delays capped at 12 hours.\n<code>touchSMS</code> will continue to retry until your service responds with a 2xx code.</p>\n<h2 id=\"signature-verification\">Signature Verification</h2>\n<p>Webhooks sent for your account will be signed with the webhook secret, which is available in your API Settings.</p>\n<p>The algorithm used is <code>HMAC-SHA256(raw_json_request_body)</code></p>\n<p>For example, to verify the webhook authenticity in <code>PHP</code>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>hash_hmac('sha256', $payloadJson, 'my-webhook-secret');\n</code></pre><h2 id=\"legacy-http-callbacks\">Legacy HTTP Callbacks</h2>\n<p>Documentation provided below for historical purposes. New implementations should use \"Webhook Subscriptions\"</p>\n<h3 id=\"delivery-dlr-callback\">Delivery (DLR) Callback</h3>\n<p>Delivery Receipts or <code>DLRs</code>, are notifications received from the carrier relating to the success and statuses of an attempted SMS Delivery.</p>\n<p>They are delivered as a <code>POST</code> request, with the following body params:</p>\n<table>\n<tbody>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n<tr>\n<td>reference</td>\n<td>Your reference code provided when submitting the message over the RESTful API.</td>\n</tr>\n<tr>\n<td>description</td>\n<td>The delivery status of your message, this can be one of two options<p></p>\n<p><code>DELIVERED</code></p>\n<p><code>FAILED</code></p></td>\n</tr>\n<tr>\n<td>time</td>\n<td>The time that the receipt was generated, will be in the format of;<p></p>\n<p>YYYY-MM-DD HH:MM:SS</p></td>\n</tr>\n<tr>\n<td>timezone</td>\n<td>The timezone of the of the timestamp provided, the timezone is always set to your account timezone for ease of use.</td>\n</tr>\n</tbody>\n</table>\n\n<hr />\n<h3 id=\"incoming-sms-callback\">Incoming SMS Callback</h3>\n<p>Incoming SMS are similar to DLRs, except that they contain an incoming message instead of a message status.</p>\n<p>They are delivered as a <code>POST</code> request, with the following body params:</p>\n<table>\n<tbody>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n<tr>\n<td>reference</td>\n<td>Your reference code provided when submitting the message over the RESTful API.</td>\n</tr>\n<tr>\n<td>message</td>\n<td>The message that was sent as a reply</td>\n</tr>\n<tr>\n<td>number</td>\n<td>The mobile number that sent the reply (International format)</td>\n</tr>\n<tr>\n<td>time</td>\n<td>The time that the receipt was generated, will be in the format of;<p></p>\n<p>YYYY-MM-DD HH:MM:SS</p></td>\n</tr>\n<tr>\n<td>timezone</td>\n<td>The timezone of the of the timestamp provided, the timezone is always set to your account timezone for ease.</td>\n</tr>\n</tbody>\n</table>\n","_postman_id":"f3c27d0c-a1e4-4281-afaf-308693388da2","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","id":"b4a7aebb-82c0-4c3a-98a2-e7faad56978e","name":"touchSMS V2 Documentation","type":"collection"}}}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{token}}"}]}},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"9324bb52-9089-484d-9171-27e2062ca221"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"d9aab58a-d2cf-4c22-af9f-636eaa6b439c"}}]}