{
  "info": {
    "name": "SimpliSend API",
    "description": "Public API (X-API-Key) and Platform API (Bearer JWT) for SimpliSend, a bulk SMS platform for South African businesses. See https://docs.simplisend.co.za for the full reference. Set the `apiKey` collection variable for Public API requests, and run Platform API > Auth > Login to auto-populate `accessToken` for Platform API requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://app.simplisend.co.za/api/v1" },
    { "key": "apiKey", "value": "YOUR_API_KEY" },
    { "key": "accessToken", "value": "" },
    { "key": "refreshToken", "value": "" },
    { "key": "messageId", "value": "cl9x1234abcd" }
  ],
  "item": [
    {
      "name": "Public API",
      "description": "Authenticated with X-API-Key. For custom integrations sending SMS from your own application.",
      "auth": {
        "type": "apikey",
        "apikey": [
          { "key": "key", "value": "X-API-Key" },
          { "key": "value", "value": "{{apiKey}}" },
          { "key": "in", "value": "header" }
        ]
      },
      "item": [
        {
          "name": "Send an SMS",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"+27821234567\",\n  \"body\": \"Hi from SimpliSend!\"\n}"
            },
            "url": { "raw": "{{baseUrl}}/public/sms/send", "host": ["{{baseUrl}}"], "path": ["public", "sms", "send"] },
            "description": "Send one message by raw text, or by templateId + variables instead of body. Requires the sms.send scope."
          }
        },
        {
          "name": "Get message status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/public/sms/{{messageId}}",
              "host": ["{{baseUrl}}"],
              "path": ["public", "sms", "{{messageId}}"]
            },
            "description": "Requires the sms.send or sms.read scope."
          }
        },
        {
          "name": "Check balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/public/balance", "host": ["{{baseUrl}}"], "path": ["public", "balance"] },
            "description": "Requires the sms.send or sms.read scope."
          }
        }
      ]
    },
    {
      "name": "Platform API",
      "description": "The same REST API the SimpliSend dashboard itself calls. Authenticated with a Bearer JWT (see Auth > Login).",
      "auth": { "type": "bearer", "bearer": [{ "key": "token", "value": "{{accessToken}}" }] },
      "item": [
        {
          "name": "Auth",
          "item": [
            {
              "name": "Register",
              "request": {
                "method": "POST",
                "auth": { "type": "noauth" },
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"accountName\": \"Acme Retail\",\n  \"fullName\": \"Jane Doe\",\n  \"email\": \"jane@example.com\",\n  \"password\": \"a-strong-password\",\n  \"referralCode\": \"\"\n}"
                },
                "url": { "raw": "{{baseUrl}}/auth/register", "host": ["{{baseUrl}}"], "path": ["auth", "register"] },
                "description": "Creates a new account (tenant) plus its first user as Owner. referralCode is optional. Public, rate-limited to 5/min/IP."
              }
            },
            {
              "name": "Login",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200) {",
                      "  const data = pm.response.json();",
                      "  pm.collectionVariables.set('accessToken', data.accessToken);",
                      "  pm.collectionVariables.set('refreshToken', data.refreshToken);",
                      "}"
                    ]
                  }
                }
              ],
              "request": {
                "method": "POST",
                "auth": { "type": "noauth" },
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"email\": \"jane@example.com\",\n  \"password\": \"a-strong-password\"\n}"
                },
                "url": { "raw": "{{baseUrl}}/auth/login", "host": ["{{baseUrl}}"], "path": ["auth", "login"] },
                "description": "On a 200 response, this request's Tests script saves accessToken/refreshToken into the collection variables used by every other Platform API request. Public, rate-limited to 10/min/IP."
              }
            },
            {
              "name": "Refresh access token",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code === 200) {",
                      "  pm.collectionVariables.set('accessToken', pm.response.json().accessToken);",
                      "}"
                    ]
                  }
                }
              ],
              "request": {
                "method": "POST",
                "auth": { "type": "noauth" },
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"refreshToken\": \"{{refreshToken}}\"\n}" },
                "url": { "raw": "{{baseUrl}}/auth/refresh", "host": ["{{baseUrl}}"], "path": ["auth", "refresh"] },
                "description": "Public, rate-limited to 20/min/IP."
              }
            },
            {
              "name": "Get current user",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/auth/me", "host": ["{{baseUrl}}"], "path": ["auth", "me"] }
              }
            },
            {
              "name": "Social login",
              "request": {
                "method": "POST",
                "auth": { "type": "noauth" },
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"idToken\": \"FIREBASE_ID_TOKEN\"\n}" },
                "url": { "raw": "{{baseUrl}}/auth/social", "host": ["{{baseUrl}}"], "path": ["auth", "social"] },
                "description": "idToken is a Firebase ID token from Google/Facebook sign-in. Same response shape as Login/Register. Public, rate-limited to 10/min/IP."
              }
            },
            {
              "name": "Accept invite",
              "request": {
                "method": "POST",
                "auth": { "type": "noauth" },
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"token\": \"INVITE_TOKEN\",\n  \"password\": \"a-strong-password\"\n}" },
                "url": { "raw": "{{baseUrl}}/invites/accept", "host": ["{{baseUrl}}"], "path": ["invites", "accept"] },
                "description": "Accept an email or SMS invite, attaching the accepting user to an existing account. Public, rate-limited to 10/min/IP."
              }
            }
          ]
        },
        {
          "name": "Contacts & data sources",
          "item": [
            {
              "name": "Preview a contact upload",
              "request": {
                "method": "POST",
                "header": [],
                "body": { "mode": "formdata", "formdata": [{ "key": "file", "type": "file", "src": [] }] },
                "url": { "raw": "{{baseUrl}}/data-sources/preview-upload", "host": ["{{baseUrl}}"], "path": ["data-sources", "preview-upload"] },
                "description": "Multipart CSV/XLSX. Returns detected columns plus a 5-row sample. Nothing is persisted. Requires contacts.manage."
              }
            },
            {
              "name": "Commit a contact upload",
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    { "key": "file", "type": "file", "src": [] },
                    { "key": "name", "value": "Q1 customer list", "type": "text" },
                    {
                      "key": "fieldMappings",
                      "value": "[{\"sourceField\":\"Phone\",\"targetField\":\"msisdn\"},{\"sourceField\":\"Name\",\"targetField\":\"firstName\"}]",
                      "type": "text"
                    }
                  ]
                },
                "url": { "raw": "{{baseUrl}}/data-sources/upload", "host": ["{{baseUrl}}"], "path": ["data-sources", "upload"] },
                "description": "fieldMappings is a JSON array of {sourceField, targetField} — one must target msisdn. Requires contacts.manage."
              }
            },
            {
              "name": "Test an external data source",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"connection\": {\n    \"type\": \"postgres\",\n    \"host\": \"db.example.com\",\n    \"port\": 5432,\n    \"database\": \"crm\",\n    \"user\": \"readonly\",\n    \"password\": \"...\"\n  },\n  \"spec\": {\n    \"query\": \"SELECT phone, first_name FROM customers\"\n  }\n}"
                },
                "url": { "raw": "{{baseUrl}}/data-sources/external/test", "host": ["{{baseUrl}}"], "path": ["data-sources", "external", "test"] },
                "description": "Tests a Postgres/MySQL/SQL Server connection and query/table, returns a sample. Requires contacts.manage."
              }
            },
            {
              "name": "Create an external data source",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"CRM customers\",\n  \"connection\": { \"type\": \"postgres\", \"host\": \"db.example.com\", \"port\": 5432, \"database\": \"crm\", \"user\": \"readonly\", \"password\": \"...\" },\n  \"spec\": { \"query\": \"SELECT phone, first_name FROM customers\" },\n  \"fieldMappings\": [{ \"sourceField\": \"phone\", \"targetField\": \"msisdn\" }]\n}"
                },
                "url": { "raw": "{{baseUrl}}/data-sources/external", "host": ["{{baseUrl}}"], "path": ["data-sources", "external"] },
                "description": "Creates the data source (credentials encrypted at rest) and runs a first sync. Requires contacts.manage."
              }
            },
            {
              "name": "Resync a data source",
              "request": {
                "method": "POST",
                "url": { "raw": "{{baseUrl}}/data-sources/:id/resync", "host": ["{{baseUrl}}"], "path": ["data-sources", ":id", "resync"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Manual-trigger only — there's no scheduled background sync yet. Requires contacts.manage."
              }
            },
            {
              "name": "List data sources",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/data-sources", "host": ["{{baseUrl}}"], "path": ["data-sources"] } }
            },
            {
              "name": "List contacts",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/contacts", "host": ["{{baseUrl}}"], "path": ["contacts"] } }
            },
            {
              "name": "Create a contact",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"msisdn\": \"+27821234567\",\n  \"firstName\": \"Jane\"\n}" },
                "url": { "raw": "{{baseUrl}}/contacts", "host": ["{{baseUrl}}"], "path": ["contacts"] },
                "description": "Requires contacts.manage. Additional fields depend on your account's custom field setup."
              }
            },
            {
              "name": "Update a contact",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"firstName\": \"Jane\"\n}" },
                "url": { "raw": "{{baseUrl}}/contacts/:id", "host": ["{{baseUrl}}"], "path": ["contacts", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Requires contacts.manage."
              }
            },
            {
              "name": "Delete a contact",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/contacts/:id", "host": ["{{baseUrl}}"], "path": ["contacts", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Requires contacts.manage."
              }
            }
          ]
        },
        {
          "name": "Templates & campaigns",
          "item": [
            {
              "name": "List templates",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/templates", "host": ["{{baseUrl}}"], "path": ["templates"] } }
            },
            {
              "name": "Create a template",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"name\": \"Order shipped\",\n  \"body\": \"Hi {{firstName}}, your order has shipped!\"\n}" },
                "url": { "raw": "{{baseUrl}}/templates", "host": ["{{baseUrl}}"], "path": ["templates"] },
                "description": "Body may contain {{variableName}} placeholders resolved from a contact's mapped fields at send time."
              }
            },
            {
              "name": "Update a template",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"body\": \"Hi {{firstName}}, your order has shipped! Track: {{trackingUrl}}\"\n}" },
                "url": { "raw": "{{baseUrl}}/templates/:id", "host": ["{{baseUrl}}"], "path": ["templates", ":id"], "variable": [{ "key": "id", "value": "" }] }
              }
            },
            {
              "name": "Delete a template",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/templates/:id", "host": ["{{baseUrl}}"], "path": ["templates", ":id"], "variable": [{ "key": "id", "value": "" }] }
              }
            },
            {
              "name": "List campaigns",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/campaigns", "host": ["{{baseUrl}}"], "path": ["campaigns"] } }
            },
            {
              "name": "Create a campaign",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"name\": \"Spring promo\",\n  \"templateId\": \"\",\n  \"body\": \"20% off everything this weekend!\"\n}" },
                "url": { "raw": "{{baseUrl}}/campaigns", "host": ["{{baseUrl}}"], "path": ["campaigns"] },
                "description": "A message (raw or template) targeted at a contact list or segment — adjust the body to your actual targeting fields."
              }
            },
            {
              "name": "Get campaign detail",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/campaigns/:id", "host": ["{{baseUrl}}"], "path": ["campaigns", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Includes per-message delivery status."
              }
            },
            {
              "name": "Send a campaign",
              "request": {
                "method": "POST",
                "url": { "raw": "{{baseUrl}}/campaigns/:id/send", "host": ["{{baseUrl}}"], "path": ["campaigns", ":id", "send"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Each message runs through content moderation before sending."
              }
            },
            {
              "name": "AllTelecoms balance (admin)",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/admin/alltelecoms/balance", "host": ["{{baseUrl}}"], "path": ["admin", "alltelecoms", "balance"] },
                "description": "The platform's own balance with the upstream SMS vendor. Platform-admin only."
              }
            }
          ]
        },
        {
          "name": "Billing",
          "item": [
            {
              "name": "List pricing plans",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/pricing-plans", "host": ["{{baseUrl}}"], "path": ["pricing-plans"] } }
            },
            {
              "name": "List SMS bundles",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/sms-bundles", "host": ["{{baseUrl}}"], "path": ["sms-bundles"] } }
            },
            {
              "name": "Checkout an SMS bundle",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"quantity\": 1\n}" },
                "url": {
                  "raw": "{{baseUrl}}/billing/bundles/:bundleId/checkout",
                  "host": ["{{baseUrl}}"],
                  "path": ["billing", "bundles", ":bundleId", "checkout"],
                  "variable": [{ "key": "bundleId", "value": "" }]
                },
                "description": "Starts a Pay Now checkout for a bundle purchase — this is also how an account tops up. quantity is optional."
              }
            },
            {
              "name": "Checkout a subscription",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"planId\": \"\"\n}" },
                "url": { "raw": "{{baseUrl}}/billing/subscriptions/checkout", "host": ["{{baseUrl}}"], "path": ["billing", "subscriptions", "checkout"] },
                "description": "Starts a Pay Now checkout for a subscription. The Subscription row is only created once the payment webhook confirms."
              }
            },
            {
              "name": "Billing summary",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/billing/summary", "host": ["{{baseUrl}}"], "path": ["billing", "summary"] },
                "description": "Current smsBalance, active subscription, and recent transactions/purchases."
              }
            },
            {
              "name": "Admin: list pricing plans (incl. inactive)",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/admin/pricing-plans", "host": ["{{baseUrl}}"], "path": ["admin", "pricing-plans"] } }
            },
            {
              "name": "Admin: create pricing plan",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"name\": \"Growth\",\n  \"monthlyPrice\": 499,\n  \"includedSms\": 1000\n}" },
                "url": { "raw": "{{baseUrl}}/admin/pricing-plans", "host": ["{{baseUrl}}"], "path": ["admin", "pricing-plans"] },
                "description": "Platform-admin only."
              }
            },
            {
              "name": "Admin: update pricing plan",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"monthlyPrice\": 549\n}" },
                "url": { "raw": "{{baseUrl}}/admin/pricing-plans/:id", "host": ["{{baseUrl}}"], "path": ["admin", "pricing-plans", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Platform-admin only."
              }
            },
            {
              "name": "Admin: delete (deactivate) pricing plan",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/admin/pricing-plans/:id", "host": ["{{baseUrl}}"], "path": ["admin", "pricing-plans", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Soft-delete (isActive: false). Platform-admin only."
              }
            },
            {
              "name": "Admin: list SMS bundles (incl. inactive)",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/admin/sms-bundles", "host": ["{{baseUrl}}"], "path": ["admin", "sms-bundles"] } }
            },
            {
              "name": "Admin: create SMS bundle",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"name\": \"Growth\",\n  \"smsCount\": 5000,\n  \"price\": 1225\n}" },
                "url": { "raw": "{{baseUrl}}/admin/sms-bundles", "host": ["{{baseUrl}}"], "path": ["admin", "sms-bundles"] },
                "description": "Platform-admin only."
              }
            },
            {
              "name": "Admin: update SMS bundle",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"price\": 1199\n}" },
                "url": { "raw": "{{baseUrl}}/admin/sms-bundles/:id", "host": ["{{baseUrl}}"], "path": ["admin", "sms-bundles", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Platform-admin only."
              }
            },
            {
              "name": "Admin: delete (deactivate) SMS bundle",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/admin/sms-bundles/:id", "host": ["{{baseUrl}}"], "path": ["admin", "sms-bundles", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Soft-delete (isActive: false). Platform-admin only."
              }
            }
          ]
        },
        {
          "name": "Team, roles & invites",
          "item": [
            {
              "name": "List roles",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/roles", "host": ["{{baseUrl}}"], "path": ["roles"] },
                "description": "The 4 system roles (Owner, Admin, Manager, Member) plus any custom roles. Requires roles.manage."
              }
            },
            {
              "name": "Create a role",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"name\": \"Campaign Sender\",\n  \"permissions\": [\"campaigns.manage\"]\n}" },
                "url": { "raw": "{{baseUrl}}/roles", "host": ["{{baseUrl}}"], "path": ["roles"] },
                "description": "Requires roles.manage. See Get permissions for the full permission key list."
              }
            },
            {
              "name": "Update a role",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"permissions\": [\"campaigns.manage\", \"contacts.manage\"]\n}" },
                "url": { "raw": "{{baseUrl}}/roles/:id", "host": ["{{baseUrl}}"], "path": ["roles", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "System roles can't be edited. Requires roles.manage."
              }
            },
            {
              "name": "Delete a role",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/roles/:id", "host": ["{{baseUrl}}"], "path": ["roles", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "System roles can't be deleted. Requires roles.manage."
              }
            },
            {
              "name": "Get permissions",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/permissions", "host": ["{{baseUrl}}"], "path": ["permissions"] },
                "description": "The full permission key list, for building a role editor."
              }
            },
            {
              "name": "List users",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/users", "host": ["{{baseUrl}}"], "path": ["users"] }, "description": "Requires users.manage." }
            },
            {
              "name": "Update a user",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"roleId\": \"\"\n}" },
                "url": { "raw": "{{baseUrl}}/users/:id", "host": ["{{baseUrl}}"], "path": ["users", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Update role/status. Refuses to suspend the account's last active user. Requires users.manage."
              }
            },
            {
              "name": "Remove a user",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/users/:id", "host": ["{{baseUrl}}"], "path": ["users", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Refuses to remove the account's last active user. Requires users.manage."
              }
            },
            {
              "name": "List invites",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/invites", "host": ["{{baseUrl}}"], "path": ["invites"] }, "description": "Requires users.manage." }
            },
            {
              "name": "Send an invite",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"email\": \"colleague@example.com\",\n  \"roleId\": \"\"\n}" },
                "url": { "raw": "{{baseUrl}}/invites", "host": ["{{baseUrl}}"], "path": ["invites"] },
                "description": "Email or SMS invite with a role pre-assigned. Requires users.manage."
              }
            },
            {
              "name": "Resend an invite",
              "request": {
                "method": "POST",
                "url": { "raw": "{{baseUrl}}/invites/:id/resend", "host": ["{{baseUrl}}"], "path": ["invites", ":id", "resend"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Requires users.manage."
              }
            },
            {
              "name": "Revoke an invite",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/invites/:id", "host": ["{{baseUrl}}"], "path": ["invites", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Requires users.manage."
              }
            }
          ]
        },
        {
          "name": "Moderation & audit log",
          "item": [
            {
              "name": "List moderation flags",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/moderation-flags", "host": ["{{baseUrl}}"], "path": ["moderation-flags"] },
                "description": "The account's own flagged messages. Requires moderation.review."
              }
            },
            {
              "name": "Get audit log",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/audit-log", "host": ["{{baseUrl}}"], "path": ["audit-log"] },
                "description": "Role changes, user removals, campaign sends, and similar actions. Requires accounts.manage."
              }
            },
            {
              "name": "Admin: list moderation flags (all accounts)",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/admin/moderation-flags", "host": ["{{baseUrl}}"], "path": ["admin", "moderation-flags"] }, "description": "Platform-admin only." }
            },
            {
              "name": "Admin: review a moderation flag",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"status\": \"CLEARED\"\n}" },
                "url": { "raw": "{{baseUrl}}/admin/moderation-flags/:id", "host": ["{{baseUrl}}"], "path": ["admin", "moderation-flags", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "status: CLEARED | ACTIONED | ACCOUNT_SUSPENDED. Only ACCOUNT_SUSPENDED actually suspends the account. Platform-admin only."
              }
            },
            {
              "name": "Admin: platform-wide audit log",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/admin/audit-log", "host": ["{{baseUrl}}"], "path": ["admin", "audit-log"] }, "description": "Platform-admin only." }
            }
          ]
        },
        {
          "name": "Social login & push",
          "item": [
            {
              "name": "Register a push token",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"token\": \"DEVICE_PUSH_TOKEN\",\n  \"platform\": \"ios\"\n}" },
                "url": { "raw": "{{baseUrl}}/push-tokens", "host": ["{{baseUrl}}"], "path": ["push-tokens"] }
              }
            },
            {
              "name": "Unregister a push token",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"token\": \"DEVICE_PUSH_TOKEN\"\n}" },
                "url": { "raw": "{{baseUrl}}/push-tokens/unregister", "host": ["{{baseUrl}}"], "path": ["push-tokens", "unregister"] }
              }
            }
          ]
        },
        {
          "name": "Referrals & API keys",
          "item": [
            {
              "name": "List API keys",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/api-keys", "host": ["{{baseUrl}}"], "path": ["api-keys"] },
                "description": "Key values themselves are never shown again after creation. Requires apikeys.manage."
              }
            },
            {
              "name": "Create an API key",
              "request": {
                "method": "POST",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"name\": \"Order system integration\",\n  \"scopes\": [\"sms.send\", \"sms.read\"]\n}" },
                "url": { "raw": "{{baseUrl}}/api-keys", "host": ["{{baseUrl}}"], "path": ["api-keys"] },
                "description": "The full key is returned once, in this response. Requires apikeys.manage."
              }
            },
            {
              "name": "Revoke an API key",
              "request": {
                "method": "DELETE",
                "url": { "raw": "{{baseUrl}}/api-keys/:id", "host": ["{{baseUrl}}"], "path": ["api-keys", ":id"], "variable": [{ "key": "id", "value": "" }] },
                "description": "Requires apikeys.manage."
              }
            },
            {
              "name": "Get/create referral code",
              "request": {
                "method": "POST",
                "url": { "raw": "{{baseUrl}}/referrals/code", "host": ["{{baseUrl}}"], "path": ["referrals", "code"] },
                "description": "Returns the account's referral code, generating one on first call. Requires referrals.manage."
              }
            },
            {
              "name": "Get referral history",
              "request": {
                "method": "GET",
                "url": { "raw": "{{baseUrl}}/referrals", "host": ["{{baseUrl}}"], "path": ["referrals"] },
                "description": "The account's referral history and reward status."
              }
            }
          ]
        },
        {
          "name": "Admin",
          "description": "Everything here requires the calling user to be a platform admin, not just an account Owner.",
          "item": [
            {
              "name": "List accounts",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/admin/accounts", "host": ["{{baseUrl}}"], "path": ["admin", "accounts"] } }
            },
            {
              "name": "Get account detail",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/admin/accounts/:id", "host": ["{{baseUrl}}"], "path": ["admin", "accounts", ":id"], "variable": [{ "key": "id", "value": "" }] } }
            },
            {
              "name": "Update an account",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"status\": \"ACTIVE\"\n}" },
                "url": { "raw": "{{baseUrl}}/admin/accounts/:id", "host": ["{{baseUrl}}"], "path": ["admin", "accounts", ":id"], "variable": [{ "key": "id", "value": "" }] }
              }
            },
            {
              "name": "List all users",
              "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/admin/users", "host": ["{{baseUrl}}"], "path": ["admin", "users"] } }
            },
            {
              "name": "Update any user",
              "request": {
                "method": "PATCH",
                "header": [{ "key": "Content-Type", "value": "application/json" }],
                "body": { "mode": "raw", "raw": "{\n  \"status\": \"ACTIVE\"\n}" },
                "url": { "raw": "{{baseUrl}}/admin/users/:id", "host": ["{{baseUrl}}"], "path": ["admin", "users", ":id"], "variable": [{ "key": "id", "value": "" }] }
              }
            }
          ]
        }
      ]
    }
  ]
}
