{
  "object": "open_api.demo_flow",
  "version": "2026-03-26.1",
  "title": "Agent-safe Open API demo flow",
  "token": "rf_test_demo_agent_flow",
  "baseUrl": "https://redditfind.ai/api/open/demo/v1",
  "headers": {
    "Authorization": "Bearer rf_test_demo_agent_flow",
    "Content-Type": "application/json",
    "Idempotency-Key": "open-api-demo-001"
  },
  "sampleRequestBody": {
    "product_summary": "A user research tool for indie makers and SaaS teams.",
    "target_audience": "Indie makers, SaaS founders, and growth teams",
    "use_cases": [
      "Product validation",
      "Community-led growth"
    ],
    "constraints": [
      "Prefer active English-speaking communities"
    ],
    "language": "en"
  },
  "steps": [
    {
      "id": "whoami",
      "method": "GET",
      "url": "https://redditfind.ai/api/open/demo/v1/whoami",
      "expectedStatus": 200
    },
    {
      "id": "createJob",
      "method": "POST",
      "url": "https://redditfind.ai/api/open/demo/v1/community-discovery/jobs",
      "expectedStatus": 201,
      "expectedJobId": "cdj_demo_001"
    },
    {
      "id": "getJob",
      "method": "GET",
      "url": "https://redditfind.ai/api/open/demo/v1/community-discovery/jobs/cdj_demo_001",
      "expectedStatus": 200,
      "expectedJobId": "cdj_demo_001",
      "expectedResultId": "cdr_demo_001"
    },
    {
      "id": "getResult",
      "method": "GET",
      "url": "https://redditfind.ai/api/open/demo/v1/community-discovery/jobs/cdj_demo_001/result",
      "expectedStatus": 200,
      "expectedJobId": "cdj_demo_001",
      "expectedResultId": "cdr_demo_001"
    }
  ],
  "expectedJobId": "cdj_demo_001",
  "expectedResultId": "cdr_demo_001",
  "fixedResponses": {
    "whoami": {
      "object": "open_api.identity",
      "user_id": "demo_agent",
      "api_key": {
        "id": "oak_demo_agent_flow",
        "name": "Agent demo flow token",
        "environment": "test",
        "scopes": [
          "access:read",
          "community_discovery:read",
          "community_discovery:write"
        ]
      }
    },
    "jobQueued": {
      "id": "cdj_demo_001",
      "object": "community_discovery.job",
      "status": "queued",
      "progress": 0,
      "stage_message": "Queued",
      "result_id": null,
      "created_at": "2026-03-26T09:00:00.000Z",
      "updated_at": "2026-03-26T09:00:00.000Z",
      "result_url": "/api/open/demo/v1/community-discovery/jobs/cdj_demo_001/result",
      "reused": false
    },
    "jobCompleted": {
      "id": "cdj_demo_001",
      "object": "community_discovery.job",
      "status": "completed",
      "progress": 100,
      "stage_message": "Completed demo result ready",
      "result_id": "cdr_demo_001",
      "created_at": "2026-03-26T09:00:00.000Z",
      "updated_at": "2026-03-26T09:03:00.000Z",
      "result_url": "/api/open/demo/v1/community-discovery/jobs/cdj_demo_001/result",
      "reused": false
    },
    "result": {
      "id": "cdr_demo_001",
      "object": "community_discovery.result",
      "job_id": "cdj_demo_001",
      "strategy_text": "Prioritize builder and SaaS operator communities with recurring validation and acquisition discussion.",
      "notes": "Focus on communities that combine clear pain-point language with enough weekly activity to support follow-up monitoring.",
      "queries": [
        "product validation reddit",
        "saas founder reddit"
      ],
      "clusters": [
        {
          "label": "Builder core",
          "communities": [
            "r/saas",
            "r/micro_saas"
          ]
        }
      ],
      "created_at": "2026-03-26T09:03:00.000Z"
    }
  },
  "limitations": [
    "This demo flow validates HTTP client behavior, headers, polling, and JSON parsing only.",
    "The demo payload is fixed and does not change based on your request body.",
    "The demo flow does not create real jobs, consume billing credits, or use your account data.",
    "Switch to a real rf_test_ token under /api/open/v1 after the demo flow succeeds."
  ]
}