{"info":{"_postman_id":"dec4cadb-bff2-4336-a760-eb25bf4b74cc","name":"myCRMSIM API Documentation","description":"<html><head></head><body><h1 id=\"mycrmsim-api-documentation\"><strong>myCRMSIM API Documentation</strong></h1>\n<p><strong>The myCRMSIM API enables third-party applications (such as Make.com custom apps) to integrate with the myCRMSIM SMS gateway platform. The API supports OAuth 2.0 authentication, inbound SMS webhooks, and outbound SMS dispatch.</strong></p>\n<h2 id=\"base-urls\"><strong>Base URLs</strong></h2>\n<ul>\n<li><p><strong>Main API:</strong> <strong><code>https://backend.mysmsgateway.app</code></strong></p>\n</li>\n<li><p><strong>SMS Dispatch:</strong> <strong><code>https://api.mysmsgateway.app</code></strong></p>\n</li>\n</ul>\n<h2 id=\"authentication\"><strong>Authentication</strong></h2>\n<p><strong>The API uses OAuth 2.0 Authorization Code Grant flow. All API endpoints require a Bearer access token in the</strong> <strong><code>Authorization</code></strong> <strong>header.</strong></p>\n<h2 id=\"rate-limits\"><strong>Rate Limits</strong></h2>\n<p><strong>Standard rate limits apply per OAuth client. Contact support for higher limits.</strong></p>\n<h2 id=\"support\"><strong>Support</strong></h2>\n<p><strong>For integration questions or technical issues, contact:</strong> <a href=\"https://mailto:support@mycrmsim.com\"><b>support@mycrmsim.com</b></a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"myCRMSIM API Documentation","slug":"mycrmsim-api-documentation"}],"owner":"50634098","collectionId":"dec4cadb-bff2-4336-a760-eb25bf4b74cc","publishedId":"2sBXwjvZ7m","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-05-21T15:48:22.000Z"},"item":[{"name":"OAuth - Authorize User","id":"d195fc88-00f8-45c7-8dfa-3874a37dd23f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"oauth--authorize-user\">OAuth — Authorize User</h2>\n<p>Initiates the OAuth 2.0 authorization flow. This URL should be opened in the user's <strong>browser</strong> (not called from an API client) so they can sign in and grant consent.</p>\n<h3 id=\"flow\">Flow</h3>\n<ol>\n<li><p>Redirect user's browser to this URL with <code>client_id</code>, <code>redirect_uri</code>, <code>response_type=code</code>, and optional <code>state</code>.</p>\n</li>\n<li><p>User signs in to myCRMSIM (if not already signed in).</p>\n</li>\n<li><p>User clicks \"Allow\" on the consent page.</p>\n</li>\n<li><p>myCRMSIM redirects the browser to <code>redirect_uri</code> with <code>?code=AUTH_CODE&amp;state=...</code>.</p>\n</li>\n<li><p>The application then exchanges the code for an access token using the <code>/oauth/token</code> endpoint.</p>\n</li>\n</ol>\n<h3 id=\"query-parameters\">Query Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>client_id</code></td>\n<td>Yes</td>\n<td>Your OAuth client ID</td>\n</tr>\n<tr>\n<td><code>redirect_uri</code></td>\n<td>Yes</td>\n<td>Must match the registered redirect URI for your client</td>\n</tr>\n<tr>\n<td><code>response_type</code></td>\n<td>Yes</td>\n<td>Must be <code>code</code></td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>Recommended</td>\n<td>Random string for CSRF protection (echoed back in redirect)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"success-response\">Success Response</h3>\n<p>Redirects the browser to: <code>{redirect_uri}?code=AUTHORIZATION_CODE&amp;state=YOUR_STATE</code></p>\n<h3 id=\"error-response\">Error Response</h3>\n<p>Redirects to: <code>{redirect_uri}?error=ERROR_CODE&amp;error_description=...</code></p>\n<h3 id=\"note\">Note</h3>\n<p>This endpoint returns an HTML page for browser users. It cannot be called as a JSON API — it must be opened in a browser to trigger the OAuth consent flow.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"d195fc88-00f8-45c7-8dfa-3874a37dd23f"},{"name":"2. OAuth - Exchange Code for Token","id":"f231d9cb-6535-4327-b502-e22b8c0c668c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"oauth--exchange-code-for-token\">OAuth — Exchange Code for Token</h2>\n<p>Exchanges the authorization code (received via redirect after <code>/oauth/authorize</code>) for an access token + refresh token.</p>\n<h3 id=\"request-headers\">Request Headers</h3>\n<ul>\n<li><p><code>Authorization: Basic</code> — HTTP Basic auth with your OAuth credentials</p>\n</li>\n<li><p><code>Content-Type: application/json</code></p>\n</li>\n</ul>\n<h3 id=\"request-body\">Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"grant_type\": \"authorization_code\",\n    \"code\": \"AUTH_CODE\",\n    \"redirect_uri\": \"https://www.make.com/oauth/cb/app\"\n}\n\n</code></pre>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"access_token\": \"eyJhbGciOi...\",\n    \"refresh_token\": \"def502004a8b...\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 3600\n}\n\n</code></pre>\n<h3 id=\"error-response\">Error Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"error\": \"invalid_grant\",\n    \"error_description\": \"The authorization code is invalid or expired.\"\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"f231d9cb-6535-4327-b502-e22b8c0c668c"},{"name":"3. OAuth - Refresh Token","id":"a3e61e1f-73fd-432b-8221-6c88e6973b58","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"oauth--refresh-access-token\">OAuth — Refresh Access Token</h2>\n<p>Uses a refresh token to obtain a new access token when the old one expires.</p>\n<h3 id=\"request-headers\">Request Headers</h3>\n<ul>\n<li><p><code>Authorization: Basic</code></p>\n</li>\n<li><p><code>Content-Type: application/json</code></p>\n</li>\n</ul>\n<h3 id=\"request-body\">Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"grant_type\": \"refresh_token\",\n    \"refresh_token\": \"EXISTING_REFRESH_TOKEN\"\n}\n\n</code></pre>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"access_token\": \"eyJhbGciOi... (new)\",\n    \"refresh_token\": \"def502004a8b... (may rotate)\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 3600\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"a3e61e1f-73fd-432b-8221-6c88e6973b58"},{"name":"4. OAuth - Revoke Token","id":"fb2ee549-f76a-43c5-afb0-8f45c140be71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"oauth--revoke-token\">OAuth — Revoke Token</h2>\n<p>Invalidates an access token, preventing further use.</p>\n<h3 id=\"request-headers\">Request Headers</h3>\n<ul>\n<li><p><code>Authorization: Bearer ACCESS_TOKEN</code></p>\n</li>\n<li><p><code>Content-Type: application/json</code></p>\n</li>\n</ul>\n<h3 id=\"request-body\">Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\": \"ACCESS_TOKEN_TO_REVOKE\"\n}\n\n</code></pre>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<p>Empty response body, HTTP 200 OK.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"fb2ee549-f76a-43c5-afb0-8f45c140be71"},{"name":"Get User Locations","id":"805aeee5-e987-49a2-b3aa-87270a6bfcad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"get-user-info--locations\">Get User Info &amp; Locations</h2>\n<p>Returns information about the authenticated user and their accessible locations. Used by Make.com to verify the OAuth connection and populate location dropdowns.</p>\n<h3 id=\"request-headers\">Request Headers</h3>\n<ul>\n<li><code>Authorization: Bearer ACCESS_TOKEN</code></li>\n</ul>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"user\": {\n            \"id\": \"user_abc123\",\n            \"email\": \"user@example.com\",\n            \"name\": \"Jane Doe\"\n        }\n    }\n}\n\n</code></pre>\n<p>Note: The same endpoint also returns a list of locations the user has access to, used to populate location selection dropdowns in integrations.</p>\n<h3 id=\"error-response-401\">Error Response (401)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"error\": \"unauthorized\",\n    \"message\": \"Invalid or expired access token\"\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"805aeee5-e987-49a2-b3aa-87270a6bfcad"},{"name":"Subscribe Webhook","id":"59479a43-37a0-43c3-b906-6fc7e6fa7986","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"subscribe-to-inbound-message-webhook\">Subscribe to Inbound Message Webhook</h2>\n<p>Registers a webhook URL to receive notifications when a new inbound SMS message arrives for the specified location.</p>\n<h3 id=\"request-headers\">Request Headers</h3>\n<ul>\n<li><p><code>Authorization: Bearer ACCESS_TOKEN</code></p>\n</li>\n<li><p><code>Content-Type: application/json</code></p>\n</li>\n</ul>\n<h3 id=\"request-body\">Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"targetUrl\": \"https://hook.eu1.make.com/your-webhook-url\",\n    \"event\": \"new_message\",\n    \"locationId\": \"loc_abc123\"\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>targetUrl</code></td>\n<td>The webhook URL that will receive POST notifications</td>\n</tr>\n<tr>\n<td><code>event</code></td>\n<td>Event type to subscribe to (currently <code>new_message</code>)</td>\n</tr>\n<tr>\n<td><code>locationId</code></td>\n<td>The location to monitor for inbound messages</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"success-response-200\">Success Response (200)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"webhook_id\": \"wh_xyz789\"\n}\n\n</code></pre>\n<p>Store <code>webhook_id</code> — needed to unsubscribe later.</p>\n<h3 id=\"webhook-payload-sent-to-targeturl\">Webhook Payload (sent to targetUrl)</h3>\n<p>When a new inbound SMS arrives, myCRMSIM POSTs this payload to <code>targetUrl</code>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"msg_abc123\",\n    \"phone_number\": \"+923001234567\",\n    \"locationId\": \"loc_abc123\",\n    \"message\": \"Reply message text\",\n    \"created_at\": \"2026-05-21T10:00:00.000Z\"\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"59479a43-37a0-43c3-b906-6fc7e6fa7986"},{"name":"Unsubscribe Webhook","id":"655e3171-60d8-440c-ab74-d72452e23c8b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"unsubscribe-webhook\">Unsubscribe Webhook</h2>\n<p>Removes a previously registered webhook subscription, stopping inbound message notifications.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"targetUrl\": \"https://hook.eu1.make.com/your-webhook-url\",\n    \"webhookId\": \"wh_xyz789\",\n    \"locationId\": \"loc_abc123\"\n}\n\n</code></pre>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"655e3171-60d8-440c-ab74-d72452e23c8b"},{"name":"Send a Message","id":"ddde9795-986f-4dd6-a9c6-38ea34151303","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"send-sms--mms\">Send SMS / MMS</h2>\n<p>Sends an outbound SMS or MMS message to a specified phone number. Supports text, images, PDFs, and other attachments.</p>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><strong>This endpoint is hosted on a separate domain</strong> (<code>api.mysmsgateway.app</code>) than the main API, but uses the same OAuth access tokens.</p>\n<h3 id=\"request-headers\">Request Headers</h3>\n<ul>\n<li><p><code>Authorization: Bearer ACCESS_TOKEN</code></p>\n</li>\n<li><p><code>Content-Type: application/json</code></p>\n</li>\n</ul>\n<h3 id=\"request-body\">Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"phone\": \"+923001234567\",\n    \"locationId\": \"loc_abc123\",\n    \"message\": \"Hello from myCRMSIM\",\n    \"attachments\": [\n        \"https://example.com/file.jpg\"\n    ]\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>phone</code></td>\n<td>Yes</td>\n<td>Recipient phone number in E.164 format (e.g., <code>+923001234567</code>)</td>\n</tr>\n<tr>\n<td><code>locationId</code></td>\n<td>Yes</td>\n<td>The location/sender identity to send from</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>Conditional</td>\n<td>Message text. Required unless attachments are provided. Max 1600 chars.</td>\n</tr>\n<tr>\n<td><code>attachments</code></td>\n<td>No</td>\n<td>Array of publicly accessible URLs to media files (images, PDFs, videos)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"success-response-200\">Success Response (200)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"msg_xyz789\",\n    \"phone\": \"+923001234567\",\n    \"locationId\": \"loc_abc123\",\n    \"message\": \"Hello from myCRMSIM\",\n    \"status\": \"sent\",\n    \"sent_at\": \"2026-05-21T10:00:00.000Z\"\n}\n\n</code></pre>\n<h3 id=\"error-responses\">Error Responses</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"error\": \"invalid_phone\",\n    \"message\": \"Phone number must be in E.164 format\"\n}\n\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"error\": \"location_not_found\",\n    \"message\": \"The specified location does not exist or you don't have access to it\"\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"ddde9795-986f-4dd6-a9c6-38ea34151303"}]}