---
title: "Edit a plan: the whole step list in its new order (tick or untick, rename, add, remove), its title, or put it away (dismissed) and bring it back (draft). No model call"
method: PATCH
path: "/builder/sessions/{sessionId}/plans/{planId}"
tags: ["Builder"]
---

# Edit a plan: the whole step list in its new order (tick or untick, rename, add, remove), its title, or put it away (dismissed) and bring it back (draft). No model call

`PATCH /builder/sessions/{sessionId}/plans/{planId}`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/builder/sessions/{sessionId}/plans/{planId}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `sessionId` string, uuid, required
- `planId` string, uuid, required

## Request body

- object
  - `steps` object[]: The whole step list in its new order (tick, rename, add, remove)
    - `id` string: An existing step; omitted for a new one
    - `title` string, required
    - `detail` string
    - `size` 'small' | 'medium' | 'large'
    - `include` boolean
  - `title` string
  - `status` 'draft' | 'dismissed': dismissed: put the plan away; draft: bring it back

## Response `200`

The plan

- object
  - `id` string, uuid, required
  - `sessionId` string, uuid, required
  - `turnId` string, uuid, required: The Plan turn that wrote it
  - `status` 'draft' | 'building' | 'done' | 'dismissed', required
  - `plan` object, required
    - `title` string, required
    - `goal` string, required
    - `summary` string, required
    - `pages` object[], required
      - `name` string, required
      - `path` string, nullable, required
      - `sections` string[], required
    - `steps` object[], required
      - `id` string, required
      - `title` string, required
      - `detail` string, required
      - `size` 'small' | 'medium' | 'large', required
      - `credits` number, required
      - `include` boolean, required
      - `done` boolean, required
      - `turnId` string, nullable, required
    - `questions` string[], required
  - `credits` number, required: Estimated Build Credits of the ticked steps not built yet
  - `createdAt` string, required: ISO-8601 timestamp
  - `updatedAt` string, required: ISO-8601 timestamp

## Other responses

- `400`: Invalid request (code invalid_request; details.reason: unsupported, too_large, unreadable, no_text, reference_gone)
- `401`: Missing or invalid session/token (code unauthorized)
- `403`: Authenticated but not permitted (code forbidden; details.reason private_beta or role)
- `404`: Not found or not visible to the caller (code not_found)
- `409`: Refused for now (code conflict; details.reason: plan_building, plan_dismissed, plan_empty, refines_used, figma_connect, archived, stale)
- `429`: Too many requests (code rate_limited; details.reason mode_rate, daily_budget, provider_busy); see Retry-After
- `501`: Not available on this server (code not_configured; details.reason capture_off, figma_off, migration_pending)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
