Content API reference

The content API is how a person or AI assistant changes a Moseik website. You author per-site content (HTML, CSS, JS, theme tokens); you never touch platform code. Every change is versioned, validated by a safety gate, classified, audited, and made reversible.

Base URL: your platform host (e.g. https://api.moseik.app). Request and response bodies are JSON unless noted. Errors are application/problem+json with a machine-readable code.

Authentication

  1. POST /v1/auth/token with { "clientId": "...", "clientSecret": "..." } → { "token": "..." }. Short-lived, scoped to one site.
  2. Send Authorization: Bearer <token> on every subsequent call. The site is carried by the token, so you never pass a tenant id and cannot reach another site.

Keep the client secret out of chat logs and prompts.

The same token works as the bearer on https://api.moseik.app/mcp. An MCP connection can reach several sites: list_sites names them, and you pass one as site on every other tool call (required when there is more than one). Every answer ends by naming the site it acted on.

Draft websites: build first, the human claims it

POST /v1/drafts { "businessName", "vertical"?, "landing"? } needs no token. It returns 201 with tenantId, a private previewUrl, a single-use claimUrl, expiresAt and a credential for that one site. The site starts from the self-serve template with the name filled in.

Sites created as a copy

A site can start as a copy of another one: a draft from POST /v1/drafts and a site a human starts in the dashboard are both copies of the starter template. Each of its assets then has one version authored by duplicate, so the [cross-writer rule](#writes-that-remove-another-writers-lines-are-refused) and the [deleted-lines guard](#writes-that-delete-live-content-are-refused) would ordinarily refuse replacing it. Both stand down for your first write to each asset, while the copy has no custom domain serving: replace the starter page, stylesheet or script wholesale, with no acknowledgment.

A copy is kept out of search results until it has a domain of its own, and its contact record starts empty: set it with PUT /v1/site { "contact": … }.

The single-writer lease

Only one writer may edit a site at a time. Take the lease before editing.

It lasts 300 seconds, and every successful write extends it. A session that crashes or pauses longer than that frees the site on its own.

A write with no live lease is 409 lease.required. Re-acquire the lease and retry; re-reading the payload will not help. A write while someone else holds it is 409 lease.held, naming them (heldByLabel) and when it expires.

sinceYourLastWrite briefs you on acquisition. It is null if this credential has never written here, otherwise { yourLastActivityAt, otherWrites, otherWriters, latest: { by, at, action } | null, changed: [{ action, pageId, route, by, at }], changedMore }. otherWrites: 0 means nothing moved while you were away. changed[] names the assets other credentials touched, one entry per asset, newest first, capped at 20 (changedMore counts the rest). Re-read exactly those before you edit.

If you keep local copies, read this first

The platform is the source of truth. A local copy of a page is a cache, and it goes stale without telling you. Another session, another agent, or the owner on their dashboard may have edited the site since you last read it.

If-Match does not protect a stale copy. It proves you read the current _version id_, not that your _content_ is based on it. So this sequence "works" and destroys the newer version:

PUT /v1/pages/:id/payload   (If-Match: an old id)   → 409 version.conflict
GET /v1/pages/:id                                   → grab the new id, ignore the payload
PUT /v1/pages/:id/payload   (If-Match: the new id)  → 200, live content overwritten

When you get a 409 version.conflict, re-read the payload and apply your change to what came back.

The sync protocol

Every session, before you edit anything:

  1. GET /v1/pages — cheap, no payloads. Every page carries latestVersionId (the CAS base for its next write) and publishedVersionId (what is serving).
  2. Compare each latestVersionId against the id you recorded when you last took that local copy.
  3. Any page whose id differs has changed since you last saw it. Treat your local copy as wrong, not as a starting point.

Send latestVersionId, not publishedVersionId. They coincide only for a page with no unpublished draft; otherwise the published id is a stale base and the write is refused with version.conflict.

If you never recorded the ids, GET /v1/pages?include=payload returns every page's live payload plus the payloadVersionId it came from. Store that id next to each local copy and step 1 works from then on. ?ids=a,b,c narrows it to specific pages, which is also how you continue when a response comes back truncated: true (it names the leftovers in omittedPageIds).

Then, on every write: send If-Match: <payloadVersionId>, the id the content you edited actually came from, not one you re-fetched afterwards.

Knowing whether live is still yours

Every content read reports who wrote what is live, and when:

GET /v1/stylesheet -> { css, pageId, latestVersionId, lastWrittenBy, lastWrittenAt, ... }

lastWrittenBy is a credential id, and you know your own, so the check is one comparison:

if (live.lastWrittenBy && live.lastWrittenBy !== myClientId) {
  // someone else has written since you last synced: re-read and merge
  // BEFORE building a write on a base you never saw.
}

Both fields are on /v1/stylesheet, /v1/script, /v1/chrome (per section), /v1/pages/{id}, /v1/partials, and /v1/pages?include=payload rows. They are null when nothing has been written yet, never absent. The plain /v1/pages index omits them.

This is the early warning; the refusals below are the late ones. Every line-shaped write response also echoes replaced, the { versionId, createdBy, createdAt } of the version it superseded (null on a first write), on the success body and on the version.conflict, write.destructive_overwrite and write.unguarded_truncation refusals.

Reading a previous version

Every versioned asset (a page, and the singleton stylesheet, site script and chrome sections) exposes its history through the pages routes:

GET /v1/pages/{pageId}/versions             -> [{ id, editClass, state, createdBy, createdAt }, ...]
GET /v1/pages/{pageId}/versions/{versionId} -> { payload, ... }

For a singleton, take pageId from that asset's own response (GET /v1/stylesheet returns it). This is how you recover content an overwrite removed, and how you fetch a common base to merge against.

?version= on a content read (/v1/stylesheet, /v1/script, /v1/chrome, /v1/pages, /v1/pages/{id}) is refused with 400; the error body's versionsPath names the route that works.

...and to these docs

Your copy of the documentation goes stale the same way. GET /docs/versions.json:

{
  "docsVersion": "447141db0a26",
  "docs": [{ "slug": "api", "title": "…", "hash": "0f5ec0ff4da0", "bytes": 47918, "url": "/docs/api.md" }]
}

Store docsVersion. Unchanged means nothing changed anywhere. Changed means compare each doc's hash against sha256(your copy).slice(0, 12) to see which ones moved, then read the changelog for what changed. Every /docs route also emits an ETag and honours If-None-Match.

Writes that remove another writer's lines are refused

When you were not the last writer of an asset, the platform takes the lines that entered it since your own last version of it (all of them, if you have none) and refuses a write whose payload removes any of them: 422 write.cross_writer_overwrite. The refusal names the other credential (lastWrittenBy, lastWrittenAt), how many lines the write removes (deletedLines, the count the deleted-lines check below uses), how many of those are theirs (droppedForeignLines) and a sample. When deletedLines is over 20 it also carries alsoAcknowledge, the second acknowledgment the retry will need.

To remove another writer's work deliberately, resend with X-Mk-Overwriting-Writer: <their credential id>. The id is in the refusal and on every content read.

The owner edits too

A site's owner can change text and images on a page from their dashboard. Each change publishes at once as a version authored by dashboard:<siteId>, with no lease and no hold, so your next write to that page meets If-Match and this rule. Re-read, carry their change into your copy, and resend. Acknowledge it with X-Mk-Overwriting-Writer only when the owner asked you to undo their change. When a version of yours is waiting for approval, the owner edits that draft instead: their change is held on top of yours, and publishing or discarding it settles both. The owner can also change the business details under Site details, so read GET /v1/site before stating what is on file.

Writes that delete live content are refused

A wholesale write (PUT /v1/stylesheet, /v1/script, /v1/chrome/:section, a page payload, a partial) is checked for content it deletes before anything is stored. If it removes more than 20 lines that are live right now and are not in what you sent, it is refused with 422 write.destructive_overwrite.

A line that is live several times and comes back fewer times counts each lost copy, up to three per distinct line. Lines are compared trimmed, and lines of two characters or fewer are ignored. This runs whether or not you sent If-Match, and net size tells you nothing: a write can grow a file while destroying lines.

The refusal names the count, the current latestVersionId, a sample of what would be lost, and the exact pair to send back:

{
  "code": "write.destructive_overwrite",
  "detail": "…deletes 35 lines that are live right now…",
  "deletedLines": 35,
  "latestVersionId": "ver_…",
  "acknowledgeWith": { "header": "X-Mk-Deleting-Lines", "value": "35" }
}

To proceed deliberately, resend the identical request with acknowledgeWith.header: acknowledgeWith.value. Read the pair off the refusal rather than assembling it. Every acknowledgeable refusal has this shape: write.destructive_overwrite (the line count), write.cross_writer_overwrite and write.cross_writer_fields (the credential id whose work you are overriding), and redirect.overwrite_existing (same).

To read every removed line, rehearse the write: with ?dryRun=1 (or dryRun on an MCP write tool) either refusal carries removedLines, each line once with how many copies go.

The usual fix is to re-read the asset, merge the lines you had not seen, and send the merged result.

What happens if you DON'T send If-Match

The singletons (stylesheet, script, chrome, partials, the 404 page) return latestVersionId on every read; the stylesheet and script also emit it as an ETag. Sending it back as If-Match is optional there (a page payload write requires it), and a quoted ETag or * is accepted. Chrome and partials are inlined into every page that uses them, so a stale overwrite there spreads site-wide from one write.

you sendresult
If-Match matching latestVersionId (or *)proceeds
If-Match that is stale409 version.conflict, nothing overwritten
no If-Match, and the write grows or editsproceeds, with a write.unguarded advisory in warnings
no If-Match, and the write deletes ≥ 40% of it422 write.unguarded_truncation, refused
no If-Match, on a site with require_if_match428 precondition.required, refused

write.unguarded_truncation carries previousBytes, submittedBytes, removedFraction and latestVersionId. It never fires on a first write or on an asset under 2 KB. To delete that much on purpose, send If-Match: a current version id is proof you read the live copy first.

require_if_match (tenant or global setting, off by default) turns the header into a hard requirement.

Errors carry a fix, not just a diagnosis

Every 4xx is application/problem+json with a machine-readable code, a human detail saying what went wrong, and a remediation saying what to do next:

{
  "title": "Conflict",
  "status": 409,
  "code": "version.conflict",
  "detail": "The page changed since you read it.",
  "remediation": "Someone else wrote since you read. GET /v1/pages/:id/versions/:vid for the current payload, merge your change onto it, and re-send with the new base — do not re-push your local copy over the top."
}

Read remediation before deciding a request is impossible. A refused file upload means that file did not qualify, not that the platform cannot take uploads.

A few codes carry no remediation. That means there is nothing you can change: a server-side failure, or a capability absent from the whole deployment. Report those rather than reshaping the request to get past them, and never substitute your own implementation of a platform capability that is temporarily unavailable.

A refusal's STATUS tells you whether retrying can ever work

A payload write refusal falls into one of two families, and the status is the split:

Branch on code for the remedy; branch on the status to know whether a retry is even the right shape.

codeStatusWhat is actually wrongWhat to do
version.conflict409your base moved — or your If-Match is missing or * (the detail says which)re-read the PAYLOAD, apply your change to it, resend
lease.required409you hold no live lease; if you took one, it expiredPOST /v1/lease again and retry. Your version id was never the issue
lease.held409another credential has the pen (heldByLabel)wait for expiresAt, or say who is editing. Don't spin
page.archived409the page is retired behind a redirect or tombstonecreate a page at the freed route instead
write.cross_writer_overwrite422your payload removes lines another writer addedmerge the lines the response names, resend
write.destructive_overwrite422your payload drops >20 live lines that appear nowhere in itre-read, merge, resend
write.unguarded_truncation422no If-Match, and the write deletes ≥ 40% of a shared assetre-read, confirm you meant it, resend with If-Match
write.cross_writer_fields422your PATCH changes title/meta fields another writer setleave theirs at current values, or acknowledge by name

On a page payload write, If-Match may be the bare version id or a quoted ETag ("ver_…", W/"ver_…"); * is refused, because it asserts only that the page exists.

The author a refusal names may be ours

duplicate, onboard and system are platform actors, not other agents, so a refusal names them with a description: onboard (the starter content this site was created with). X-Mk-Overwriting-Writer takes the bare id (onboard), never the description.

Onboarding no longer seeds content, so only a site onboarded earlier carries onboard-authored versions. Acknowledging is the correct move there; nothing clears with time.

Retrying with Idempotency-Key

Every write accepts Idempotency-Key: <unique string>. A key is remembered for 48 hours, and only writes that landed are stored: a replay comes back byte-identical with Idempotency-Replayed: true and mints no second version. So reuse one key across retries of the same write (a retry after a refusal really runs), and use a new key for a new write.

Write budget — and why you must not infer it

GET /v1/limits reports the caller's real budget right now, and consumes none of it:

{
  "buildMode": { "active": true, "reason": "no-live-domain", "effect": "…", "endsWhen": "…" },
  "frozen": false,
  "ownerCanLift": true,
  "rateLimits": {
    "write": { "used": 3, "limit": 30, "remaining": 27, "windowSeconds": 60,
               "windowResetsAt": 1785900000000, "enforced": false }
  },
  "autoFreeze": { "enforced": true, "mode": "build-backstop", "thresholds": {…},
                  "current": { "writesLastHour": 12, "rejectionsLastHour": 0 } }
}

Read enforced, not remaining. The rate limits apply only once a custom domain is serving:

KindLimitCharged by
read120 / minutereads, and every ?dryRun=1 rehearsal
write30 / minutecontent writes
publish10 / minutepublishing and confirming
page-create5 / hourPOST /v1/pages, and each POST /v1/pages/batch item

You do not have to poll for the transition. Every write response carries the current posture:

On a write responseMeaning
X-Mk-Build-Mode: active / endedthe posture right now, on every write — including a rejected one
warnings[].code = limits.build_mode_endedbuild mode ended since your previous write. Fires once per credential, and names the new caps
warnings[].code = limits.freeze_approachingyou are past ~75% of the freeze ceiling; the detail carries how many writes are left
warnings[].code = trial.expiredthe write is saved, but the site's free trial has ended and nobody can see it until a plan is chosen
X-Mk-Limits-Warningthe same codes, as a header, for a script that does not read the body

The warnings are appended to the gate's warnings array. On a refusal the problem body keeps its shape and only the headers carry the notice.

The auto-freeze is the constraint that matters, and it is not a throttle. After launch, more than 300 writes or 40 rejections in an hour freezes the site; in build mode the ceilings are 2000 and 500. autoFreeze.thresholds and autoFreeze.current give the exact numbers. A freeze needs a person to clear it and does not reset when the hour rolls over. A rejected write counts toward the rejection ceiling, so retrying a failing write in a loop is the fastest way to freeze a site. Build mode never unfreezes a site.

You cannot lift a freeze yourself. Anyone who can edit the site's pages can lift an auto-freeze from the notice on their dashboard (Resume changes), as can Moseik staff, so stop writing, tell the site owner what you were doing, and ask them to review and resume. A freeze staff set by hand is theirs to lift; ownerCanLift says which kind you have.

Rehearsing a write — ?dryRun=1

Add ?dryRun=1 to a supported write and it runs the identical path (sanitize, placeholder resolution, budgets, gate, render, SEO lint), returns the identical report, and stops before anything is stored:

200 { "dryRun": true, "status": "would-publish" | "would-hold", "editClass", "report", "warnings"? }

A payload that would be rejected returns the same 422 and report as the real call. A rehearsal leaves nothing behind (no version, publish, audit row or SEO fingerprint), is billed as a read, needs no If-Match and no lease, and works while the site is frozen. It shares the real code path, so its verdict cannot drift from the real one.

These routes rehearse:

RouteNotes
POST /v1/pages, POST /v1/pages/batch, PATCH /v1/pages/:id, PUT /v1/pages/:id/payloadno page created and no page-create budget spent
PUT /v1/stylesheet, PUT /v1/chrome/:part, PUT /v1/script, PUT /v1/theme, PUT /v1/notfoundvalidates, does not preview; no singleton is created
POST /v1/collections, PATCH/DELETE /v1/collections/:key, the three row writeswould-create / would-update / would-delete; a delete runs its in-use checks
PUT /v1/lead-webhook, PUT /v1/lead-webhooks/:nameevery check runs, including the allowlist; the only rehearsal Engage has

A theme rehearsal runs the schema and the WCAG contrast gate, which is a hard 422. A singleton rehearsal validates but does not render: only a page renders in the pipeline, so to see a stylesheet or chrome change, publish to a held page or use GET /v1/pages/:id/verify.

Everywhere else ?dryRun=1 is refused, never ignored: 400 dry_run.not_supported, with a supported array generated from the routes themselves, and nothing written. Do not retry without the flag; dropping it writes. Take the lease and write deliberately, or rehearse the page write the content ends up in.

Seeing what a page rendered — render=

Add render= to a page dry run to get the rendered output back:

render=adds to the response
classesrendered.classes — sorted, unique class names. A few hundred bytes
1 / true / htmlrendered.html — the whole rendered document
omittednothing; the response shape is unchanged

Both forms also carry rendered.bytes. On a singleton you get rendered.renderable: false and a reason.

Use classes to check a component's class contract. Validation confirms a component's data-* attributes, not the classes it emits: a dry run accepts data-columns="2" whether or not .mk-form--cols-2 is in the output. Check before styling any component you haven't styled before:

PUT /v1/pages/pg_…/payload?dryRun=1&render=classes
  → { "dryRun": true, "status": "would-publish",
      "rendered": { "renderable": true, "bytes": 4821,
                    "classes": ["mk-form", "mk-form--cols-2", "mk-form__field", …] } }

Discovery

It is content-addressed. The response carries a manifestVersion derived from its content plus a per-section hash in manifestFreshness.sections, and honours If-None-Match, so "has anything changed?" is one conditional request that usually answers 304. Compare the section hashes to see which part moved. manifestFreshness.buildTag is the deploy tag, reported separately so a no-op redeploy does not read as a content change.

forms.fieldTypes is the field-type vocabulary; never hardcode it. form is the set data-fields[].type accepts on <mk-component name="form">; collectionOnly (image, link) is what a collection schema may add and a form may not; formOnly (file) is the reverse. fileKinds lists what a file field's accept may name. Both derive from the renderer's own constants.

Pages

For a programmatic (template) page add "template": "city-landing", "primaryTopic": "homes:guelph", and optional "linkFromPageId". Template pages get a per-account-age velocity cap (429 seo.velocity) and thin / near-duplicate / cannibalization checks, which publish the page and come back as seo_gate.* warnings naming what to fix.

``json { "summary": { "requested": 3, "published": 0, "held": 2, "failed": 1, "skipped": 0 }, "results": [ { "index": 0, "route": "/about", "status": "held", "pageId": "pg_…", "versionId": "ver_…", "report": {…} }, { "index": 1, "route": "/team/", "status": "failed", "code": "page.route_trailing_slash", "detail": "…" }, { "index": 2, "route": "/contact","status": "held", "pageId": "pg_…", "versionId": "ver_…" } ] } ``

It is not atomic. A failed item leaves nothing behind, so its route stays free to retry; two items claiming one route resolve by order (the later gets page.route_taken). Each item is charged to the page-create budget as if sent alone; when it runs out the remaining items come back "status": "skipped", "code": "rate.limited". A 4xx on the call itself (batch.pages_required, batch.empty, batch.too_large) means nothing was created. Needs the lease. A dry run counts wouldPublish / wouldHold.

- Every PATCH mints a meta version, separate from payload versions, so the payload's latestVersionId never moves on a meta edit. GET /v1/pages/:id/meta-versions lists them with authorship; each row is a complete restore point. The page read reports metaVersionId / metaLastWrittenBy / metaLastWrittenAt. - If-Match is checked against metaVersionId when sent. Changing a field another credential set is refused (422 write.cross_writer_fields) naming the writer, the fields and their current values; resend with X-Mk-Overwriting-Writer to override. - meta.schema adds page-specific structured data (FAQPage, Service, Article), one object or an array of up to 8. Every page already carries WebSite, BreadcrumbList, and Organization/LocalBusiness built from the [contact record](#contact--the-business-details-search-engines-read), so a @type the shell already emits, or any business subtype, is refused (schema.shell_type). @context is filled in for you. See authoring. - meta.noindex: true asks search engines to drop the page and keeps it out of sitemap.xml, llms.txt and post lists; false undoes it. Engines take days to weeks to restore a page, so use it for pages that should never rank. On / it returns a meta.noindex_home warning. The preview host needs none: it is already noindex whenever the site has a domain of its own. - meta.canonical is refused (422 page.meta_staff_only); a wrong one silently moves ranking to another URL, so it needs Moseik staff. - meta.sitemap: false keeps a route out of sitemap.xml while it stays indexable (a thank-you page, a print variant). Everything else published is in the sitemap. A change answers "sitemapRebuilt": true. On a detail template either flag keeps every URL it serves out of sitemap.xml. - meta.publishedAt ("YYYY-MM-DD") makes the page an editorial post: it is what puts the page into <mk-component name="page-list"> and /feed.xml, and their order. A change answers "postIndexesRefreshed": true (feed rebuilt, every page-list page queued to re-render); null retires it from both without unpublishing. A route no page-list covers returns a post.not_listed warning. See authoring.

Warnings that publish clean and behave wrong

Read warnings, not just status. A would-publish or published means the page is _allowed_, not that it is _right_. Beside the SEO lint and off-site link report, the render-lint step names defects checked against the fully rendered document, so a height in your site stylesheet and a tab whose panel lives in a partial both count:

WarningWhat it means
render.map_no_height.mk-map / .mk-listings-map is on the page and no rule sizes it. The hook wraps an <iframe>, which collapses
render.listings_no_mapa filterable listing SEARCH page, or a listing DETAIL page, with no listings-map on it at all
render.reveal_never_visible.mk-reveal is hidden by CSS and no rule mentions .is-in-view, so nothing ever reveals it — invisible, not just unanimated
render.tab_without_panela data-mk-tab="x" with no data-mk-panel="x" — the tab renders, the click does nothing, nothing reports an error
render.panel_without_tabthe reverse: nothing can reveal that panel, so its content is unreachable
render.nav_without_menu_trigger.mk-nav with no [data-mk-menu], so there is nothing to bind open/close to. Fine for a flat nav of plain links

These are heuristics over your CSS, so they warn and never block. Checks that need a real browser (overflow, rendered image ratios, [hidden] with a box) are on GET /v1/pages/:id/verify.

On a detail template, the content checks read a bound sample. A parameterised route (/listings/:mls/:slug, /upcoming-events/:slug) has no page of its own, so before the SEO and render lints run the gate binds one representative row (for listings, the one with the most photos out of a sample) and measures that page:

WarningWhat it means
audit.bound_samplenames the URL and row the checks were measured against. One row, not every row
audit.unbound_*nothing could be bound, and why — no listings provider, feed down, no rows in their window
audit.bound_render_failedthe template rendered clean empty and failed with a row bound. Your page breaks on real data

After an audit.unbound_*, read every content finding as a finding about the placeholder; seo.h1_count becomes seo.h1_unbound_template. The stored page is always the unbound render.

Screenshots and verify

GET /v1/pages/:id/screenshot — a PNG of the page via Browser Rendering. ?version=ver_… for a specific draft, ?w= / ?h= for the viewport, ?fullPage=false to clip, ?y= to capture one viewport scrolled to that offset. See cloning. ?fullPage=false is required when judging a position: fixed overlay (an open lightbox, the consent banner, a sticky header): a full-page capture lays fixed elements out against the whole document.

Before capturing, the platform settles the page: lazy images forced to load, the document scrolled (and sideways inside every overflow-x scroller) so reveal-on-scroll sections show, content-visibility: auto subtrees forced to render, and it waits for fonts and for every image to decode. A blank area looks the same whether content is empty or unloaded, so check the headers rather than trusting the pixels:

headermeaning
X-Mk-Settledok if everything settled, partial if not — read this first
X-Mk-Imagesdecoded/total, e.g. 11/12. A shortfall means an image failed, not that the page lacks it
X-Mk-Fontsloaded/attempted faces, e.g. 4/4. A shortfall means text is in fallback faces — do not judge type from this capture
X-Mk-Fonts-Failedonly present on a shortfall: family weight status per errored face, e.g. Heading Sans 700 error
X-Mk-Fonts-Timeoutonly present if the faces hadn't finished loading inside the cap
X-Mk-Reveals-Forcedhow many .mk-reveal sections had to be revealed manually
X-Mk-Framesloaded/total iframes — a map region is an iframe, and X-Mk-Images does not cover it. ok requires these too
X-Mk-Boundonly on a parameterised route: which row this capture is of, or why none could be bound
X-Mk-Scroll-Yonly with ?y=: where the capture starts; less than y when the page is shorter

On partial the PNG still comes back; treat it as unreliable and retry before concluding anything about the design. X-Mk-Images counts images that decoded (a loaded but undecoded image paints nothing). X-Mk-Fonts counts faces that reached loaded, out of faces the page's text actually uses, so 4/4 on a site with six uploaded families is correct. A detail template captures one bound row, named in X-Mk-Bound (listing SK024909 — 34 photo(s)); with nothing to bind, the PNG is the detail component's empty placeholder.

GET /v1/pages/:id/verify — the same browser, returning findings instead of a picture. Not run on publish; costs no write and needs no lease. ?version=ver_… audits a held draft.

Accessibility, at 1280:

KeyWhat it reports
contrastcomputed WCAG-AA failures per element, with the measured ratio and what was required
contrastUnmeasuredelements whose colours could not be read, so their contrast was not checked — check these by eye
a11yimg_no_alt, no_accessible_name, unlabelled_control, no_focus_indicator — with the selector and a short detail

contrast covers every element with its own text, measured against the nearest painted ancestor; white on white reports 1.00:1. Text on a gradient is scored against its worst stop ("ground": "gradient"). Text over a background image, or over a positioned layer holding an image or overlay, is listed in contrastUnmeasured, so an empty contrast beside a non-empty contrastUnmeasured means the page was not fully checked. Not covered: text in a fixed header stacked over a hero, since the check walks ancestors, not overlapping elements.

no_focus_indicator (WCAG 2.4.7) focuses each focusable element and compares computed style, so outline: none with no replacement is caught. Any visible change satisfies it, and so does a :focus or :focus-visible rule. Capped low.

Render defects a screenshot cannot show:

KeyWhat it reports
overflowhorizontal overflow at 390 / 768 / 1024 / 1440, one entry per width that overflows, each naming the offenders widest-overshoot-first. A 1280 audit cannot see any of it
imagesrendered ratio vs the ratio the CSS declares (or the file's own, when none is declared), past a 6% tolerance — reported whatever the object-fit
hiddenelements marked [hidden] that still have a box, because a class rule setting display beats the UA stylesheet
brokenImagesimages that finished loading with no pixels (complete && naturalWidth === 0)
performancemarkup that stops PageSpeed measuring the page: snap_smooth_scroll is a scroller with scroll-snap-type and scroll-behavior: smooth, which leaves it no LCP
shareImagepresent only when the page sets no og:image, naming the image a link preview will use instead (fallback: { src, width, height }), usually the header logo
connectorPagingpresent only when a /__data/<connector> response declared more rows than it returned and the document has no way onward

For a share image, target a 1200x630 PNG or JPEG; Facebook and LinkedIn do not decode WebP. The write gate's seo.og_image_missing says the same on every page.

connectorPaging is measured from the response the page actually received: each finding names provider, returned, total and the request url. Row counts are read from total, totalCount, total_count, totalResults or count, rows from items, results, rows, data or records. It is silent when no count is declared or a <a rel="next"> or [data-mk-more] exists; listings (which has data-paging), places and sheet are excluded. A subset can be intended, but without a crawlable <a rel="next" href="?page=2"> the remaining rows never reach a search index.

summary carries a count per category plus overflowWidths, shareImage and one connectorPaging line per provider.

On a parameterised route, read audit before overflow. verify binds one row (the listing with the most photos out of a sample, or the first row inside its visibility window) and reports audit: { bound: true, route, boundTo }. With nothing bound, bound is false and note says why, and overflow: [] means nothing was measured.

Read settled before you trust any of it: images: "38/40", fonts, frames, revealsForced, ok. Forty brokenImages under images: "3/40" is one settle failure, not forty page defects.

Holding a change for approval

Every write publishes, unless you hold it. Nothing waits for Moseik staff. When a client wants to see a change before it goes live, hold that change:

POST /v1/pages           { "route": "/new", "title": "New", "payload": {…}, "hold": true }
PUT  /v1/pages/:id/payload?hold=1

Both answer 202: accepted, versioned, not published, with heldFor: "owner". Nothing serves at the route until it is approved: by you with POST /v1/pages/:id/publish, or by the site owner on their dashboard, where it waits with a preview, Publish and Discard. If the client says no, POST /v1/pages/:id/discard withdraws it for good.

A held write on top of a waiting draft replaces it as the draft that waits. Your next write without hold publishes as normal, and the held draft can then no longer be approved, because it would roll the page back. Hold every write until approval, or approve before writing again.

Showing the client what is waiting

The person approving may have no dashboard login, and the authenticated preview (GET /v1/pages/:id/versions/:vid/preview) is no use to them. Mint a link instead:

POST /v1/pages/:id/versions/:versionId/preview-link
→ { url: "https://theirdomain.com/__preview/…", expiresAt, versionState }

It renders that exact version on their own domain, opens with no credentials, lasts 14 days, and is no-store + noindex. The platform does not send it; you decide the channel. A screenshot of a version is GET /v1/pages/:id/screenshot?version=ver_….

Redirects — old URLs that have no page to archive

Retiring a page you published is the [archive](#pages) flow, which writes the 301 or 410 for you. This endpoint is for a path the site inherited from its pre-Moseik life (an old Squarespace or WordPress slug still linked from elsewhere) that 404s with nothing to archive.

GET    /v1/redirects                          → { redirects[], limit }
POST   /v1/redirects  { from, to, status? }   → 301 (default) or 302
DELETE /v1/redirects?from=/old-slug

from is an absolute path on this site, in one of three shapes:

GET reports each row's match (exact or subtree); delete one by the same spelling, ?from=/lakelodge/*.

to may be any of four things:

toNotes
/servicesA path on this site, resolved through the router — a collection row or listing URL counts.
/cabins#2-bedroomSame, with a fragment passed through to Location. /cabins → /cabins#x is a loop: the browser never sends the #.
/media/<id>An asset this site holds, for an inherited link to a PDF or a video. Checked against your own library.
https://booking.exampleOff-site, and only if that origin is active on this site's [allowlist](#external-origin-allowlist). https only, no credentials in the URL.

It refuses these writes, each of which would damage a live site quietly:

RefusalWhy
redirect.shadows_live_route (409)A published page already serves from. The router matches redirects before pages, so this would take a working page off the site with no error anywhere.
redirect.target_missing (400)Nothing is published at to. A redirect to a 404 is worse than the 404 it replaces — it launders a broken link into a working-looking one.
redirect.is_archive_gone (409)from is a 410 written by an archive. Overwriting it resurrects a URL someone chose to retire; deleting it turns that decision into a 404.
redirect.target_not_allowlisted (400)to is off-site and its origin is not active on this site's allowlist. Add it with POST /v1/allowlist, approve it, then write the redirect.

Changing an existing mapping is refused (409 redirect.overwrite_existing), naming the current mapping, its author (createdBy, null on rows older than authorship and acknowledged as the literal "unknown"), and when it was written. Re-pointing it needs X-Mk-Overwriting-Writer: <the author the response names>. Re-asserting the identical mapping is a no-op, and a permitted overwrite returns what it replaced. GET lists createdBy per row and marks archive-written rows source: "archive (gone)".

The 404 page

The body served for any URL this site does not have. Optional: with nothing published, the platform's own branded not-found page is used.

It is rendered with your header and footer, and publishing takes effect immediately. Give the visitor a way back. Three things stay the platform's:

Reverting to a state with nothing published brings the built-in page back. Do not create a real page at /404 instead: it is routable, indexable, in your sitemap, and nothing routes dead URLs to it.

Site-wide singletons stitched into every page: announcement + header above the body, footer below. Same lifecycle as a page; publishing one re-renders the site. Chrome payloads may use components, partials, and interactive hooks (e.g. a .mk-nav dropdown).

Site stylesheet

The per-site shared CSS, versioned and published like a page. Publishing it re-renders every page.

Knowing when the re-render has reached a page

The re-render is asynchronous: the PUT returns once the stylesheet is published, and pages catch up over seconds to minutes. Every served page says what it was rendered from:

HeaderIs
X-Mk-Stylesheet-Versionthe stylesheet version that render used
X-Mk-Page-Versionthe page version that render used
X-Mk-Rendered-Atwhen it was rendered, epoch ms

Poll the page until X-Mk-Stylesheet-Version equals the publishedVersionId the PUT returned, then screenshot. Do not compare served CSS against your local file: the platform rewrites url() in the stylesheet it inlines, so the bytes never match.

X-Mk-Stylesheet-Version is absent when the site has no published stylesheet, and on a page whose stored copy predates the header (it appears on that page's next render). Absent is not "not caught up yet"; don't poll forever. A per-request render (a filtered listings URL, a bound seller results page) carries no stamp.

Partials

Named HTML fragments referenced from pages via <mk-partial ref="…">.

Per-site JavaScript

Versioned JS served first-party at /__mk/site.js, under the strict CSP.

The script's (and stylesheet's) history is at GET /v1/pages/<pageId>/versions, using the pageId from the read. Read a version's raw payload before asking a person to confirm a revert.

Theme

The site's design tokens (colors, fonts, type scale, spacing, radius, gradients), with the same lifecycle as a page edit. You never write CSS here; the platform compiles the tokens to :root variables + @font-face.

A theme change publishes at once, re-renders every page and purges their caches.

Fonts

Pick vendored families in the theme (font.heading/body/mono). For a licensed font the platform doesn't vendor, bring your own:

Both writes need the lease and are refused 423 while the site is frozen.

Favicon

The image served at /favicon.ico on the site's own hostname. It points at an image already in the site's media library.

Every page already links /favicon.ico, so changing it re-renders nothing. Upload a square PNG or SVG with POST /v1/media first.

External-origin allowlist

Every page is first-party only until this site's list of third-party origins says otherwise. Each entry is an exact https origin and the CSP directives it may reach:

DirectiveLets the originApproved by
frameappear in an <iframe>nobody; active at once (frames are already allowed)
connectreceive fetch/XHR/WSa person, after a pending step (below)
formreceive a form submissiona person, after a pending step
imgserve imagesa person, after a pending step
fontserve fontsa person, after a pending step
scriptrun its code on the pagethe site owner only, always — not you, not Moseik
styleserve stylesheetsthe site owner only, always

The list also gates what the platform sends server-side for the site: a [lead webhook](#lead-forwarding--crm-and-webhook) or CRM destination needs its origin active for connect or form.

Caps: 20 active + 10 pending per site. The CSP is a response header, so an approval or removal takes effect on the next request.

A vendor's script tag

A pasted <script> snippet is refused by the sanitizer. Send its pieces instead, and the platform emits the tag on every page once the owner approves:

{
  "origin": "https://app.vendor.com",
  "directives": ["script", "connect"],
  "script": {
    "url": "https://app.vendor.com/widget.js",
    "attrs": { "data-account": "1234" }
  },
  "reason": "Chat widget"
}

url must be on the entry's own origin. attrs takes id and data-* only; the tag is always defer. Add separate entries for any other host the widget calls (often an API host on connect). Approving, changing or removing a tag re-renders the site.

Who approves — and why the approve call succeeding is not permission

script and style wait for the site owner on every site, live or not. Your POST returns 202, the owner is emailed a confirmation link, and the entry waits for them on the dashboard's Third-party services page. Your approve call emails them again rather than activating it, and Moseik staff cannot approve one either. Tell the owner what it is and why; do not retry.

connect, form, img and font land pending. :id/approve checks content:publish and nothing else, so it will work for you; that is not permission. On a live site it emails the owner to confirm instead. Before you call it:

  1. Name the exact origin to the person you are working for, and say what will be sent there.
  2. Get an explicit yes. The question is _"may this client's customer data go there?"_, and you cannot answer it for them.
  3. Then approve. If the answer is no, DELETE /v1/allowlist/:id.

Two exceptions skip the pending step, and you cannot grant either yourself: a first-party product origin (today https://api.hivoma.app, 201 with firstParty:true), and a site whose publish policy is {"external-origin":"auto"} (read it from publishPolicy on GET /v1/site).

Site configuration — GET /v1/site and PUT /v1/site

GET /v1/site is the site's readout: the contact record, locale, features, faviconAssetId, the lead recipients and buildRouting, domain readiness, plan, trial, capabilities, listings, analytics, reviews, marquee, team, todo, landingParams, publishPolicy, csp and permissionsPolicy. Read a setting back at the path you wrote it: every PUT /v1/site field is top-level here too. Unset is null, never absent.

Writing settings

PUT /v1/site takes any of these top-level fields. It needs the lease.

FieldSetsDetails
notifyEmail, notifyCc, notifyBccwho is emailed each lead[Who is emailed](#who-is-emailed--notifyemail-notifycc-notifybcc)
leadRoutingwhich person a lead goes toauthoring
landingParamsURL parameters kept for the session and added to leads[Reading leads](#reading-leads--get-v1leads)
contactthe business details search engines read[below](#contact--the-business-details-search-engines-read)
analyticsGA4, Meta pixel, Google Ads and the consent banner[Analytics](#analytics-ad-pixels--cookie-consent)
wendellthe Wendell chat widget[Wendell](#wendell-chat-widget)
marquee, teamthe brokerage or team session rule[Site products](#site-products--marquee-ensemble-signature)
llmsthe inputs to /llms.txt (whole-object replace)authoring
rootFilesanalytics.txt, ads.txt, app-ads.txt at the rootauthoring
searchVerificationGoogle and Bing ownership tokensauthoring
languages, untranslated, translationsmachine-translated copies of every pageauthoring

contact — the business details search engines read

PUT /v1/site { "contact": { "phone": "+1 306 555 0100",
                            "email": "hello@example.ca",
                            "hours": "Mon–Fri 9–5, Sat 10–2",
                            "name":  "Jordan Ellis Realty",
                            "address": { "street": "12 Main St", "city": "Regina",
                                         "region": "SK", "postalCode": "S4P 1A1",
                                         "country"?: "CA" },
                            "legalName": "Evoke Millwork Ltd.", "alternateName"?: "…",
                            "foundingDate": "1992",             // YYYY, YYYY-MM or YYYY-MM-DD
                            "areaServed": ["Saskatchewan", "Alberta"],
                            "sameAs": ["https://www.facebook.com/…"],
                            "people": [{ "name": "…", "jobTitle"?: "Owner",
                                         "founder"?: true, "sameAs"?: ["https://…"] }] } }
PUT /v1/site { "contact": { "hours": "Mon–Fri 8–6" } }   → changes hours, nothing else
PUT /v1/site { "contact": { "hours": null } }             → clears one field
PUT /v1/site { "contact": null }                          → clears the whole record

This record is the only source for the Organization/LocalBusiness structured data in the page shell; contact details that exist only as words on a page are invisible to search engines. A site with neither a phone nor an address emits plain Organization; one with a phone and no address emits a LocalBusiness with no location, so fill in the address and hours together with the phone.

GET /v1/site → contact reports the stored record, what the shell will emit and what is missing. The owner can also change it under Site details.

plan — the limits, before one refuses you

capabilities says whether each feature is on and why not. plan says which tier this is and what a higher one adds. Pages are unlimited on every plan.

FieldMeaning
restrictedRead this first. false ⇒ no plan gate applies to this site
id / labelthe tier, or null when the site has no subscription record
onPublicLadderfalse for a commercial arrangement — not a plan name to quote
includesgateable capability ids this tier includes
upgrades[]tiers above this one and what each adds. Never prices

restricted: false means nothing is limited, not "limits unknown". That is the state of nearly every site. Do not read a null tier as "assume the strictest one". There are no prices here; send the client to their billing tab.

trial, domainNeedsPlan, nextSteps — a site not on a plan

Every site not on a plan is on a 180-day free trial, however it was set up.

FieldMeaning
trial{ endsAt, daysLeft, expired }, or null when the site is on a plan
domainNeedsPlantrue ⇒ connecting the site's own domain needs a plan first
nextSteps[]{ id, label, url } dashboard links to give your human: choose_plan, connect_domain

When the trial ends the site goes offline, on its own domain too. Nothing is deleted, writes still work, and each write carries a trial.expired warning. Give your human the choose_plan link.

Capabilities — what this site can actually do

capabilities lists every platform capability this site could have, on or off. Each entry is { id, label, enabled, reason?, enabledBy, detail }; enabledBy says who can turn it on, often you (listings: [PUT /v1/listings/market](#mls-listings--get-v1listingsmls-lookup-and-put-v1listingsmarket) or [PUT /v1/listings/scope](#builder-inventory--get-v1listingsbuilders-and-put-v1listingsscope)).

reasonWhat it meansWhat to do
vertical_not_applicableThis kind of site never gets itBuild something else. Do not switch vertical to obtain it.
not_provisionedIt applies here, but is not set upRead detail and enabledBy; turn it on if they name you.
plan_not_includedThe site's plan does not include itA plan change, which is the owner's conversation.
killedStaff switched it off for this siteLeave it. This is a decision, not a fault.
platform_not_configuredThe platform is missing a prerequisiteReport it — it is our gap, not this site's.

The fair-housing gate (fairHousing) runs on realestate sites only and has no off switch. It scans page copy for discriminatory-preference language and nothing else: not form fields, the CRM, or what the business may lawfully ask. Treat a refusal as a copy problem to fix, not a phrasing to route around.

csp, permissionsPolicy, publishPolicy

Google reviews — /v1/reviews

The google-reviews component shows a place's reviews by a configured name; usage is in authoring. Choosing the place:

GET  /v1/reviews/places?q=Proof Digital Saskatoon   → { candidates: [{ placeId, name, address?, rating?, reviewCount?, mapsUrl?, … }], truncated }
POST /v1/reviews/place { "placeId": "ChIJ…" }        → 202 { status: "pending", proposed, detail }

MCP: find_google_place, propose_google_place. Both need content:edit; the search is a billed Google call and needs at least 3 characters (400 places.query_required). The proposal is held until the site owner confirms it under Settings → Site details; GET /v1/site → reviews.pending shows it until then. A Place ID Google does not know is 422 reviews_place.unknown_place. Confirm the candidate with your human first: a franchise name plus a city is not unique.

Media

Uploads and imports need no lease (each mints a new immutable asset), but a frozen site refuses them with 423, and every upload is audited.

ClassAcceptedSize limit
imagePNG, JPEG, WebP, AVIF, GIF, SVG25 MB
documentPDF, DOCX25 MB
videoMP4, WebM50 MB

A rejected file is no reason to send the client elsewhere: the owner's dashboard uploads through the same checks. Ask whoever briefed you for a different file.

Images are optimized on serve: resized to a 1920px cap and re-encoded to AVIF or WebP when the browser accepts one, then cached. This applies to a CSS background-image: url(/media/<id>) as to an <img>, so upload the largest version you have. ?w=<px> overrides the width (snapping to 320/640/960/1280/1920/2560); set it for anything displayed much smaller than full-bleed. Nothing is upscaled. <img> also gets a per-viewport srcset at render time.

Video is served from /media/<id> with HTTP range support, so the browser's native <video> can seek and stream. See authoring for the background-loop and player patterns.

Forms and leads — prove delivery, don't infer it

A form's failure is invisible from the authoring side. Every PUT, gate check, publish and screenshot succeeds whether or not a submission will ever be delivered, because delivery happens on the visitor's POST. Prove it with GET /v1/forms and a test submission.

Which forms the handler accepts — GET /v1/forms

Each entry gives the formKey, the component (block), whether it is page-scoped or site-wide, and declaredIn (a route, chrome:footer, or partial:<ref>). notify is the effective to/cc/bcc for that form, with from saying whether they came from the form's attributes or the site-wide block, plus a notifyWarning when to is empty. Read notify rather than combining form and site values yourself. Top-level buildRouting says whether those recipients receive anything yet.

nextOffset is the completeness field; check it. Page-declared forms are read 30 published pages at a time, so nextOffset is where the next window starts and null only at the end:

GET /v1/forms              → nextOffset: 30
GET /v1/forms?offset=30    → nextOffset: null   (complete)

Site-wide forms (chrome, partials) are in every window.

Testing a form — POST /v1/forms/:formKey/test

A synthetic submission through the real submit handler. Needs the lease and is charged as a write, because it stores a row.

POST /v1/forms/enquiry/test            { "pageId"?: "pg_…", "data"?: { … }, "sessionAgent"?: "<key>" }
POST /v1/forms/enquiry/test?notify=1   → also send the email and forward to every destination
POST /v1/forms/pg_…~enquiry/test       → the page-scoped key, as rendered

One key on several pages is several submit URLs, and a bare key exercises one of them. Name the page with { pageId }, or post to the page-scoped key pg_…~enquiry. A named page is read directly, so this reaches forms beyond the listing's scan window. sessionAgent stands in for the agent a visit is attributed to (see authoring).

{
  "ok": true,
  "reached": "stored",
  "stages": ["registered", "spam-checks", "stored", "notify-skipped"],
  "status": 200,
  "leadId": "lead_…",
  "instanceId": "pg_…~enquiry",
  "lead": { "stored": true, "isTest": true },
  "crm": { "forwarded": false, "note": "Not exercised…" },
  "fidelity": { "hiddenFieldsFrom": "served-object" }
}

Read reached, not just ok. It is the furthest rung reached, and a failure also carries nextStep:

reachedWhat it means
not-registeredthe handler cannot find the form in any published payload — publish what declares it
registereda spam check or field validation refused it; error is what a visitor would see
spam-checksit passed the spam checks but was not stored
storeddelivery works
notifiedthe email path ran too (?notify=1)

stages is a log, not a ladder: it also records outcomes that are neither progress nor failure (notify-skipped, notify-forwarded, crm-skipped / crm-synced / crm-failed), which never appear in reached.

crm.forwardedcrm.note says
truethe lead reached the configured destination
falsenot exercised (needs ?notify=1), none configured, or it failed

A configured destination that is failing is the case to watch for: leads are stored and not arriving.

With ?notify=1 the lead really reaches every recipient and destination, including an Engage agent's alerts, so send it through a form whose leads go to the business, such as an Engage recruit form. notify.sentTo, notify.buildRouted and notify.intended name where the email went.

How faithful it is:

Nothing to clean up. The stored row is real but marked isTest, and GET /v1/leads leaves it out unless you pass ?includeTest=1.

What the visitor's POST returns

A rendered form posts to POST /__forms/{pageId}~{formKey} (first-party; the page CSP pins form-action 'self'). You never build this URL. With Accept: application/json (what /__mk/forms.js sends) every outcome is {"ok":true} / {"ok":false,"error":"…"} with the same status, and success is 200; anything else gets the redirect:

ResponseMeaning
303 → ?submitted=1Accepted and stored. (200 {"ok":true} under Accept: application/json.)
400The submitted fields don't match the form's declared schema — check data-fields, including required.
404No form with that key was found for this site. The key comes from data-form-id (defaulting to the component name).
403Anti-abuse verification refused it — usually a page served from a render older than the current anti-bot token. Fix it by [re-rendering the site](#re-rendering-the-site-to-clear-a-403--you-can-do-this-yourself); never by removing hidden fields.
429More than 5 submissions per minute from one IP.

Rejections are alerted to the platform team, and a site with published pages and no lead ever captured is flagged.

Re-rendering the site to clear a 403 — you can do this yourself

A stale-token 403 needs the site re-rendered, and publishing either shared asset does that:

Re-render for a stale-token 403 and nothing else. Never re-push pages because the platform shipped a runtime change: /__mk/components.js is built from deployed code, so new visitors already get new behaviour.

Who is emailed — notifyEmail, notifyCc, notifyBcc

PUT /v1/site { "notifyEmail": "leads@…" } sets the site-wide lead-notification recipient (null clears it). Up to five comma-separated addresses; each gets its own copy, so one wrong address cannot cost the others their lead. Beyond five, use a distribution list on the client's own mail provider. notifyCc and notifyBcc take the same shapes and add a visible or a silent copy of every notification. A form overrides them with data-notify-email, data-notify-cc and data-notify-bcc.

The response echoes the fields at the top level; read them back there. They also appear under siteConfig.

Reading leads — GET /v1/leads

Captured submissions, newest first. ?page=<pageId> filters to one page; ?limit= (≤200) and ?offset= paginate; ?includeTest=1 includes test rows. An empty array on a site whose form has been live for a while is a bug, not a quiet week. Each lead: { id, formInstanceId, formKey, pageId, data, consent, createdAt }, plus:

POST /v1/leads/:id/release sends a held lead: clears held, then emails and forwards it. Needs content:edit and no lease. Returns { leadId, released: true }; a lead that is not held is 409 lead.not_held. The owner has the same action as "Not spam".

POST /v1/leads/:id/redeliver re-attempts a lead that failed to reach a destination. Body: none (every destination that failed), {"destination":"quotes"} (that one), or {"force":true} (override the skips below). Needs content:edit and no lease. You cannot rebuild the payload yourself, because the secrets are write-only.

{
  "leadId": "ld_…",
  "attempted": [{ "destination": "quotes", "provider": "webhook:quotes", "status": "synced", "ref": "…" }],
  "skipped": [{ "destination": "hubspot", "provider": "hubspot", "reason": "already delivered…" }],
  "crmStatus": "failed"
}

You usually will not have to call it. A retryable failure is re-attempted automatically at 30 minutes, then 1, 2, 4 and 8 hours, stopping 24 hours after the first failure. A lead that reaches the end stays failed and raises a lead-delivery-abandoned alert: fix the destination, then redeliver with {"force":true}. Terminal failures are never retried automatically.

Lead forwarding — CRM and webhook

When a site is connected to a destination, each submission is forwarded there in addition to being stored and emailed. The capability id is crm. A site may use any of these at once:

There is nothing to do in the page for any of them. Build forms as you otherwise would: no script, no embedded form, no fetch. connect-src is 'self', so a page-side integration never leaves the browser.

A Showroom-connected brokerage sends every lead to Showroom as well, whatever the form's data-lead-destination names, except inbox. See [Connecting the roster](#connecting-the-roster--put-v1roster-connector).

You wire the webhook yourself, at launch or later:

GET    /v1/lead-webhook
PUT    /v1/lead-webhook   { "url": "https://…", "secret": "…", "label"?: "…" }
DELETE /v1/lead-webhook

The URL's origin must already be active on the [allowlist](#external-origin-allowlist), so on a site that has never had one:

POST /v1/allowlist            { "origin": "https://hooks.zapier.com", "reason": "lead delivery" }
                              → 202 pending. Now ask your operator.
POST /v1/allowlist/<id>/approve
PUT  /v1/lead-webhook         { "url": "https://hooks.zapier.com/hooks/catch/123/abc",
                                "secret": "<16+ chars you also give the receiving end>" }

On a site whose publish policy is {"external-origin":"auto"} the first call lands active. Otherwise the approve call is yours to make but not yours to decide; see [who approves](#who-approves--and-why-the-approve-call-succeeding-is-not-permission). Once the origin is approved, repointing the path, relabelling, rotating the secret and removing the webhook are yours.

PUT /v1/lead-webhook does not probe the URL. A receiver that isn't built yet, or that requires a header the platform doesn't send, leaves a site that reads as configured and drops every enquiry, so build the receiving end first, then point at it, then send a test submission. ?dryRun=1 runs every check without storing anything.

The secret is write-only: sealed on arrival, with only a four-character hint coming back. Give the same value to whoever owns the receiving endpoint. Send { url } alone to change the destination without touching it.

Connecting the client's HubSpot

PUT /v1/crm-credential installs the client's HubSpot Private App token, so the site's leads become HubSpot contacts.

PUT    /v1/crm-credential   { "token": …, "confirmHubId"?: … }
DELETE /v1/crm-credential

The client creates a Private App in HubSpot (Settings → Integrations → Private Apps) with crm.objects.contacts.read and crm.objects.contacts.write ticked. Send them to Connected products in the dashboard to paste the token and account ID there, rather than asking for the token in chat. Install it yourself with the calls below only when they cannot sign in there.

The first call returns 428 on purpose. It carries hubId, the HubSpot account that token opens, and stores nothing. Show the client that number, ask them to confirm it is their account, and repeat the call with confirmHubId set to it. A token names a portal, so installing one chooses which HubSpot receives every lead this site collects; the confirmation is the client making that choice, and the number comes from HubSpot rather than from you.

Three refusals to expect, each 422:

CodeMeans
crm_credential.scope_too_broadthe token can reach more than contacts. Ask for a contacts-only one
crm_credential.scope_missingit cannot read or cannot write contacts, so the connector could not dedup or create
crm_credential.hub_mismatchthe confirmed account is not the one the token opens — wrong token, or the client has two

The token is write-only: nothing reads it back, here or anywhere, and only a four-character hint comes back. PUT again to rotate. DELETE disconnects — leads are still stored and emailed, and the field mapping survives, so reconnecting restores it.

Routing one form somewhere different from another

Everything above is fan-out: every form goes to every destination. When different forms need different destinations, give each destination a name and put the name on the form.

GET    /v1/lead-webhooks                 → every destination this site can route to
PUT    /v1/lead-webhooks/<name>          { "url": …, "secret": …, "label"?: … }
DELETE /v1/lead-webhooks/<name>

A name is lowercase letters, digits and hyphens, up to 32 characters; up to 10 per site. Each is gated on the allowlist and seals its own signing secret, so two vendors cannot forge each other's posts (a sheet destination holds no secret: the middleware behind it is the platform's own). Then name it on the form:

<mk-component name="form" data-form-id="auto-quote" data-lead-destination="underwriter">
<mk-component name="form" data-form-id="contact"    data-lead-destination="crm,team-inbox">

Routing to an individual agent — MoxiWorks Engage

provider: "engage" delivers each lead to a person: one agent's own MoxiWorks Engage dashboard, rather than the site's inbox.

PUT /v1/lead-webhooks/moxi {
  "provider": "engage",
  "defaultAgentId": "kent.braaten@century21.ca",  optional — who gets a lead that names nobody
  "agentField": "agentId",                        optional — which submitted field decides (default)
  "agentFromRouting": "email",                    optional — take the agent from lead routing instead
  "source": "brokerage-hub"                       optional — shown to the agent as the lead's origin
}

Nothing to obtain first. The platform holds the Engage key for Century 21 Canada and Coldwell Banker Canada, the endpoint is fixed in platform code, and neither needs an allowlist entry. apiKey is only for a site on a different Engage account. Rehearse the call with ?dryRun=1: every check runs and nothing is stored, which matters because Engage has no test mode.

The agent id is the agent's email address. Engage maps it to that agent's own dashboard, so there is no Moxi id to look up.

Which agent gets the lead. The form's agentField value wins; defaultAgentId catches anything that omits it. On a single-agent site, set the default and no form needs to carry anything. When Engage does not know the agent's id, the lead goes to defaultAgentId instead, with Meant for: <agent> in the contact note, and the delivery reports it as a note. With no default it fails.

On a brokerage site, set agentFromRouting: "email". Engage then follows leadRouting, which follows the agent whose page the visit reached (see Authoring), and sends that agent's roster email. Name the destination with data-lead-destination on consumer forms only. An agent with no email in the roster is not routable, so their leads go to the inbox and never reach Engage; GET /v1/roster counts.routable says how many can. agentFromRouting: true sends the routing KEY instead, which is right only where those keys are Moxi ids, never on a CREA-keyed roster.

On a site without routing, put the agent's id on their own page:

<mk-component name="form" data-form-id="enquiry" data-lead-destination="moxi"
  data-fields='[
    {"name":"agentId","type":"hidden","value":"kent.braaten@century21.ca"},
    {"name":"name","label":"Your name","type":"text","required":true},
    {"name":"email","label":"Email","type":"email","required":true},
    {"name":"message","label":"Message","type":"textarea"}
  ]'></mk-component>

With neither, nothing is sent. A submission with no agent is recorded as a failed delivery naming what to fix — never guessed at, and never sent to "some agent". Agent ids are matched exactly upstream because a brokerage has several people with the same surname, so a near-miss would file a real lead in the wrong person's CRM with no visible error.

Per-form filing. The owner sets these on the dashboard's Engage page, and they ride the same PUT:

{
  "group": "Website Lead",                  optional — the Engage group every lead joins
  "agentAlerts": false,                     optional — no Engage alert to the agent (Moseik emails them anyway)
  "forms": {
    "career-inquiry": { "recruit": true, "group": "Recruit" },
    "neighbourhood-news": { "send": false }
  }
}

Newsletter signups — Mailchimp

provider: "mailchimp" adds the person to one of the client's Mailchimp audiences. Build the signup as an ordinary form, not Mailchimp's embed.

PUT /v1/lead-webhooks/newsletter {
  "provider": "mailchimp",
  "apiKey": "…-us21",         required on first set; Account → Extras → API keys
  "audienceId": "a1b2c3d4e5",  Audience → Settings → Audience name and defaults
  "status": "pending",         optional — "pending" (default) or "subscribed"
  "fieldMap": { "how-did-you-hear": "SOURCE" },  optional
  "dc": "us21"                 optional — taken from the API key's suffix
}

Send the client to the dashboard for the key rather than asking for it in chat. They paste it under Connected products, which installs a destination named mailchimp; you then route the signup form to it. Use the call above only when they cannot sign in there.

No URL: the host is <dc>.api.mailchimp.com, where dc is the suffix of the API key. It is resolved and stored when you configure the destination rather than at the first lead, so the [allowlist](#external-origin-allowlist) origin is knowable up front — and a dc that disagrees with the key is refused there rather than authenticating against nothing.

Route it deliberately. Unlike a webhook, this destination must be named on a form:

<mk-component name="form" data-form-id="newsletter" data-lead-destination="newsletter">

A destination that received every form would put contact-form enquirers on a mailing list they never joined. That is the client's sending reputation and their CASL exposure, so PUT /v1/lead-webhook (the site-wide singleton every form falls back to) refuses this provider.

Event enquiries — Tripleseat

provider: "tripleseat" sends an enquiry to a venue's Tripleseat booking system. Build the enquiry form normally, not Tripleseat's embed.

PUT /v1/lead-webhooks/events {
  "provider": "tripleseat",
  "apiKey": "…",                   the venue's lead-form public key; required on first set
  "fieldMap": { "how-many": "guest_count" },  optional
  "source": "Weddings enquiry"     optional — prefixed to additional_information
}

There is no url — a call carrying one is refused. Leads go to Tripleseat's own endpoint, and the venue is identified by the public key, which comes from Settings → Lead Forms in their account and decides which lead form the enquiry lands on. Allowlist https://api.tripleseat.com before the first call. Something that sits in FRONT of Tripleseat — a relay, an automation — is provider: "webhook" instead.

Like Mailchimp and Engage it must be named on a form — the site-wide singleton refuses it, because a booking system should receive the event forms and not the contact form:

<mk-component name="form" data-form-id="weddings" data-lead-destination="events">
Tripleseat fieldField names recognised
first_name / last_namefirstName / lastName
email_addressemail
phone_numberphone
company_namecompany, organization
event_nameeventName
event_dateeventDate, date
start_time / end_timestartTime / endTime (use type: "time")
guest_countguestCount, guests, attendees
email_opt_inemailOptIn
gdpr_consent_grantedgdprConsent

Spreadsheets — Google Sheets

provider: "sheet" appends one row per submission to a client's Google Sheet. It is the way out to everything nobody has written a provider for: a sheet is one automation hop from HoneyBook, Zapier, Make or an Apps Script trigger.

The site owner connects it, not the agent. In the dashboard: Connected products → Google Sheets → Connect with Google, then they pick the spreadsheet in Google's own picker, choose a tab or create a new one (the default), and can switch on row matching (below) before connecting. The last screen can add a test row. Anyone who manages the site can change or disconnect any sheet connection from that card, whoever connected it and whatever it is named. The sheet stays private — nothing is shared by link — and the grant (drive.file) reaches only the sheet they picked. Connecting proves the signed-in account can edit that sheet and that the tab exists. The destination is named sheet:

<mk-component name="form" data-form-id="contact" data-lead-destination="sheet">

PUT /v1/lead-webhooks/<name> { "provider": "sheet", … } cannot create one (lead_webhook.sheet_needs_google). Once the owner has connected it, the agent may edit it — every edit is re-verified against Google with the stored grant:

PUT /v1/lead-webhooks/sheet {
  "provider": "sheet",
  "sheetId": "1bzGsnd9…",           the connected sheet, or one the owner picked
  "tabName": "Overview",            the tab's exact visible name
  "columns": {                      optional — field name → column header, in order
    "firstName": "First Name",
    "referral":  "How They Heard About Us"
  },
  "dateFormat": "us",               optional — "iso" (default) or "us" (12-05-2026)
  "timestampColumn": "Timestamp",   optional — UTC; defaults to "Timestamp"
  "formColumn": "Form Name",        optional: the form's data-form-id; defaults to "Form Name"
  "pageColumn": "Page URL",         optional: the page it was sent from; defaults to "Page URL"
  "matchColumn": "Email",           optional: update a matching row instead of adding one
  "matchMode": "fill",              optional: "fill" (default) or "overwrite"
  "testMode": "skip",               optional — "skip" (default) or "send"
  "label": "Enquiry log"            optional
}

A vendor's own fields — mapped webhook

provider: "mapped-webhook" POSTs each lead to a vendor endpoint in that vendor's own field names, unsigned. Use it when the receiver has a fixed contract and cannot check X-Moseik-Signature; for anything the client builds, the signed webhook is the right choice.

PUT /v1/lead-webhooks/indigo {
  "provider": "mapped-webhook",
  "url": "https://api.vendor.com/inquiry",
  "fields": {                       source → the receiver's key; nothing else is sent
    "first_name": "firstName",
    "email": "email",
    "@assignedTo.email": "agentEmail"
  },
  "fixed": { "owner_id": "1234" },  optional — sent on every lead; a mapped key wins
  "testMode": "skip",               optional — "skip" (default) or "send"
  "label": "Indigo Stride"          optional
}

A source is a form field name or one of @id, @site, @page, @form, @submittedAt, @consent, @test, @assignedTo.key, @assignedTo.email. An empty or missing source is left out. The URL's origin must be active on the allowlist for connect or form. The full submission is still stored in Moseik, so a field you did not map is not lost.

Whether a lead was delivered

The lead is stored before it is forwarded, and the visitor sees success either way, so an outage at a destination cannot break a contact form. Each lead carries the outcome: crm_status is synced, failed or pending (null when the site forwards nowhere). With more than one destination it is the aggregate (synced only when every destination took the lead), and deliveries[] reports each one:

{
  "crm": { "status": "failed", "attempts": 1, "error": "webhook: status 500 …" },
  "deliveries": [
    { "provider": "hubspot", "status": "synced", "ref": "701", "attempts": 1 },
    { "provider": "webhook", "status": "failed", "error": "status 500", "attempts": 1 }
  ]
}

A delivered entry can carry a note when it arrived other than as asked, such as an Engage lead filed under the default account. POST /v1/forms/:formKey/test?notify=1 reports a crm-* stage, so prove delivery end to end rather than assuming it.

Two things decide whether a lead lands in HubSpot (the webhook receives the submission as posted):

What the webhook sends

For a client's developer wiring up the receiving end:

POST <configured url>
Content-Type: application/json
X-Moseik-Timestamp: 1755302400
X-Moseik-Signature: v1=<base64url HMAC-SHA256 of "<timestamp>.<raw body>">
{
  "id": "lead_01K…",
  "site": "example.com",
  "siteId": "ten_01K…",
  "submittedAt": "2026-08-16T18:00:00.000Z",
  "page": "/contact",
  "form": "quote",
  "consent": true,
  "test": false,
  "assignedTo": { "key": "1520210", "email": "jane@brokerage.ca", "reason": "attributed" },
  "attribution": { "utm_source": "google", "utm_medium": "cpc", "landingPath": "/" },
  "data": { "name": "Dana Reid", "email": "dana@example.com", "message": "…", "photos": "roof.jpg" },
  "files": [
    {
      "field": "photos",
      "name": "roof.jpg",
      "url": "https://example.com/__files/…",
      "type": "image/jpeg",
      "size": 812345,
      "keptUntil": "2027-08-16"
    }
  ]
}

Changes the site owner confirms — GET /v1/pending-changes

On a site whose own domain is live, these writes do not apply at once. They answer 202 with status: "pending-owner-confirmation" and a pendingChange, and the site owner is asked to confirm or decline, by email and on their dashboard:

Until the owner clicks, leads keep going where they went before. A 202 is not a failure: do not retry it. Tell the person you are working for to look for the email.

false`). Install a new destination first, then point forms at it, and the owner confirms once.

GET /v1/pending-changes lists recent requests; GET /v1/pending-changes/<id> reports one as pending, applied, declined, expired, superseded or failed. A held page version the owner confirms is published only if no later edit has landed on that page; otherwise it reports failed, and the change must be requested again.

Listings

How listing grids, maps and detail pages render is in authoring. These are the calls that configure the feed.

MLS listings — GET /v1/listings/mls-lookup and PUT /v1/listings/market

A real-estate site turns MLS listings on itself (MCP: find_mls_keys, set_mls_listings).

GET /v1/listings/mls-lookup?agent=Karen%20McGuffin        (or ?brokerage=…)
  → { "candidates": [ { "name": "KAREN DANA MCGUFFIN", "agentKey": "1520210",
        "officeKey": "277619", "suggestedListings": { "province": "Ontario", … } } ],
      "truncated": false }

PUT /v1/listings/market   { "province": "Ontario", "officeKey": "277619", "agentKey": "1520210" }
  → { "changed": true, "enabled": true, "rerender": "queued", "listings": { … } }

Builder inventory — GET /v1/listings/builders and PUT /v1/listings/scope

A site that sells its own new-construction homes, or shows EvryList rentals, resale or commercial listings, configures them itself (MCP: find_listing_builders, set_listings_builders).

GET /v1/listings/builders?q=Fraser
  → { "builders": [ { "orgId": "org_7Kd2", "builder": "Fraser Homes", "lots": 42,
                      "cities": ["Saskatoon"], "sample": "902 Spadina Crescent E, …" } ] }

PUT /v1/listings/scope   { "orgIds": ["org_7Kd2"] }
  → { "configured": true, "builders": ["Fraser Homes"], "lots": 42,
      "province": "Saskatchewan", "rerender": "queued" }

listings.gridProblems lists published grids that stay empty or show the wrong thing whatever the feed holds, each { route, code, detail }, and is absent when there are none. listings.evrylist_not_connected: a grid has data-source="evrylist" and the site has no EvryList scope. listings.kind_unsupported: data-kind is not a kind or a list of rental, resale and commercial (the grid falls back to new construction), or it is on a grid reading the MLS feed, which ignores it.

EvryList listings stay current on their own

Don't republish a page to show a new or edited listing. Every 15 minutes each site's EvryList listings are re-read and the site re-renders when they changed; EvryList can also push a change (POST /v1/integrations/evrylist/changed, EvryList's endpoint, not yours), which updates every site showing that org in about a minute. On MLS, a removed listing answers 410 within 5 minutes of the feed reporting it, and a grid showing a changed listing re-renders within about 15.

The feed budget — listings.license and POST /v1/listings/provision

The property feed rate-limits per license key, and a site that has not been provisioned shares one budget with every other Moseik site, so another brokerage's traffic surfaces here as slow or missing listings. The platform provisions a site itself when it gains listings, and retries within six hours if that fails. You only need the endpoint while listings.license still reports fleet.

POST /v1/listings/provision      → { "provisioned": true, "alreadyProvisioned": false,
                                     "keyHint": "…a1b2" }

It is idempotent and safe to retry. You never receive the key, only a four-character hint. Nothing else changes: the next feed read authenticates as this site.

originownBudgetWhat it means
tenanttrueThis site has its own budget. The intended state; nothing to do.
fleetfalseStill on the shared budget. The platform retries within six hours; call the endpoint above to do it now.
fleet_after_decrypt_failurefalseThe site has a key and the platform cannot read it. Report this — it is a platform fault, and the site is silently back on the shared budget.
nonefalseNo license available at all on this deployment. Report it; feed reads will be rejected.

503 listings_license.provisioning_unavailable means the platform has no provisioning credential yet; the site keeps working on the shared budget, and no retry helps. 409 listings_license.exists_upstream means a key was issued that the platform does not hold; it needs a person and must not be retried.

Collections

Author-managed lists whose rows outlive the page that shows them: events, offers, testimonials, activities. The client edits rows; nobody edits a page. Rendered by collection and collection-detail.

A collection's schema is the same field-list JSON a form's data-fields takes, parsed by the same validator, with the types in the manifest's forms.fieldTypes: the form types plus two only a collection has, image and link (and no file). Each rejection says which surface a type belongs to.

Collection-only typeValueRenders as
image/media/<asset id>, optionally ?w=<px><img class="mk-collection__image">
linka site path, a full https:// url, mailto:, tel: or sms:<a class="mk-collection__cta">

Both take an optional companion naming another declared field that supplies the row's text: altField on an image, labelField on a link. A misplaced one, or one naming a field the schema does not declare, is rejected. See Pictures and links on a card.

An image value must name an image this site has uploaded (POST /v1/media or POST /v1/media/import first). The only off-site values accepted are our own Cloudflare Images account and CREA's photo CDN. An id that was never uploaded, or one belonging to a document or video, is refused.

All six writes [rehearse](#rehearsing-a-write--dryrun1).

Visibility bounds take an instant (an ISO timestamp with an offset, or epoch milliseconds), never a bare date. "2026-09-30" is refused: read as UTC it would expire the row early for everyone west of it. That rule is for visibleFrom / visibleUntil only. A date or time field you display may hold text ("Every Friday"), and the row writes warn rather than refuse when it holds a timestamp:

WarningWhat it means
collection.date_not_a_datea date field holds an ISO timestamp (2026-06-25T19:00:00-06:00), so it renders as that literal string — no <time class="mk-date">, no parts to style
collection.time_not_a_timea time field holds a whole timestamp rather than a clock time (19:00), so it renders as that literal string — no <time class="mk-time">, no parts to style

The delete is refused while the collection is in use, naming what holds it:

Still thereWhat to do first
any rowDELETE …/rows/:id each
a published page rendering itremove the component, republish
a partial or a chrome sectionsame — and chrome means every page renders it
the detail template <base>/:slugarchive that page

Rows are not cascaded, so each row delete keeps the whole row in the audit trail. The detail template carries no data-collection (it is bound by route), so a search for the key misses it.

Roster and integrations

Site products — Marquee, Ensemble, Signature

A real-estate site made from a product template is one of three kinds. The product is not a field; what differs is which member source and session rule the site has, all readable on GET /v1/site:

ProductForMembers come fromSession rule
Marqueea brokeragethe Showroom [roster](#the-brokerages-agent-roster--get-v1roster), synced into the roster collectionmarquee: true (/__mk/marquee.js)
Ensemblean agent teamthe site's own team listset by team (/__mk/ensemble.js)
Signatureone agentnone: every lead goes to notifyEmailnone

{ enabled }`.

The hooks the session scripts fill, and building agent pages, are in authoring; finishing a site from a product template is in playbooks.

The brokerage's agent roster — GET /v1/roster

On a brokerage site, the people leads are routed _to_. This is the only place that says which routing key belongs to which person.

GET /v1/roster
{
  "configured": true,
  "routingKeyField": "creaId",     // the field whose value leadRouting resolves on
  "counts": { "total": 84, "routable": 43, "withBio": 9, "withHeadshot": 84 },
  "partial": false,                // true → the list is NOT the whole brokerage
  "duplicateCreaIds": [],          // keys two records share; fix them in Showroom
  "skipped": 0,                    // records that did not parse; non-zero is worth reporting
  "withoutCreaId": 2,              // agents with no CREA id: no page, no leads; set one in Showroom
  "agents": [
    {
      "creaId": "1520210",         // the key leadRouting resolves on
      "displayName": "Jane Doe",
      "title": "Associate Broker",
      "email": "jane@brokerage.ca",
      "phone": "+13065550100",
      "headshotUrl": "https://…",
      "profileSlug": "jane-doe",   // already page-ready
      "bio": "…",                  // absent for most agents
      "communitiesServed": ["Nutana"],
      "socials": { "website": "https://…", "evrylistReferralUrl": "https://…" },
      "routable": true             // false → can have a page, cannot receive a lead
    }
  ]
}

The same records sync into the platform-managed roster collection every 15 minutes, which is what agent pages are built from. Its rows and schema refuse writes (409 collection.managed); GET /v1/collections reports it with managedBy: "roster", and you may set only its name and detailBasePath. The key roster is reserved on every site. POST /v1/roster/sync runs the sync now (needs the lease) and answers its counts (added, updated, expired, …), or configured: false. A new headshot reaches the site's media within seconds; one replaced at the same URL is not picked up.

Setting a brokerage up start to finish is one procedure in Authoring.

Connecting the roster — PUT /v1/roster-connector

PUT /v1/roster-connector connects the brokerage's Showroom account, which supplies the agent roster and receives every lead. The client copies two values from Showroom → Admin → Settings → Developer → Your website: the Account ID (acct_…) and the Secret (64 characters, hidden until they press Show).

PUT /v1/roster-connector { "brokerageAccountId": "acct_…", "secret": "…" }
→ 428 { "code": "roster_connector.confirm_brokerage",
        "brokerageName": "Century 21 Fusion", "agents": 84, "routable": 43 }

PUT /v1/roster-connector { "brokerageAccountId": "acct_…", "secret": "…",
                           "confirmBrokerage": "Century 21 Fusion" }
→ 200 { "configured": true, "brokerageName": "Century 21 Fusion",
        "counts": { "total": 84, "routable": 43 }, "secretHint": "…3f9a" }

Nothing is stored until the second call. Show the client the name from the 428 and ask them to confirm it is their brokerage; don't just echo it back yourself. The secret is write-only. On a live site the second call answers 202 and waits for the owner's emailed confirmation.

422 roster_connector.rejected_by_showroom means the two values don't belong together: a typo, two brokerages, or a secret that has since been replaced. A 503 means Showroom could not be reached, and resending is safe. To rotate, send the same call with the new secret. DELETE /v1/roster-connector disconnects.

Once connected, every lead the site takes is also sent to the brokerage's Showroom lead list, whatever the form's data-lead-destination names (except inbox). It shows in deliveries[] as webhook:showroom. Don't add a destination for it.

Other connected services

Wendell chat widget

wendell: true adds the Wendell chat launcher to every page of the site.

PUT /v1/site { "wendell": true }    → every page loads the platform-served widget loader
PUT /v1/site { "wendell": false }   → removes it
GET /v1/site                        → { wendell: { enabled, usage } }

The loader is /__mk/wendell.js, served first-party, so it needs no allowlist entry. Each change re-renders the site (rerenderQueued); writing the current value returns unchanged: true and re-renders nothing. It draws a launcher only when the URL carries ?wendell, then for the rest of that browser tab, and the launcher opens an iframe on https://wendell.bot/widget. The owner's dashboard shows the same chat as a "Make changes with Wendell" button.

Local area data

Reference data for a neighborhood or community page, and for deciding which areas an agent should focus on. All GET, all content:read, none of it touches the site — so none of it is affected by a write freeze or the lease.

RequestReturns
GET /v1/areas?name=Cathedral&lat=50.4452&lng=-104.6189{ areas[], total, notes[] } — boundary candidates
GET /v1/areas/:boundaryId{ area, partOf[], demographics, lifestyles[], market, sold, coverage, … }
GET /v1/areas/rank?lat=&lng=&layer=neighborhood{ ranked[], skipped[], method, notes[] }

Optional: layer (neighborhood, micro-neighborhood, city, postal-code, area-level-1, area-level-2, school-attendance-area), limit, and on a profile lifestyleLimit and soldInterval (ISO 8601, default the trailing twelve months).

Resolve a place with /v1/areas first — boundary ids are opaque, and results come back alphabetically rather than by relevance, so the first row is not the best match. Pass lat/lng to disambiguate.

coverage is the field to read first. The vendor answers 200 with zeros for data it does not hold, so an absence and a finding look identical without it. Canadian sold data is board by board — Calgary and Victoria yes, Toronto, Vancouver, Regina and Saskatoon no — and schools are absent; a sold count of 0 is a coverage gap, and notes[] says so. The semantics, the display obligations that ride on attributions, and what the ranking does and does not mean are in authoring.

503 service_unavailable naming LIVEBY_API_KEY means the deployment is not configured for this at all — a platform secret, not something a site can turn on.

These endpoints are for deciding and for prose. To put the figures ON a page, use the components — neighborhood-stats, community-map and market-trends, which fetch and render server-side so the numbers are in the HTML a crawler sees. Read them in authoring. Use /v1/areas to resolve the boundary id they take, and /v1/areas/rank to decide which neighbourhoods deserve a page at all.

There is no trend endpoint here: month-by-month sold figures are available only through the market-trends component, which also applies the coverage test that decides whether a trend is worth drawing at all. /__data/areas/<id>/map.png is the same-origin map image the community-map component emits — it is not an endpoint to call directly.

PUT /v1/site { "analytics": { "ga4MeasurementIds": ["G-ABCD1234", "G-WXYZ5678"],
                              "metaPixelIds": ["123456789012345"],
                              "googleAdsIds": ["AW-123456789"],
                              "consentBanner"?: true,
                              "privacyPolicyUrl"?: "/privacy" | "https://…" | false,
                              "termsUrl"?: "/terms" | "https://…" | false } }
PUT /v1/site { "analytics": null }        → removes all of it
GET /v1/site                             → { analytics: { enabled, … } }

A pasted gtag or Meta pixel snippet cannot work: the sanitizer rejects a <script> in your HTML, and analytics is not an allowlist entry. This setting is the route. Any one kind alone is valid, and a site's CSP gains only the hosts its own settings earn.

What the platform does with it: serves a first-party /__mk/analytics.js, shows one consent banner for every provider, and fetches neither gtag.js nor fbevents.js until a visitor accepts, so a decline collects nothing. It adds the vendors' origins to the site's CSP (script/connect/img only) and re-renders the site (rerenderQueued). The owner is emailed when analytics is switched on (ownerNotice says when that waits for launch), and the change is audited.

The banner links the privacy policy and terms, by default /privacy-policy and /terms-and-conditions, each rendered only while a published page exists there. privacyPolicyUrl / termsUrl override with a site path, an https:// URL, or false to remove the link; other forms are 422 analytics.consent_link_invalid. The response's consentLinks reports whether each will render.

Styling the banner: .mk-consent, .mk-consent__text, .mk-consent__actions, .mk-consent__accept, .mk-consent__decline, .mk-consent__link; token-driven defaults ship in the base layer. It is a fixed overlay that takes the pointer, so a control under it is unclickable. Its live height is on :root as --mk-consent-height (0px once dismissed, unset with no banner, so read var(--mk-consent-height, 0px)); the base layer already pads body and scroll-padding-bottom with it. Use it wherever your layout reserves bottom space itself.

window.mk.consent: .reopen() for a "Cookie settings" link, .get() for the choice, .set("granted") for a site with its own banner, and .measurementIds, .metaPixelIds, .googleAdsIds.

consentBanner: false suppresses the platform banner for a site that has its own. Nothing loads until the site calls window.mk.consent.set("granted"); consent becomes the site's responsibility.

The dashboard preview is not a visit. There neither the banner nor the tags run; gtag, fbq and window.mk.consent exist but send nothing.

Expect lower numbers. Visitors who decline are not counted; tell the client before they compare.

Custom event tracking — what you would have used GTM for

window.gtag / window.dataLayer and window.fbq exist from page load, whatever the consent state:

// island — no consent check, no feature detection, no try/catch
document.querySelector(".book-viewing")?.addEventListener("click", () => {
  window.gtag("event", "generate_lead", { method: "book_viewing" });
  window.fbq("track", "Lead", { content_name: "book_viewing" });
});

Events fired before a visitor accepts are queued and sent when they do; on a decline the queue is discarded.

Each global exists only when its id is configured. On a site with no Meta pixel, window.fbq is undefined and calling it throws. GET /v1/site → trackingGlobals says what this site has.

Custom events, conversions, ecommerce parameters and user properties are ordinary gtag("event", …) calls in your site JS. GA4 enhanced measurement (scroll depth, outbound clicks, file downloads, site search) is automatic.

Not available: any other ad platform's pixel (LinkedIn, TikTok, Pinterest, X); those origins stay blocked by the CSP and need a platform change. Nor is there server-side conversion forwarding: a lead is a browser fbq("track","Lead") from your island or nothing.

Reading the numbers

Reading the site's Google Analytics

GET /v1/analytics reads the site's GA4 reports once the owner has connected Google Analytics.

GET /v1/analytics?report=overview&startDate=28daysAgo&endDate=yesterday&limit=10
GET /v1/site → { analytics: { reporting: { connected, property, needsReconnect } } }

MCP: get_site_analytics. Scope content:read.

The site owner connects it, not the agent. Dashboard → Connected products → Google Analytics → Connect with Google, then they pick the GA4 property. Until then the call answers 409 analytics.not_connected. Connecting also sets the site's measurement id from that property when the site has none; an id already set is left alone.

Reports are a fixed set: overview (the default), trend (per day), pages, landing-pages, channels, sources, devices, locations and events. Dates are YYYY-MM-DD, NdaysAgo, yesterday or today. The response carries totals, rows (metric values as numbers) and rowCount.

Numbers are read from Google when asked and never stored. Visitors who decline the consent banner are not counted, so say so when quoting totals.

409 analytics.reconnect_needed means the owner's Google permission lapsed, and 409 analytics.property_access_lost means their account lost access to the property. Both need the owner; retrying will not help.

Domain readiness — is the site actually reachable?

A finished site is not a live site. A client's own domain serves only once the platform has a Cloudflare custom hostname for it; without one the domain returns 522 however correct the client's DNS is. GET /v1/site is how you check:

{
  "domainsReady": false,
  "hostnames": [
    {
      "hostname": "acme.moseik.app",
      "isPrimary": false,
      "status": "active",
      "ready": true,
      "blocking": [],
      "detail": "Served by the platform zone route — no custom hostname needed."
    },
    {
      "hostname": "acme.ca",
      "isPrimary": true,
      "status": "failed",
      "ready": false,
      "blocking": ["custom_hostname_missing"],
      "detail": "No Cloudflare custom hostname exists for this domain, so the edge cannot route it — requests WILL fail with 522 even when DNS is correct."
    }
  ]
}

Never tell a client their site is live while domainsReady is false. A site with no domain of its own yet: give your human nextSteps.connect_domain, or [ask the owner to buy one](#buying-a-domain). A domain that is attached but blocked: report its detail to Moseik. You cannot clear a blocker, so don't retry, and don't tell the client to change DNS that is usually already right.

status — the reconciled lifecycle

status is reconciled against Cloudflare every 15 minutes and on every domain change, so trust it without a live check:

statusmeaning
activeServing.
pendingProvisioned; Cloudflare is still validating. Self-resolves — no action needed.
failedWill not serve and will not self-resolve. Needs the platform team.

blocking — why a hostname is not ready

valuemeaning
custom_hostname_missingNo Cloudflare-for-SaaS custom hostname. Hard blocker — will not self-resolve; Moseik has to fix it.
custom_hostname_pendingProvisioned; Cloudflare is still validating. Resolves itself once the client's CNAME resolves.
custom_hostname_failedCloudflare reported the hostname as failed. Moseik has to recreate it.
provisioning_unconfiguredThis environment cannot set up domains at all. Platform-team fix.

Why the site you're building might be noindex

Neither case is a page setting, so editing meta.noindex changes nothing:

  1. **You are looking at the *.moseik.app preview host of a site with a domain.** The canonical points at the real domain.
  2. The site was [created as a copy](#sites-created-as-a-copy) and has no domain yet. It clears itself when the copy gets its own domain.

The preview address

A *.moseik.app preview host is always ready, so domainsReady can be false while the preview works; share the preview URL in the meantime. A new site's preview address is random words (eager-beaver.moseik.app). The owner can change it from their dashboard, and you can with PUT /v1/site/address { "label": "harbour-bakery" } (content:publish, inside your lease). It returns { from, to, changed, url } and re-renders the site. Read the address from GET /v1/site each time; an old address redirects to the current one for 30 days, and no other site can take it until then.

Buying a domain

You can find a domain and ask the owner to buy it; you cannot spend money or register one yourself. Paying is the owner's approval.

GET  /v1/domains/search?q=smithrealty            → { query, results: [{ domain, available, price?, notOffered? }] }
POST /v1/domains/requests { "domain": "smithrealty.ca" }
                                                 → 202 { id, domain, status, price, requestedAt, expiresAt, sentTo, emailed }
GET  /v1/domains/requests                        → { requests: [{ id, domain, status, price, requestedAt, expiresAt }] }

MCP: find_domain, request_domain, list_domain_requests.

A domain needs a plan, even during the trial (domainNeedsPlan).

Inviting people to the dashboard

POST /v1/invitations { "email", "role", "landing"?, "offer"?, "message"? } (MCP: invite_person) emails the person a link (7 days; 14 for a buyer) to this site's dashboard and returns it as link, with emailed saying whether the email went.

Site to-do list — work another Proof product asked for

Another Proof product (Hivoma, Wendell) can queue a request against this site once the client has connected it from their dashboard. The to-do list is the only place that request exists. GET /v1/site (MCP: get_site) reports todo: { pending, claimed, oldestPendingAt }; when pending is above zero, work the list before anything else.

GET  /v1/integration-requests?status=pending      MCP: list_todo
GET  /v1/integration-requests/<id>/fields         MCP: get_todo_fields
POST /v1/integration-requests/<id>/status         MCP: set_todo_status

Every item names who asked (requestedBy) and carries a framing line. An item is a request to weigh, not an approved change; your writes go through the gate as usual. The kinds are a closed list:

kindMeaningFiled by
intake-formBuild the form a product's intake template describesA product
noticeSomething changed; no action requiredA product, Moseik
taskPage work a product asks forA product, Moseik
reviewMoseik changed something on this site; check it, tell the customerMoseik only

A notice, task or review payload is { title, bodyMd, data? }. A notice may go straight to done; everything else is claimed first.

An intake-form payload carries intakeTemplateId, destinationName for the form's data-lead-destination, and optionally suggestedRoute, placement and label. The template id is not a field list, so ask for the fields:

GET /v1/integration-requests/<id>/fields
→ { fields: [...], dataFields: "[…]", warnings: [...] }

dataFields is ready to paste onto <mk-component name="form" data-fields="…">, mapped to Moseik field types, with the product's identity fields (__email__ and friends) already folded in; a form without __email__ would fail every delivery. A question with no Moseik control (a time or date range) refuses the template, naming it (integration.template_unbuildable); report that as your failed detail. warnings names anything that arrived richer than it renders, such as help text; repeat it back. The route is a hint: choosing the page and writing the copy is the judgement being asked for.

When the customer later edits that template's questions, Moseik updates the form's data-fields itself and files a review naming what changed, keeping fields you added. If it cannot apply the change it files a task with the reason.

Claim before you start. {"status":"claimed"} stops a second agent building the same form; claiming an already-claimed item is integration.status_conflict. Then report:

BodyMeaning
{"status":"done","route":"/auto-insurance","formKey":"auto-quote"}Landed. Both are required.
{"status":"failed","detail":"no page to put it on"}Gave up. detail is required.

The customer sees what you send back. Reporting needs no lease. Rehearse with ?dryRun=1, respect the [page-create limit](#write-budget--and-why-you-must-not-infer-it) on a live site, never force past a human's lines (write.cross_writer_overwrite), and prove the form registered with GET /v1/forms before reporting done.

Edit classes

When you write, the platform classifies the change. Every class publishes; nothing waits for Moseik staff. When something looks wrong the write still lands and the response carries warnings.

classwhat it isoutcome
copyvisible text changed, structure didn'tpublishes
structurethe tag/attribute skeleton or the CSS changedpublishes
page-createa new pagepublishes; a template page may carry seo_gate.* warnings
themedesign tokenspublishes
sensitive-fieldsa protected detail changed — NAP/contact (phone, email, address)publishes, and emails the site owner a one-click undo

A sensitive-fields write returns ownerNotified: true | false, with an ownerNotifyBlocked reason on false, usually that the site has no notifyEmail. It publishes either way; set notifyEmail rather than retrying.

Not holds, but exceptions:

A minimal edit loop

POST /v1/auth/token           → token
POST /v1/lease                → hold the writer lease
GET  /v1/pages                → find the page id
GET  /v1/pages/:id            → current payload + latestVersionId
PUT  /v1/pages/:id/payload   (If-Match: latestVersionId)   → published or held
GET  /v1/pages/:id/screenshot → eyeball the result

Work in small, validated steps. If a write is rejected, the code (and the version's validation report) names exactly what to fix.