# story.rebuild

Access: Bearer token required. Additional credential or scope: drafts:write. MCP allowed: yes (op_story_rebuild).

HTTP: POST /api/v2/execute. Replace the placeholder input below with an object matching the input JSON Schema; this example is not a runnable request.

{"version":1,"operation":"story.rebuild","input":<input-object matching schema>}

CLI: indielogs call story.rebuild '<input-json>' (command shape only; the placeholder is not a valid sample input).

Input JSON Schema (generated from the shared Zod input schema). JSON Schema describes representable structure; runtime refinements and transforms remain enforced by the canonical parser and may not be fully represented here.

```json

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "project_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "lookback_days": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 36500
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "project_id"
  ],
  "additionalProperties": false
}

```