DocumentationMarkdown editionagents.md

The page model

Every field on a page, its type and limits, and which endpoint sets it.

A page is one JSON document. POST /api/agent/pages takes the fields under page; PATCH /api/profiles/{id} takes any subset of the same fields; GET /api/profiles/{id} returns them all plus the read-only ones.

FieldTypeNotes
usernamestring, 3–30, [a-z0-9-]The subdomain. Set at creation; not changed over the API.
displayNamestring ≤ 60Shown as the heading. Empty falls back to @username.
biostring ≤ 300One or two sentences. Also the page's meta description.
avatarstorage key or nullFrom POST /api/upload. Never a URL — see Images.
avatarFocus{ x, y } percent or nullWhere the round crop is anchored; centre when absent.
templateIdone of ten idsSee Templates. Default editorial.
layoutlist or gridgrid shows link cards two abreast, best with images. Default list.
headerAlignleft, center, right or nullnull uses the template's own alignment.
theme.accent#rrggbbAccent colour for buttons and marks. Optional.
theme.backgroundImagestorage key or nullKind background from the upload route.
theme.backgroundFocus{ x, y } percent or nullWhere the full-bleed crop is anchored.
theme.overlaynumber 0–1Darkening over the background image so text stays legible.
pageLocalelocale codeLanguage of the page's own UI strings. See Languages.
isPublishedbooleanOff means the address answers 404 to everyone but the owner.
utmbooleanAppend utm_source=tapmy etc. to outgoing links. Default off: it rewrites someone else's URL.
blocksarray ≤ 80The content. See Blocks.

Read-only fields

FieldMeaning
idThe page id used in /api/profiles/{id}.
moderationStatusok, review or banned. A banned page cannot be edited (403 banned).
createdAt, updatedAtISO timestamps.

Full example

{
  "displayName": "Studio Kōri",
  "bio": "Ceramics from a small studio in Kyoto. Shop opens the first Sunday of each month.",
  "templateId": "whisper",
  "layout": "grid",
  "headerAlign": "center",
  "theme": { "accent": "#2B4C7E" },
  "pageLocale": "en",
  "isPublished": true,
  "blocks": [
    { "type": "link", "label": "Shop", "url": "https://kori.example/shop", "path": "shop", "featured": true },
    { "type": "link", "label": "Workshops", "url": "https://kori.example/workshops", "note": "Two Saturdays a month" },
    { "type": "socialRow", "items": [ { "platform": "instagram", "url": "https://instagram.com/studiokori" } ] }
  ]
}