{
  "info": {
    "name": "Dragonfly Anti-Detect API",
    "_postman_id": "dragonfly-api-v2",
    "description": "Complete API reference for Dragonfly Anti-Detect Browser platform.\n\nBase URL: https://app.dragonflyaccounts.net\n\nAuth: Add your API key as X-API-Key header. Set the {{apiKey}} collection variable to your key.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://app.dragonflyaccounts.net", "type": "string" },
    { "key": "apiKey",  "value": "PASTE_YOUR_API_KEY_HERE", "type": "string" },
    { "key": "profileId", "value": "", "type": "string" },
    { "key": "proxyId",   "value": "", "type": "string" },
    { "key": "webhookId", "value": "", "type": "string" },
    { "key": "apiKeyId",  "value": "", "type": "string" },
    { "key": "tgCampaignId", "value": "", "type": "string" },
    { "key": "tgAccountId",  "value": "", "type": "string" },
    { "key": "prospectId",   "value": "", "type": "string" }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key",   "value": "X-API-Key",    "type": "string" },
      { "key": "value", "value": "{{apiKey}}",   "type": "string" },
      { "key": "in",    "value": "header",        "type": "string" }
    ]
  },
  "item": [
    {
      "name": "🔐 Authentication",
      "item": [
        {
          "name": "Login",
          "event": [{ "listen": "test", "script": { "exec": ["const j = pm.response.json(); if (j.token) { pm.collectionVariables.set('jwtToken', j.token); console.log('JWT saved'); }"], "type": "text/javascript" } }],
          "request": {
            "auth": { "type": "noauth" },
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"email\": \"your@email.com\",\n  \"password\": \"yourpassword\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/auth/login" }
          }
        },
        {
          "name": "Get Current User",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/auth/me" } }
        },
        {
          "name": "Update Settings",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"display_name\": \"Jane\",\n  \"timezone\": \"America/New_York\",\n  \"theme\": \"dark\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/auth/settings" }
          }
        },
        {
          "name": "Change Password",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"current_password\": \"oldpass\",\n  \"new_password\": \"newpass123\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/auth/change-password" }
          }
        },
        {
          "name": "Get Agent Token",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/auth/agent-token" } }
        }
      ]
    },
    {
      "name": "🖥️ Profiles",
      "item": [
        {
          "name": "List All Profiles",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles" } }
        },
        {
          "name": "Create Profile",
          "event": [{ "listen": "test", "script": { "exec": ["const j = pm.response.json(); if (j.id) { pm.collectionVariables.set('profileId', j.id); console.log('Profile ID saved:', j.id); }"], "type": "text/javascript" } }],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"name\": \"My LinkedIn Profile\",\n  \"color\": \"#7c6dfa\",\n  \"browser_type\": \"linkedin\",\n  \"platform\": \"Win32\",\n  \"locale\": \"en-US\",\n  \"timezone\": \"America/New_York\",\n  \"proxy_type\": \"http\",\n  \"proxy_host\": \"\",\n  \"proxy_port\": \"\",\n  \"proxy_user\": \"\",\n  \"proxy_pass\": \"\",\n  \"screen_width\": 1920,\n  \"screen_height\": 1080,\n  \"start_url\": \"https://linkedin.com\",\n  \"folder\": \"LinkedIn\",\n  \"tags\": [\"warmup\"],\n  \"notes\": \"Created via API\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles" }
          }
        },
        {
          "name": "Update Profile",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"name\": \"Updated Name\",\n  \"notes\": \"Updated via API\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}" }
          }
        },
        {
          "name": "Delete Profile",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}" } }
        },
        {
          "name": "Duplicate Profile",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"count\": 2 }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/duplicate" }
          }
        },
        {
          "name": "Import Profiles (Bulk)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"profiles\": [\n    { \"name\": \"Profile A\", \"proxy_host\": \"sg1.proxy.io\", \"proxy_port\": \"8080\" },\n    { \"name\": \"Profile B\" }\n  ]\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/import" }
          }
        },
        {
          "name": "Import Cookies into Profile",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"cookies\": [\n    {\n      \"domain\": \".linkedin.com\",\n      \"name\": \"li_at\",\n      \"value\": \"AQEDARxxxxxx\",\n      \"path\": \"/\",\n      \"secure\": true,\n      \"httpOnly\": true\n    }\n  ]\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/import-cookies" }
          }
        },
        {
          "name": "Get Profile Stats (7 days)",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/stats" } }
        },
        {
          "name": "List Folders",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/folders" } }
        }
      ]
    },
    {
      "name": "🚀 Launch & Control",
      "item": [
        {
          "name": "Launch Profile",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"agentType\": \"vps\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/launch" }
          }
        },
        {
          "name": "Stop Profile",
          "request": { "method": "POST", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/stop" } }
        },
        {
          "name": "Bulk Launch Profiles",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"profileIds\": [\"uuid1\", \"uuid2\"],\n  \"stagger\": 5000\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/bulk-launch" }
          }
        }
      ]
    },
    {
      "name": "🌐 Browser Control",
      "item": [
        {
          "name": "Navigate to URL",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"url\": \"https://linkedin.com/feed\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/navigate" }
          }
        },
        {
          "name": "Click Element",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"selector\": \".nav-button\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/click" }
          }
        },
        {
          "name": "Type Text",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"selector\": \"#search-input\", \"text\": \"SEO Manager\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/type" }
          }
        },
        {
          "name": "Scroll Page",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"x\": 0, \"y\": 500 }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/scroll" }
          }
        },
        {
          "name": "Execute JavaScript",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"code\": \"document.title\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/eval" }
          }
        },
        {
          "name": "Press Key",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"key\": \"Enter\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/key" }
          }
        },
        {
          "name": "Hover Element",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"selector\": \".like-button\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/hover" }
          }
        },
        {
          "name": "Wait for Element",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"selector\": \".feed-post\", \"timeout\": 10000 }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/wait" }
          }
        },
        {
          "name": "Get Current URL",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/url" } }
        },
        {
          "name": "Take Screenshot",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/screenshot" } }
        },
        {
          "name": "Get Element Text",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/text?selector=.post-title" } }
        },
        {
          "name": "Get Element HTML",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/html?selector=.post" } }
        },
        {
          "name": "List Open Tabs",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/tabs" } }
        },
        {
          "name": "Get Cookies",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/cookies" } }
        },
        {
          "name": "Get Console Logs",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/browser/console" } }
        }
      ]
    },
    {
      "name": "⚡ Warm-up Automation",
      "item": [
        {
          "name": "Get Automation Status",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/automation/status" } }
        },
        {
          "name": "Get Profile Automation Config",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/automation" } }
        },
        {
          "name": "Save Automation Config",
          "request": {
            "method": "PUT",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"keywords\": [\"SEO Manager\", \"Growth Hacker\"],\n  \"limits\": {\n    \"likes\": 5,\n    \"views\": 10,\n    \"connects\": 3,\n    \"comments\": 2,\n    \"network_connects\": 3,\n    \"accept_invitations\": true\n  },\n  \"schedule_enabled\": false,\n  \"schedule_times\": [\"09:00\"],\n  \"schedule_days\": [1, 2, 3, 4, 5],\n  \"schedule_interval\": 0,\n  \"ai_enabled\": false,\n  \"ai_tone\": \"professional\",\n  \"ai_custom_instruction\": \"\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/automation" }
          }
        },
        {
          "name": "Start Warm-up",
          "request": { "method": "POST", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/warmup" } }
        },
        {
          "name": "Stop Warm-up",
          "request": { "method": "POST", "url": { "raw": "{{baseUrl}}/api/profiles/{{profileId}}/warmup/stop" } }
        },
        {
          "name": "Bulk Start Warm-up",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"profileIds\": [\"uuid1\", \"uuid2\"] }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/automation/bulk-start" }
          }
        },
        {
          "name": "Stop All Warm-ups",
          "request": { "method": "POST", "url": { "raw": "{{baseUrl}}/api/automation/bulk-stop" } }
        },
        {
          "name": "Get Automation Logs",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/automation/logs?profileId={{profileId}}" } }
        }
      ]
    },
    {
      "name": "🌍 Proxies",
      "item": [
        {
          "name": "Test a Proxy (no auth)",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/api/proxy/check?host=sg1.proxy.io&port=8080&username=user&password=pass&type=http" }
          }
        },
        {
          "name": "List Proxies",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/proxies" } }
        },
        {
          "name": "Add Proxy",
          "event": [{ "listen": "test", "script": { "exec": ["const j = pm.response.json(); if (j.id) pm.collectionVariables.set('proxyId', j.id);"], "type": "text/javascript" } }],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"label\": \"US Residential\",\n  \"type\": \"http\",\n  \"host\": \"us1.proxy.io\",\n  \"port\": \"8080\",\n  \"username\": \"user\",\n  \"password\": \"pass\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/proxies" }
          }
        },
        {
          "name": "Delete Proxy",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/proxies/{{proxyId}}" } }
        }
      ]
    },
    {
      "name": "🔔 Webhooks",
      "item": [
        {
          "name": "List Webhooks",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/webhooks" } }
        },
        {
          "name": "Create Webhook",
          "event": [{ "listen": "test", "script": { "exec": ["const j = pm.response.json(); if (j.id) pm.collectionVariables.set('webhookId', j.id);"], "type": "text/javascript" } }],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"url\": \"https://yourapp.com/hooks/dragonfly\",\n  \"events\": [\"profile.status\"],\n  \"secret\": \"optional-hmac-secret\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/webhooks" }
          }
        },
        {
          "name": "Test Webhook",
          "request": { "method": "POST", "url": { "raw": "{{baseUrl}}/api/webhooks/{{webhookId}}/test" } }
        },
        {
          "name": "Delete Webhook",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/webhooks/{{webhookId}}" } }
        }
      ]
    },
    {
      "name": "🗝️ API Keys",
      "item": [
        {
          "name": "List API Keys",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/apikeys" } }
        },
        {
          "name": "Create API Key",
          "event": [{ "listen": "test", "script": { "exec": ["const j = pm.response.json(); if (j.id) pm.collectionVariables.set('apiKeyId', j.id); if (j.key) console.log('SAVE THIS KEY:', j.key);"], "type": "text/javascript" } }],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"name\": \"My Integration\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/apikeys" }
          }
        },
        {
          "name": "Revoke API Key",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/apikeys/{{apiKeyId}}" } }
        }
      ]
    },
    {
      "name": "🤖 Agents & Machines",
      "item": [
        {
          "name": "List Connected Agents",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/agents" } }
        },
        {
          "name": "List My Machines",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/machines" } }
        }
      ]
    },
    {
      "name": "✈️ Telegram — Campaigns",
      "item": [
        {
          "name": "List Campaigns",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/campaigns" } }
        },
        {
          "name": "Create Campaign",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"name\": \"My TG Campaign\",\n  \"tg_account_id\": \"{{tgAccountId}}\",\n  \"daily_limit\": 30,\n  \"message_text\": \"Hi {{name}}, I came across your profile...\",\n  \"status\": \"draft\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/campaigns" }
          }
        },
        {
          "name": "Get Campaign",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}" } }
        },
        {
          "name": "Update Campaign",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"status\": \"active\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}" }
          }
        },
        {
          "name": "Delete Campaign",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}" } }
        },
        {
          "name": "List Prospects",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/prospects" } }
        },
        {
          "name": "Import Prospects",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"prospects\": [\n    { \"user_id\": \"123456789\", \"identifier\": \"@handle\", \"name\": \"John Smith\" }\n  ]\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/prospects/add" }
          }
        },
        {
          "name": "Delete Prospects",
          "request": {
            "method": "DELETE",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"ids\": [\"prospect-id-1\", \"prospect-id-2\"] }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/prospects" }
          }
        },
        {
          "name": "Remove Duplicate Prospects",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/prospects/duplicates" } }
        },
        {
          "name": "List Linked Accounts",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/accounts" } }
        },
        {
          "name": "Link Account to Campaign",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"account_id\": \"{{tgAccountId}}\", \"daily_limit\": 30 }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/accounts" }
          }
        },
        {
          "name": "Update Account Daily Limit",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"daily_limit\": 50 }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/accounts/{{tgAccountId}}" }
          }
        },
        {
          "name": "Unlink Account from Campaign",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/accounts/{{tgAccountId}}" } }
        },
        {
          "name": "Reassign Prospects",
          "request": { "method": "POST", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/accounts/reassign" } }
        },
        {
          "name": "Get Campaign Stats (Chart)",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/stats" } }
        },
        {
          "name": "Get Campaign Logs",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/campaigns/{{tgCampaignId}}/logs" } }
        },
        {
          "name": "Scrape Group Members",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"tg_account_id\": \"{{tgAccountId}}\",\n  \"group\": \"@groupname\",\n  \"limit\": 500\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/scrape-group" }
          }
        }
      ]
    },
    {
      "name": "💬 Telegram — Inbox",
      "item": [
        {
          "name": "List Conversations",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/inbox" } }
        },
        {
          "name": "List Conversations (filter by account)",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/inbox?account_id={{tgAccountId}}" } }
        },
        {
          "name": "Get Message Thread",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/inbox/{{prospectId}}/messages" } }
        },
        {
          "name": "Send Manual Message",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"message\": \"Hello! Just following up on my last message.\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/inbox/{{prospectId}}/send" }
          }
        },
        {
          "name": "Sync Messages from Telegram",
          "request": { "method": "POST", "url": { "raw": "{{baseUrl}}/api/tg/inbox/{{prospectId}}/sync" } }
        }
      ]
    },
    {
      "name": "📱 Telegram — Accounts",
      "item": [
        {
          "name": "List TG Accounts",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/tg/accounts" } }
        },
        {
          "name": "Start Adding Account (send code)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{ \"phone\": \"+1234567890\" }", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/accounts/start" }
          }
        },
        {
          "name": "Verify Code and Connect Account",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": { "mode": "raw", "raw": "{\n  \"phone\": \"+1234567890\",\n  \"code\": \"12345\",\n  \"phoneCodeHash\": \"<hash-from-start>\"\n}", "options": { "raw": { "language": "json" } } },
            "url": { "raw": "{{baseUrl}}/api/tg/accounts/verify" }
          }
        },
        {
          "name": "Remove TG Account",
          "request": { "method": "DELETE", "url": { "raw": "{{baseUrl}}/api/tg/accounts/{{tgAccountId}}" } }
        }
      ]
    },
    {
      "name": "📋 Misc",
      "item": [
        {
          "name": "Get Changelog",
          "request": { "auth": { "type": "noauth" }, "method": "GET", "url": { "raw": "{{baseUrl}}/api/changelog" } }
        },
        {
          "name": "Get Server Settings",
          "request": { "method": "GET", "url": { "raw": "{{baseUrl}}/api/settings" } }
        }
      ]
    }
  ]
}
