Pages

Update an existing page

Changed on
put/api/pages/{id}

Request

  • Base URL
    http://localhost:3013
  • URL
    http://localhost:3013/api/pages/{id}
  • Auth
    HTTP bearer

Path parameters

idstring required

Request body

keystring

Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.

titlestring
descriptionstring nullable
contentType'text/html' | 'application/json' | 'image/svg+xml'
authMode'public' | 'authed' | 'password'
passwordstring nullable
bodystring
needsCredentialsstring[] nullable
themestring nullable

Theme preset id that restyles the whole page. One of: hive, meadow, iris, rose, cobalt, ember, carbon, paper, github, vscode, material, solarized, tokyo, monokai, gruvbox, catppuccin. Omit to follow the viewer's theme. Pass null on update to clear it.

designVersioninteger

Design system version. 2 is the swarm design system and the default for new pages. 1 is the original look that older pages keep. Omit on update to keep the stored value.

Response

Page updated

idstring required
keystring required

Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.

versioninteger required
ignoredTokensstring[]

Theme tokens the importer ignored. A bare name is outside the token contract. Other entries give the reason, for example --font-sans (references --font-geist-sans) or --ring (in .card). Absent when none were ignored.

designVersioninteger required

The design version the page has after the update. An omitted designVersion keeps the stored one, so an older page stays on 1.

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the new image/svg+xml enum value to the request property