---
title: "Live editing: what the editor shows (pages and their sections, theme, languages, pictures) and the edit version"
method: GET
path: "/builder/sessions/{sessionId}/edits"
tags: ["Builder"]
---

# Live editing: what the editor shows (pages and their sections, theme, languages, pictures) and the edit version

`GET /builder/sessions/{sessionId}/edits`

## Request

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

## Path parameters

- `sessionId` string, uuid, required

## Response `200`

The editor state

- object
  - `available` boolean, required
  - `reason` 'archived' | 'not_ready' | 'no_pages' | 'null', nullable, required: Why editing is not available (null when it is)
  - `version` integer, required
  - `pendingChanges` integer, required
  - `defaultLang` string, required
  - `languages` string[], required
  - `siteTheme` 'light' | 'dark', required
  - `routes` object[], required
    - `id` string, required
    - `path` string, required
  - `pages` object[], required
    - `id` string, required: Route id (src/site.ts routes)
    - `path` string, required
    - `file` string, nullable, required: Its page file, when the editor could find it
    - `contentKey` string, nullable, required: Its entry in src/content/<lang>.ts
    - `editable` boolean, required: Sections can be added, moved and removed
    - `sections` object[], required
      - `index` integer, required
      - `component` string, required: Hero, FeatureGrid, …; "custom" for anything the editor cannot name
      - `contentKey` string, nullable, required
      - `loc` string, required: line:column of its JSX in the page file
      - `hidden` boolean, required
      - `mobileHidden` boolean, required
      - `props` object, required: Literal props: variant, tone, columns, align, layout, reverse, …
      - `spacing` 'sm' | 'md' | 'lg', required
      - `preview` string, nullable, required: Its heading or first words, for the Layers list
    - `aliases` string[]: Its own addresses in other languages (localized URLs), e.g. /meny
  - `theme` object, required
    - `light` object, required
    - `dark` object, required
    - `shape` object, required
    - `rhythm` object, required
    - `fontPairing` 'modern' | 'editorial' | 'elegant' | 'friendly' | 'bold' | 'classic' | 'reading' | 'expressive' | 'playful' | 'technical' | 'geometric' | 'sturdy' | 'null', nullable, required
  - `assets` object[], required
    - `uploadId` string, uuid, required
    - `src` string, required: The picture's address on the site, e.g. /assets/team-3f2a9c1d.webp
    - `width` integer, required
    - `height` integer, required
    - `alt` string, nullable, required
    - `source` 'upload' | 'openverse' | 'ai', required
    - `license` object, nullable, required
    - `variants` object[], required
      - `src` string, required
      - `width` integer, required
    - `createdAt` string, required: ISO-8601 timestamp
  - `imageGeneration` boolean, required: AI pictures can be generated on this server
  - `freePhotos` boolean, required: The free CC0 photo search is available
  - `previewing` string, nullable, required: The version (turn id) the preview shows read-only, editing off meanwhile (null: the current files)

## Other responses

- `400`: Invalid request (code invalid_request; details.reason: invalid, unmappable, not_found, secret_detected, unsupported, too_large, unreadable)
- `401`: Missing or invalid session/token (code unauthorized)
- `403`: Authenticated but not permitted (code forbidden)
- `404`: Not found or not visible to the caller (code not_found)
- `409`: Refused for now (code conflict; details.reason: turn_running while the AI changes the site, stale when the files changed since the editor loaded them (details.version: the current one), previewing_version, archived, in_use)
- `429`: Too many changes at once (code rate_limited); see Retry-After
- `501`: Not available on this server (code not_configured)

---

[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)
