Pages

Create a new page

Changed on
post/api/pages

Request

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

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.

slugstring
titlestring required
descriptionstring
contentType'text/html' | 'application/json' | 'image/svg+xml' required
authMode'public' | 'authed' | 'password'
passwordstring
bodystring required
needsCredentialsstring[]
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 created

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.

version1 required
api_urlstring required
app_urlstring 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 of the new page: 2 unless the body set designVersion: 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 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