{
  "info": {
    "_postman_id": "3b1d8b6b-7a13-4f3d-a2d2-2f3a6c4c8f10",
    "name": "Threadline API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "POST /api/grants",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Bearer {{apiKey}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/grants",
          "host": ["{{baseUrl}}"],
          "path": ["api", "grants"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"userId\": \"00000000-0000-0000-0000-000000000001\",\n  \"agentId\": \"00000000-0000-0000-0000-000000000002\",\n  \"scopes\": [\"communication_style\", \"ongoing_tasks\"],\n  \"expiresAt\": \"2027-01-01T00:00:00.000Z\"\n}"
        }
      }
    },
    {
      "name": "POST /api/context/inject",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Bearer {{apiKey}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/context/inject",
          "host": ["{{baseUrl}}"],
          "path": ["api", "context", "inject"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"userId\": \"00000000-0000-0000-0000-000000000001\",\n  \"basePrompt\": \"You are a helpful assistant.\"\n}"
        }
      }
    },
    {
      "name": "POST /api/context/update",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Bearer {{apiKey}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/context/update",
          "host": ["{{baseUrl}}"],
          "path": ["api", "context", "update"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"userId\": \"00000000-0000-0000-0000-000000000001\",\n  \"userMessage\": \"I prefer concise answers. I am a backend engineer using TypeScript.\",\n  \"agentResponse\": \"Got it — keeping things brief and technical.\"\n}"
        }
      }
    },
    {
      "name": "DELETE /api/grants/:grantId",
      "request": {
        "method": "DELETE",
        "header": [
          { "key": "Authorization", "value": "Bearer {{apiKey}}" }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/grants/:grantId",
          "host": ["{{baseUrl}}"],
          "path": ["api", "grants", ":grantId"],
          "variable": [{ "key": "grantId", "value": "00000000-0000-0000-0000-000000000003" }]
        }
      }
    },
    {
      "name": "GET /api/health",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/api/health",
          "host": ["{{baseUrl}}"],
          "path": ["api", "health"]
        }
      }
    }
  ],
  "variable": [
    { "key": "baseUrl", "value": "https://www.threadline.to" },
    { "key": "apiKey", "value": "tl_live_your_api_key_here" }
  ]
}

