{
  "info": {
    "_postman_id": "c3a1f7f0-4c9b-4d0a-9f11-remlabs000001",
    "name": "REM Labs API",
    "description": "Official Postman collection for the REM Labs API (v4.0).\n\nAll requests target `{{baseUrl}}` and authenticate with a Bearer token (`{{apiKey}}`).\n\n- **Memory** — set, search (lexical + semantic), remember, delete\n- **Dream Engine** — run consolidation, list dreams\n- **Channels** — create, publish, subscribe\n- **Webhooks** — register, list, delete\n- **Events** — subscribe, memory-subscribe\n- **Keys** — create new API key\n- **Agents** — A2A discovery card\n\n→ Full OpenAPI spec: https://remlabs.ai/openapi.json\n→ Docs: https://remlabs.ai/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://remlabs.ai/v1", "type": "string" },
    { "key": "apiKey", "value": "sk-rem-your-key-here", "type": "string" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{apiKey}}", "type": "string" }]
  },
  "item": [
    {
      "name": "Memory",
      "description": "Store, retrieve, search, and delete memories.",
      "item": [
        {
          "name": "Set memory",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/memory-set", "host": ["{{baseUrl}}"], "path": ["memory-set"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"key\": \"user.pref.dark_mode\",\n  \"value\": \"Prefers dark mode across all surfaces.\",\n  \"tags\": [\"preferences\", \"ui\"],\n  \"metadata\": { \"confidence\": 0.98 }\n}"
            }
          },
          "response": [
            {
              "name": "200 OK",
              "originalRequest": {
                "method": "POST",
                "header": [{ "key": "Authorization", "value": "Bearer {{apiKey}}" }],
                "url": { "raw": "{{baseUrl}}/memory-set", "host": ["{{baseUrl}}"], "path": ["memory-set"] }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"id\": \"mem_01HP3ZK7X9ABCDEFGHJKMNP\",\n  \"key\": \"user.pref.dark_mode\",\n  \"value\": \"Prefers dark mode across all surfaces.\",\n  \"tags\": [\"preferences\", \"ui\"],\n  \"created_at\": \"2026-04-17T12:00:00Z\"\n}"
            }
          ]
        },
        {
          "name": "Get memory (by key)",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{apiKey}}" }],
            "url": {
              "raw": "{{baseUrl}}/memory-get?key=user.pref.dark_mode",
              "host": ["{{baseUrl}}"],
              "path": ["memory-get"],
              "query": [{ "key": "key", "value": "user.pref.dark_mode" }]
            }
          },
          "response": []
        },
        {
          "name": "Search memories (lexical / FTS5)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/memory-search", "host": ["{{baseUrl}}"], "path": ["memory-search"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"query\": \"auth flow token refresh\",\n  \"limit\": 10\n}"
            }
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"results\": [\n    {\n      \"id\": \"mem_01HP3ZK7X9ABCDEFGHJKMNP\",\n      \"key\": \"auth.token.refresh\",\n      \"value\": \"Token refresh uses sliding window; 15 min access, 30 day refresh.\",\n      \"score\": 0.87\n    }\n  ],\n  \"total\": 1,\n  \"took_ms\": 4\n}"
            }
          ]
        },
        {
          "name": "Search memories (semantic / vector)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/memory-search-semantic", "host": ["{{baseUrl}}"], "path": ["memory-search-semantic"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"query\": \"How do users prefer their UI to look?\",\n  \"limit\": 8,\n  \"threshold\": 0.6\n}"
            }
          },
          "response": []
        },
        {
          "name": "Remember (natural language)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/remember", "host": ["{{baseUrl}}"], "path": ["remember"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"content\": \"The user hates notifications after 9pm and prefers summaries over raw logs.\",\n  \"namespace\": \"user_1234\"\n}"
            }
          },
          "response": []
        },
        {
          "name": "Delete memory",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/memory-delete", "host": ["{{baseUrl}}"], "path": ["memory-delete"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"key\": \"user.pref.dark_mode\"\n}"
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Dream Engine",
      "description": "Autonomous knowledge consolidation across stored memories.",
      "item": [
        {
          "name": "Run dream",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/dream", "host": ["{{baseUrl}}"], "path": ["dream"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"namespace\": \"default\",\n  \"strategy\": \"synthesize\"\n}"
            }
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"id\": \"dream_01HP3ZK9P7QRSTUVWXYZ\",\n  \"status\": \"running\",\n  \"strategy\": \"synthesize\",\n  \"namespace\": \"default\",\n  \"started_at\": \"2026-04-17T12:00:00Z\",\n  \"memories_created\": 0\n}"
            }
          ]
        },
        {
          "name": "List dreams",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{apiKey}}" }],
            "url": {
              "raw": "{{baseUrl}}/dream?limit=20",
              "host": ["{{baseUrl}}"],
              "path": ["dream"],
              "query": [{ "key": "limit", "value": "20" }]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Channels",
      "description": "Real-time pub/sub channels for multi-agent coordination.",
      "item": [
        {
          "name": "Create channel",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/channels", "host": ["{{baseUrl}}"], "path": ["channels"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"agent-swarm-alpha\",\n  \"mode\": \"broadcast\",\n  \"retention\": \"24h\"\n}"
            }
          },
          "response": []
        },
        {
          "name": "Publish to channel",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/channels/agent-swarm-alpha/publish",
              "host": ["{{baseUrl}}"],
              "path": ["channels", "agent-swarm-alpha", "publish"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"message\": { \"type\": \"task.ready\", \"task_id\": \"t_42\" }\n}"
            }
          },
          "response": []
        },
        {
          "name": "Subscribe to channel",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{baseUrl}}/channels/agent-swarm-alpha/subscribe",
              "host": ["{{baseUrl}}"],
              "path": ["channels", "agent-swarm-alpha", "subscribe"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"transport\": \"sse\"\n}"
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhooks",
      "description": "Register HTTPS callbacks for REM Labs events.",
      "item": [
        {
          "name": "Create webhook",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/webhook-create", "host": ["{{baseUrl}}"], "path": ["webhook-create"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/hooks/remlabs\",\n  \"events\": [\"memory.created\", \"dream.completed\"],\n  \"secret\": \"whsec_replace_me\"\n}"
            }
          },
          "response": [
            {
              "name": "201 Created",
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"id\": \"wh_01HP3ZKC1D2E3F4G5H6J7K\",\n  \"url\": \"https://example.com/hooks/remlabs\",\n  \"events\": [\"memory.created\", \"dream.completed\"],\n  \"active\": true,\n  \"created_at\": \"2026-04-17T12:00:00Z\"\n}"
            }
          ]
        },
        {
          "name": "List webhooks",
          "request": {
            "method": "GET",
            "header": [{ "key": "Authorization", "value": "Bearer {{apiKey}}" }],
            "url": { "raw": "{{baseUrl}}/webhooks", "host": ["{{baseUrl}}"], "path": ["webhooks"] }
          },
          "response": []
        },
        {
          "name": "Delete webhook",
          "request": {
            "method": "DELETE",
            "header": [{ "key": "Authorization", "value": "Bearer {{apiKey}}" }],
            "url": {
              "raw": "{{baseUrl}}/webhook/wh_01HP3ZKC1D2E3F4G5H6J7K",
              "host": ["{{baseUrl}}"],
              "path": ["webhook", "wh_01HP3ZKC1D2E3F4G5H6J7K"]
            }
          },
          "response": []
        },
        {
          "name": "Bulk register webhooks",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/webhooks-register", "host": ["{{baseUrl}}"], "path": ["webhooks-register"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"webhooks\": [\n    { \"url\": \"https://example.com/hooks/memory\", \"events\": [\"memory.created\"] },\n    { \"url\": \"https://example.com/hooks/dream\",  \"events\": [\"dream.completed\"] }\n  ]\n}"
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Events",
      "description": "Typed event streams over SSE or WebSocket.",
      "item": [
        {
          "name": "Subscribe to events (SSE)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Accept", "value": "text/event-stream" }
            ],
            "url": { "raw": "{{baseUrl}}/event-subscribe", "host": ["{{baseUrl}}"], "path": ["event-subscribe"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"events\": [\"memory.created\", \"memory.updated\", \"dream.completed\"],\n  \"transport\": \"sse\"\n}"
            }
          },
          "response": []
        },
        {
          "name": "Subscribe to memory events",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/memory-subscribe", "host": ["{{baseUrl}}"], "path": ["memory-subscribe"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tags\": [\"preferences\"],\n  \"transport\": \"sse\"\n}"
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Keys",
      "description": "Programmatic API key management.",
      "item": [
        {
          "name": "Create API key",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Authorization", "value": "Bearer {{apiKey}}" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": { "raw": "{{baseUrl}}/keys", "host": ["{{baseUrl}}"], "path": ["keys"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"ci-deploy\",\n  \"scopes\": [\"memory:read\", \"memory:write\", \"dream:run\"]\n}"
            }
          },
          "response": [
            {
              "name": "201 Created",
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"id\": \"key_01HP3ZKB5C6D7E8F9GHJKM\",\n  \"name\": \"ci-deploy\",\n  \"key\": \"sk-rem-a1b2c3d4e5f6g7h8i9j0\",\n  \"scopes\": [\"memory:read\", \"memory:write\", \"dream:run\"],\n  \"created_at\": \"2026-04-17T12:00:00Z\"\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Agents",
      "description": "A2A (agent-to-agent) discovery card. Public endpoint — no auth required.",
      "item": [
        {
          "name": "Get agent card",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "https://remlabs.ai/.well-known/agent-card.json",
              "protocol": "https",
              "host": ["remlabs", "ai"],
              "path": [".well-known", "agent-card.json"]
            }
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\n  \"name\": \"REM Labs\",\n  \"description\": \"The continuity layer for intelligence.\",\n  \"url\": \"https://remlabs.ai\",\n  \"version\": \"4.0.0\",\n  \"capabilities\": [\"memory.store\", \"memory.search\", \"dream.run\", \"channels.publish\"]\n}"
            }
          ]
        }
      ]
    }
  ]
}
