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
POST /v1/auth/tokenwith{ "clientId": "...", "clientSecret": "..." }→{ "token": "..." }. Short-lived, scoped to one site.- 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.
- No
Authorizationheader. Sending one is refused401 draft.key. - Limits: three drafts a day from one address (
429 draft.ip_limit), then the usual write and publish ceilings. An unknownverticalis422 draft.vertical, naming the accepted list. - Private: the preview host is unguessable and noindex. Forms refuse submissions until the site is claimed.
- Claim: the human opens
claimUrl, signs up or signs in, and confirms. The site moves into their account, the 180-day trial starts, and your credential keeps working for as long as you hold it. It shows under AI assistants, where they can disconnect it. Tell your human that to keep editing in any later conversation they connect you over MCP from AI assistants → Connect. landing: the first dashboard page after claiming, from the same names as an [invitation'slanding](#inviting-people-to-the-dashboard). Omit it for Home; anything else is400 draft.landing.- Expiry: unclaimed after 30 days, the draft is deleted.
GET /v1/site→draftsays whether it is claimed and when it expires. Hand overclaimUrlwhen you get it. - Own domain: needs a paid plan, even during the trial. Say so before the build.
- Over an MCP connection:
start_draft { businessName, vertical? }returns the samepreviewUrl,claimUrlandexpiresAt, plussite, and no credential: the draft joins your connection and you build it by passingsite. If someone other than the person who connected you claims it, it leaves your connection.
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.
- Once per asset. After your own first version lands, the ordinary rules apply.
duplicateonly. A revert or another credential's work is never exempt.- It ends when the domain goes live. From then on a blind replacement is refused with
422 write.cross_writer_overwritenamingduplicate. Merge onto a fresh read, or resend withX-Mk-Overwriting-Writer: duplicate. The duplication baseline is a version, soPOST /v1/pages/:id/revertputs it back.
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.
POST /v1/lease— acquire it. The response carriesexpiresAtandsinceYourLastWrite(below).GET /v1/lease— who holds it:{ held, youHoldIt, holder, holderLabel, expiresAt, expiresInSeconds, ttlSeconds }. Ask before a long build instead of finding out from a refused write.POST /v1/lease/renew— keep it alive during a long session.DELETE /v1/lease— release it when you finish. Until it expires, the next writer is refused.
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:
GET /v1/pages— cheap, no payloads. Every page carrieslatestVersionId(the CAS base for its next write) andpublishedVersionId(what is serving).- Compare each
latestVersionIdagainst the id you recorded when you last took that local copy. - 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.
- Editing their line is not removing it. A line you wrapped, re-indented, split, gave an attribute to, or otherwise rewrote still counts as present, so restructuring an asset passes.
editedForeignLinesreports how many lines the rule matched this way. - A merged copy passes free. Being second is not the offence; destroying unseen work is.
- There is no threshold. Removing 2 of someone else's lines is refused exactly like removing 200. Authorship is the variable, not size: probing by truncating N lines gives a wrong answer.
If-Matchdoes not waive it. A freshIf-Matcharound stale content is exactly what this catches.- "Yours" means present in your own last version of this asset, under this credential. On an asset you have never written, every live line is foreign. System versions (a revert, seeded content) count as foreign too.
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 send | result |
|---|---|
If-Match matching latestVersionId (or *) | proceeds |
If-Match that is stale | 409 version.conflict, nothing overwritten |
no If-Match, and the write grows or edits | proceeds, with a write.unguarded advisory in warnings |
no If-Match, and the write deletes ≥ 40% of it | 422 write.unguarded_truncation, refused |
no If-Match, on a site with require_if_match | 428 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:
409, concurrency. Somebody else moved. You do something (re-read the asset, wait for a lease) and the same write then succeeds.422, content. The bytes you sent are the problem. No retry, fresh version id or waiting clears it. Merge the content, or acknowledge the loss by name.
Branch on code for the remedy; branch on the status to know whether a retry is even the right shape.
code | Status | What is actually wrong | What to do |
|---|---|---|---|
version.conflict | 409 | your base moved — or your If-Match is missing or * (the detail says which) | re-read the PAYLOAD, apply your change to it, resend |
lease.required | 409 | you hold no live lease; if you took one, it expired | POST /v1/lease again and retry. Your version id was never the issue |
lease.held | 409 | another credential has the pen (heldByLabel) | wait for expiresAt, or say who is editing. Don't spin |
page.archived | 409 | the page is retired behind a redirect or tombstone | create a page at the freed route instead |
write.cross_writer_overwrite | 422 | your payload removes lines another writer added | merge the lines the response names, resend |
write.destructive_overwrite | 422 | your payload drops >20 live lines that appear nowhere in it | re-read, merge, resend |
write.unguarded_truncation | 422 | no If-Match, and the write deletes ≥ 40% of a shared asset | re-read, confirm you meant it, resend with If-Match |
write.cross_writer_fields | 422 | your PATCH changes title/meta fields another writer set | leave 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:
| Kind | Limit | Charged by |
|---|---|---|
read | 120 / minute | reads, and every ?dryRun=1 rehearsal |
write | 30 / minute | content writes |
publish | 10 / minute | publishing and confirming |
page-create | 5 / hour | POST /v1/pages, and each POST /v1/pages/batch item |
- While no custom domain is serving (build mode) they are suspended entirely and
usedstops advancing. - They come back the moment a domain starts serving, automatically. No call ends build mode, and the trigger is usually a DNS cut-over someone else made, so a local tally is wrong in both directions.
- Domain search has its own limit of 10 a minute in every mode.
You do not have to poll for the transition. Every write response carries the current posture:
| On a write response | Meaning |
|---|---|
X-Mk-Build-Mode: active / ended | the posture right now, on every write — including a rejected one |
warnings[].code = limits.build_mode_ended | build mode ended since your previous write. Fires once per credential, and names the new caps |
warnings[].code = limits.freeze_approaching | you are past ~75% of the freeze ceiling; the detail carries how many writes are left |
warnings[].code = trial.expired | the write is saved, but the site's free trial has ended and nobody can see it until a plan is chosen |
X-Mk-Limits-Warning | the 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:
| Route | Notes |
|---|---|
POST /v1/pages, POST /v1/pages/batch, PATCH /v1/pages/:id, PUT /v1/pages/:id/payload | no page created and no page-create budget spent |
PUT /v1/stylesheet, PUT /v1/chrome/:part, PUT /v1/script, PUT /v1/theme, PUT /v1/notfound | validates, does not preview; no singleton is created |
POST /v1/collections, PATCH/DELETE /v1/collections/:key, the three row writes | would-create / would-update / would-delete; a delete runs its in-use checks |
PUT /v1/lead-webhook, PUT /v1/lead-webhooks/:name | every 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 |
|---|---|
classes | rendered.classes — sorted, unique class names. A few hundred bytes |
1 / true / html | rendered.html — the whole rendered document |
| omitted | nothing; 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
GET /v1/manifest— the capability surface: the page-payload shape + placeholder syntax, the headless components (+ theirdata-*), interactive hook classes, reuse mechanisms (stylesheet/partials/chrome), fonts, embeds, budgets, and the theme font/scale ranges. Read it to learn what's available; read the docs for how to use it.
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
GET /v1/pages— list pages: id, kind, route, title, status,latestVersionId,publishedVersionId,template,updatedAt.?include=payloadadds every page's live payload and itspayloadVersionId;?ids=a,b,cnarrows. See [If you keep local copies](#if-you-keep-local-copies-read-this-first).GET /v1/pages/:id— a page plus its currentpayload({ html, css? }) andlatestVersionId.POST /v1/pages— create a page:{ "route": "/about", "title": "About", "payload": { "html": "…", "css"?: "…" }, "meta"?: {…} }. New routes only (409on a taken route). The first version publishes immediately; send"hold": trueto have the site owner approve it first. Rehearses with [?dryRun=1](#rehearsing-a-write--dryrun1).
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.
POST /v1/pages/batch— create up to 20 pages in one call. Body is{ "pages": [ …the same object you would POST to /v1/pages… ] }. Read the per-item result, not the HTTP status:
``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.
POST /v1/pages/:id/route— change a page's address. Body{ "route": "/new-address" }: lowercase words and hyphens, not starting with a language code,/mediaor/fonts. The page moves with its history. If it is live, its old address and each translated copy's 301 to the new ones in the same write. An address another page holds is refused withpage.route_taken, naming it. The reply'slinkedFromlists pages, header and footer still linking to the old address; they work through the redirect, but update them. The home page and pattern routes can't move. MCP:move_page.
PATCH /v1/pages/:id— fix the title or meta of an existing page. Body is a partial:{ "title"?: "…", "meta"?: { "description"?: "…", "ogImage"?: {…}, "sitemap"?: false, "schema"?: {…}, "publishedAt"?: "2026-08-16", "noindex"?: true, "listingSource"?: "evrylist", "listingKind"?: "rental" } }.nullclears a field; an absent key is left alone, andmetamerges over the stored value. Applies immediately (no hold) and re-renders the live page;rerenderedsays whether the live object was refreshed (falseon a draft, which picks the change up when it publishes). ChanginglistingSourceorlistingKindre-renders the site, so grid cards link to the right template. Needs the lease and counts as awrite; needs no payloadIf-Match.
- 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.
PUT /v1/pages/:id/password— put a page behind one shared password. Body{ "password": "…" }(6–200 characters);DELETE, or"password": null, removes it. A visitor gets a password form on the site's own domain, then the page opens for 30 days in that browser. Takes effect on the next request. The page leavessitemap.xml,llms.txt, post lists and the feed, and is servednoindexand never cached. The password can't be read back (GET /v1/pages/:id→passwordProtected), so tell the owner what you set; changing it signs every visitor out. Refused (page.password_unsupported) for the home page and listing/collection templates. Files the page links to stay public by URL until you [make each private](#media) withPUT /v1/media/:id/access. MCP:set_page_password.PUT /v1/pages/:id/payload— replace the page payload. The body is the payload object itself,{ "html": "…", "css"?: "…" }.If-Match: <latestVersionId>is required; see [what a refusal's status means](#a-refusals-status-tells-you-whether-retrying-can-ever-work). The response says whether the change published (200 { "status": "published", "versionId" }) or was held (202 { "status": "held", "versionId", "report" }). Rehearses with [?dryRun=1](#rehearsing-a-write--dryrun1).POST /v1/pages/:id/publish— publish a version; body{ "versionId"?: "ver_…" }(defaults to the latest draft). The response names whose version went live (createdBy/createdAt), with acautionwhen you omittedversionIdand the draft is another credential's. A version older than the live one is409 version.stale(revert restores it on purpose). A draft someone wrote on top of is409 version.newer_draft, namingnewerVersionIdandnewerCreatedBy: only the newest draft can go live.POST /v1/pages/:id/discard— withdraw what is waiting on a page; body{ "versionId"?: "ver_…" }. Every draft newer than the live version is rejected for good. A page that was never live is removed with them and its address 404s again. Answers200 { status: "discarded", pageId, discarded: ["ver_…"], pageDeleted }.versionIdguards likeIf-Match: not the newest waiting draft is409 version.newer_draft; live or older is409 version.not_waiting. A retry is safe: an already discarded version answersdiscarded: [], a removed page404 page.not_found.POST /v1/pages/:id/revert— body{ "toVersionId": "ver_…" }. Appends a fresh version copying that payload and publishes it (linear history, nothing lost).POST /v1/pages/:id/archive— request that a page be taken permanently out of service. The body says what its old URL does, and there is no default:{ "disposition": "redirect", "redirectTo": "/replacement" }(a301) or{ "disposition": "gone" }(a410). Answers202with{ status: "archive_pending", inboundLinks, warnings?, confirm, note }; the page keeps serving.confirmis the call that finishes it, withcallableByYou(false, plusrequiredScope, when your token lackscontent:publish).GET /v1/pages/:idshows a pending request asarchivePending.POST /v1/pages/:id/archive/confirm— the second step, needingcontent:publish. The body re-states the route,{ "route": "/old-page" }(422 archive.confirm_mismatchotherwise). The page becomesarchived, its route is freed and recorded asarchivedRoute, and the site owner is emailed with a one-click Restore link valid 30 days. Version history is kept.DELETE /v1/pages/:id/archive— cancel a pending archive request.POST /v1/pages/:id/unarchive— request that an archived page return to its old route:202 { status: "unarchive_pending", targetRoute, routeConflict }.GET /v1/pages/:idshows it asunarchivePending.POST /v1/pages/:id/unarchive/confirm—{ "route": "/old" }, needingcontent:publish. The page returns to its route and the version that was live when it was archived is republished (a page that never served comes back as a draft). While another page holds the route it fails (422 unarchive.failed, naming that page); move or archive that page first.DELETE /v1/pages/:id/unarchive— cancel a pending un-archive request.GET /v1/pages/:id/versions— version history.GET /v1/pages/:id/versions/:vid— a version plus its validation report (including a reviewer note if it was rejected).GET /v1/pages/:id/versions/:vid/preview— render a draft version (noindex).GET /v1/pages/:id/screenshotandGET /v1/pages/:id/verify— see [below](#screenshots-and-verify).
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:
| Warning | What 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_map | a 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_panel | a data-mk-tab="x" with no data-mk-panel="x" — the tab renders, the click does nothing, nothing reports an error |
render.panel_without_tab | the 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:
| Warning | What it means |
|---|---|
audit.bound_sample | names 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_failed | the 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:
| header | meaning |
|---|---|
X-Mk-Settled | ok if everything settled, partial if not — read this first |
X-Mk-Images | decoded/total, e.g. 11/12. A shortfall means an image failed, not that the page lacks it |
X-Mk-Fonts | loaded/attempted faces, e.g. 4/4. A shortfall means text is in fallback faces — do not judge type from this capture |
X-Mk-Fonts-Failed | only present on a shortfall: family weight status per errored face, e.g. Heading Sans 700 error |
X-Mk-Fonts-Timeout | only present if the faces hadn't finished loading inside the cap |
X-Mk-Reveals-Forced | how many .mk-reveal sections had to be revealed manually |
X-Mk-Frames | loaded/total iframes — a map region is an iframe, and X-Mk-Images does not cover it. ok requires these too |
X-Mk-Bound | only on a parameterised route: which row this capture is of, or why none could be bound |
X-Mk-Scroll-Y | only 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:
| Key | What it reports |
|---|---|
contrast | computed WCAG-AA failures per element, with the measured ratio and what was required |
contrastUnmeasured | elements whose colours could not be read, so their contrast was not checked — check these by eye |
a11y | img_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:
| Key | What it reports |
|---|---|
overflow | horizontal 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 |
images | rendered 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 |
hidden | elements marked [hidden] that still have a box, because a class rule setting display beats the UA stylesheet |
brokenImages | images that finished loading with no pixels (complete && naturalWidth === 0) |
performance | markup 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 |
shareImage | present 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 |
connectorPaging | present 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:
- An exact path,
/old-slug. A trailing slash is normalized away. - A subtree,
/lakelodge/*, covering that path and everything under it. It is asked only after every page, row and exact redirect has missed, so it never shadows anything live; the most specific subtree wins./*alone is refused, and so is atoinside its own subtree. - A path with a query,
/listing-details?id=AB1&blueprint=BP1, which fires when a request carries all of those params, in any order and alongside others. It may sit on a live page (/?p=12), which still serves without them. When several match, the one with more params wins. It is stored with its params sorted, which is the spelling toDELETE.
GET reports each row's match (exact or subtree); delete one by the same spelling, ?from=/lakelodge/*.
to may be any of four things:
to | Notes |
|---|---|
/services | A path on this site, resolved through the router — a collection row or listing URL counts. |
/cabins#2-bedroom | Same, 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.example | Off-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:
| Refusal | Why |
|---|---|
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.
GET /v1/notfound→{ pageId, status, publishedVersionId, latestVersionId, payload }(payloadis null when none has been authored).PUT /v1/notfound— upsert; body is a page payload{ html, css? }. Supports?dryRun=1andIf-Match, like the other singletons.POST /v1/notfound/revert— body{ toVersionId }.
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:
- The response is always HTTP
404. A soft 404 wastes the site's crawl budget. noindexis forced.- The canonical is
/404. The body is cached once and served for every unmatched URL.
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.
Chrome (site header / footer / announcement)
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).
GET /v1/chrome→{ chrome: { header, footer, announcement } }(each null or{ pageId, status, publishedVersionId, latestVersionId, payload }).PUT /v1/chrome/:kind— upsert (kind=header|footer|announcement); body is a page payload{ html, css? }.POST /v1/chrome/:kind/revert— body{ toVersionId }.
Site stylesheet
The per-site shared CSS, versioned and published like a page. Publishing it re-renders every page.
GET /v1/stylesheet→{ css, pageId, publishedVersionId, latestVersionId }, plusETag: "<latestVersionId>".PUT /v1/stylesheet— body{ "css": "…" }. It replaces the whole stylesheet, so a push from a stale local copy reverts everything written since you read it, with a200.GETfirst and sendIf-Match: <latestVersionId>; see [What happens if you DON'T sendIf-Match](#what-happens-if-you-dont-send-if-match).POST /v1/stylesheet/revert— body{ "toVersionId": "ver_…" }.
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:
| Header | Is |
|---|---|
X-Mk-Stylesheet-Version | the stylesheet version that render used |
X-Mk-Page-Version | the page version that render used |
X-Mk-Rendered-At | when 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="…">.
GET /v1/partials— list refs + status.PUT /v1/partials/:ref— upsert; body{ "html": "…" }.POST /v1/partials/:ref/revert— body{ "toVersionId": "ver_…" }.DELETE /v1/partials/:ref— unpublish;409 partial.in_useif a published page still references it.
Per-site JavaScript
Versioned JS served first-party at /__mk/site.js, under the strict CSP.
GET /v1/script→{ js, pageId, publishedVersionId, latestVersionId }, plusETag: "<latestVersionId>".PUT /v1/script— body{ "js": "…" }(≤ 512 KB). Wholesale, with the same [If-Matchcontract](#what-happens-if-you-dont-send-if-match) as the stylesheet.POST /v1/script/revert— body{ "toVersionId": "ver_…" }.
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.
GET /v1/theme— the live tokens plusthemeVersionId, andcreatedBy/createdAt.PUT /v1/theme— the body is the tokens object itself. Validated for schema (e.g.font.scalein1.067–1.5, hex colors, vendored font families) and WCAG contrast on the required text/background pairs; a failure is422(theme.invalid/theme.contrast) and the live theme is untouched.font.monois an optional monospace slot exposed asvar(--font-mono). The response echoesreplaced.POST /v1/theme/publish— put a stored theme version live again, e.g. to undo a change; body{ "themeVersionId": "thv_…" }. The response names whose tokens went live (createdBy/createdAt) and whose they displaced (replaced). Publishing another credential's version is allowed; naming the id is the proof of intent.
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:
POST /v1/fonts— multipartfile(woff2) +family+ optionalweight(100–900) +style(normal|italic). Hosted first-party and injected as an@font-faceon every page; referencefont-family: "<family>"in your CSS.GET /v1/fonts— list{ id, family, weight, style, url }.DELETE /v1/fonts/:id— remove a face.
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.
GET /v1/favicon→{ "assetId": "ast_…", "url": "/favicon.ico", "mime": "…" }, or{ "assetId": null }when none is set.PUT /v1/favicon—{ "assetId": "ast_…" }(an image) to set it, or{ "assetId": null }to clear it. Needs the lease; refused423while frozen.
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:
| Directive | Lets the origin | Approved by |
|---|---|---|
frame | appear in an <iframe> | nobody; active at once (frames are already allowed) |
connect | receive fetch/XHR/WS | a person, after a pending step (below) |
form | receive a form submission | a person, after a pending step |
img | serve images | a person, after a pending step |
font | serve fonts | a person, after a pending step |
script | run its code on the page | the site owner only, always — not you, not Moseik |
style | serve stylesheets | the 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.
GET /v1/allowlist—{ active, pending, managed, limits }. Each entry is{ id, origin, status, directives, tier, script?, proposed?, reason, … }.managedlists the hosts this site's settings switch on (analytics); change those through their settings, not here.POST /v1/allowlist—{ "origin", "directives"?, "script"?, "reason" }.directivesdefaults to["connect","form"]. The origin is normalized to scheme + host + optional port. Refused (422): non-https, credentials, wildcards, private hosts, platform origins, and hosts where anyone can publish (public CDNs like jsDelivr or unpkg, shared bucket hosts, code hosts); use the vendor's own host. Re-posting a listed origin with a different shape changes it: a live entry keeps its current shape until the change is approved, and dropping directives applies at once (it needscontent:publish).POST /v1/allowlist/:id/approve— promote a pending entry, or the change waiting on a live one. Read the next section before you call it.DELETE /v1/allowlist/:id— withdraw a pending entry (content:edit) or remove an active one (content:publish).
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:
- Name the exact origin to the person you are working for, and say what will be sent there.
- Get an explicit yes. The question is _"may this client's customer data go there?"_, and you cannot answer it for them.
- 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.
| Field | Sets | Details |
|---|---|---|
notifyEmail, notifyCc, notifyBcc | who is emailed each lead | [Who is emailed](#who-is-emailed--notifyemail-notifycc-notifybcc) |
leadRouting | which person a lead goes to | authoring |
landingParams | URL parameters kept for the session and added to leads | [Reading leads](#reading-leads--get-v1leads) |
contact | the business details search engines read | [below](#contact--the-business-details-search-engines-read) |
analytics | GA4, Meta pixel, Google Ads and the consent banner | [Analytics](#analytics-ad-pixels--cookie-consent) |
wendell | the Wendell chat widget | [Wendell](#wendell-chat-widget) |
marquee, team | the brokerage or team session rule | [Site products](#site-products--marquee-ensemble-signature) |
llms | the inputs to /llms.txt (whole-object replace) | authoring |
rootFiles | analytics.txt, ads.txt, app-ads.txt at the root | authoring |
searchVerification | Google and Bing ownership tokens | authoring |
languages, untranslated, translations | machine-translated copies of every page | authoring |
- Fields that re-render every page go one per call:
contact,analytics,wendell,marquee,team,searchVerification,languages,untranslatedandtranslations. Two of them together are422 site.one_at_a_time; any other field may travel with one of them. - A key this endpoint does not write is refused (
422 site.unknown_field, or422 site.field_not_writablefor a read-only one likefeatures), not ignored. - Nothing is written on any of those refusals; when you sent more than one field, the problem lists the others under
notApplied. - Site config has no version stream.
siteConfig.lastWrittenBy/lastWrittenAtsay who last wrote it through the API, and everyPUT /v1/siteresponse carriespreviousWriter, whose setting you just replaced. - On a live site, recipient and
leadRoutingchanges wait for the owner; see [Changes the site owner confirms](#changes-the-site-owner-confirms--get-v1pending-changes).
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.
- Fields merge.
nullclears one.address,areaServed,sameAsandpeoplereplace wholesale. An unrecognised key is refused; the names are the platform's, not schema.org's. - It re-renders the site (
rerenderQueued) and emails the site owner the fields that changed. - A visitor sees the change only where your markup prints it with
<mk-component name="site-field">; a number typed into page HTML is page content and nothing checks it. See site-field. - The business node has a stable
@id,contact.structuredDataId, for page schema to link to (worksFor,provider).founder: truepeople emit asfounder, the rest asemployee. contact.emailis the business's public address.notifyEmailis where enquiries are routed.
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.
| Field | Meaning |
|---|---|
restricted | Read this first. false ⇒ no plan gate applies to this site |
id / label | the tier, or null when the site has no subscription record |
onPublicLadder | false for a commercial arrangement — not a plan name to quote |
includes | gateable 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.
| Field | Meaning |
|---|---|
trial | { endsAt, daysLeft, expired }, or null when the site is on a plan |
domainNeedsPlan | true ⇒ 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)).
reason | What it means | What to do |
|---|---|---|
vertical_not_applicable | This kind of site never gets it | Build something else. Do not switch vertical to obtain it. |
not_provisioned | It applies here, but is not set up | Read detail and enabledBy; turn it on if they name you. |
plan_not_included | The site's plan does not include it | A plan change, which is the owner's conversation. |
killed | Staff switched it off for this site | Leave it. This is a decision, not a fault. |
platform_not_configured | The platform is missing a prerequisite | Report it — it is our gap, not this site's. |
- Never change the vertical to obtain a capability. A home builder belongs on
construction, which reads builder inventory with no MLS market. - A capability that is off is never a reason to fake it. Hard-coded listing markup, a pasted third-party map, sample data "until the feed is connected": each ships to a real client and outlives the reason it was written.
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
csp.effectiveis this site's actual Content-Security-Policy header, produced by the function that serves it. Read it before concluding the platform blocks something;csp.additionssays what this site added to the baseline and how.permissionsPolicy.effectiveis the Permissions-Policy header. Camera, USB and Topics are always off. The microphone is off unless Wendell is on, and then only Wendell's chat frame may ask for it.publishPolicysays whether a new third-party origin waits for approval (external-origin). Changed by Moseik staff.
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
POST /v1/media/import—{ "url": "https://…", "alt": "…" }. Mirrors the asset first-party and returns it; reference it as<img src="/media/<id>">or<video src="/media/<id>">.POST /v1/media— direct multipart upload (file,alt).GET /v1/media— library list/search;GET /v1/media/:id— asset metadata.PUT /v1/media/:id/access— keep a file behind a page's password. Body{ "privateTo": "<page id>" }; the page must already have a password (422 media.page_not_protected)./media/<id>is then served only to a browser that has entered that page's password, never cached outside it, and is a plain404to everyone else.DELETE, or"privateTo": null, makes it public again. If the page loses its password the file 404s for everyone until you do. Mark it before you link it: a browser that already fetched the public file keeps its copy. Needs the lease.GET /v1/mediashowsprivateTo. MCP:set_media_access.
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.
| Class | Accepted | Size limit |
|---|---|---|
| image | PNG, JPEG, WebP, AVIF, GIF, SVG | 25 MB |
| document | PDF, DOCX | 25 MB |
| video | MP4, WebM | 50 MB |
- Acceptance is decided by the file's contents, not its extension. Renaming a file changes nothing.
- A rejection is per file, never a missing capability. The error names the accepted list and the endpoint to retry on.
- SVG also has to pass the SVG sanitizer. A refused SVG names what in it caused that.
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:
reached | What it means |
|---|---|
not-registered | the handler cannot find the form in any published payload — publish what declares it |
registered | a spam check or field validation refused it; error is what a visitor would see |
spam-checks | it passed the spam checks but was not stored |
stored | delivery works |
notified | the 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.forwarded | crm.note says |
|---|---|
true | the lead reached the configured destination |
false | not 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:
- It is the real handler in a test mode: same registration lookup, honeypot, signed token, nonce, field validation and storage.
- The hidden fields come from the page visitors are served, read from the cached object (
fidelity.hiddenFieldsFrom). A cached page from before the current anti-bot token is the real failure; with no cached object you getfresh-renderand awarningthat the test could not rule that out. - The honeypot is sent present-and-empty, as a browser sends it.
mk_fnis minted server-side (fidelity.nonce), the one field that is not what a visitor sends.
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:
| Response | Meaning |
|---|---|
303 → ?submitted=1 | Accepted and stored. (200 {"ok":true} under Accept: application/json.) |
400 | The submitted fields don't match the form's declared schema — check data-fields, including required. |
404 | No form with that key was found for this site. The key comes from data-form-id (defaulting to the component name). |
403 | Anti-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. |
429 | More than 5 submissions per minute from one IP. |
- The honeypot returns success. A submission with the hidden
websitefield filled gets the ordinary success and stores nothing. So a?submitted=1you produced by filling every field proves nothing; fill only the real fields. - A form declared in chrome or a partial works. Its action carries the id of the page it rendered on, and the platform searches the page, then chrome, then partials.
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:
PUT /v1/stylesheetwith any real CSS change; sendIf-Matchso you can't revert live CSS while doing it.POST /v1/theme/publishwith a storedthemeVersionId, such as the live one.
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 recipient block overrides as a unit. A form declaring any of the three attributes inherits none of the site-wide ones.
- Setting a cc or bcc changes the send shape. With either set, everyone is emailed on one message, and a single bad address can bounce the enquiry for all of them. Say so when you configure one.
- Before launch, none of it reaches the client. Until a custom domain is serving, every lead email goes to a build inbox instead (on a site its owner started, that site's dashboard admins), and a cc or bcc is dropped. It ends by itself when the domain serves (once its certificate has issued), so configure the real address from the start.
GET /v1/siteandGET /v1/formsreport it asbuildRouting: { active, inbox?, detail }. Leads are stored either way. - With no
notifyEmail, nobody is emailed about a lead, and a contact-detail change publishes with no owner notified.
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:
fieldLabels—{ <field name>: <the question it asked> }, captured at submit when the form declared a schema (absent otherwise). Use it for any heading a person reads, falling back to the field name: a form generated from another product's template has field names that are question ids. It is a snapshot, so two leads on one field may legitimately disagree.attribution— how the visitor arrived, when the session recorded it: any ofutm_source,utm_medium,utm_campaign,utm_content,utm_term,gclid,fbclid,msclkid,referrerandlandingPath, each at most 512 characters. It comes from the session's first page view with a UTM parameter, click id or external referrer, and is captured automatically, so don't copy query parameters into hidden fields. Click ids are kept only after the visitor accepts the consent banner.landingParams—PUT /v1/site { "landingParams": ["agent"] }(up to 4 names,nullclears) keeps?agent=123on any page for the session asattribution.params.agent, and addsagent: "123"to the lead'sdataunless the form sent that field itself. The first value in a session wins.assignee: { key, name, email, at, reason }— wholeadRoutinggave the lead to, withreason"attributed"(the visit named them),"listing"(the listing's agent, withlistingAgenton) or"rotation".files: [{ id, field, name, type, size, keptUntil }]— uploaded files. No link here; the email, the webhook and the dashboard carry it.notification: { status, error? }—"sent", or"failed"with a shorterror(no recipient, or a send refused). Absent when no email was attempted. The owner sees a failure on their Leads page.held: { reason }— the spam filter held it: stored, but not emailed or forwarded. Screening is switched on per site by Moseik staff; it holds a message repeated within 30 days, one with three or more links, and one a model judges to be a pitch, scam or junk. The visitor sees the ordinary success.crm_statusanddeliveries[]— where it was forwarded; see [delivery](#whether-a-lead-was-delivered).
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"
}
- Safe to call twice. There is one delivery row per lead and destination, and HubSpot, Engage and Mailchimp deduplicate on their side.
- Skipped, with the reason: a destination already delivered, one whose failure was terminal (a wrong
agentIdfails identically forever), and one with no delivery on record for that lead.forceattempts them; use it after you fixed the destination. crmStatusis recomputed across every delivery for the lead.
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:
- A signed outbound webhook — the submission is POSTed as JSON to a URL the client owns. This is how every other CRM is reached (Follow Up Boss, kvCORE, Salesforce, GoHighLevel…) and how Zapier/Make automations are fed. "Their CRM is not HubSpot" is never a reason to build something in the page.
- HubSpot — submissions become contacts.
- [MoxiWorks Engage](#routing-to-an-individual-agent--moxiworks-engage) — the lead reaches one agent's own dashboard.
- [Mailchimp](#newsletter-signups--mailchimp), Tripleseat, Google Sheets and a mapped webhook, below.
- A connected Proof product (Hivoma, EvryList, Showroom), with nothing to install.
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:
| Code | Means |
|---|---|
crm_credential.scope_too_broad | the token can reach more than contacts. Ask for a contacts-only one |
crm_credential.scope_missing | it cannot read or cannot write contacts, so the connector could not dedup or create |
crm_credential.hub_mismatch | the 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">
- Only the name appears in the markup, never a URL or secret.
- A form that names nothing goes to every destination.
hubspotroutes to the [HubSpot connection](#connecting-the-clients-hubspot);GET /v1/lead-webhookslists it once installed.defaultnames the singletonPUT /v1/lead-webhookdestination.inboxforwards nowhere: the lead is stored and emailed as usual. It is how a form stays out of a connected product, and out of Showroom. It stands alone and cannot be a webhook name.- An unknown name is refused at write time (
gate.form_lead_destination, naming what this site has) rather than falling back to the default. - Deleting a destination a live form still names loses no enquiry. Each submission records a
faileddelivery saying the destination is gone;GET /v1/formsfinds the forms to edit. - A connected Proof product is already a destination. When the client has connected one from their dashboard, its name is routable at once (
data-lead-destination="hivoma") with noPUTand no allowlist entry; the receiver and secret are the platform's. An emptyGET /v1/lead-webhookson such a site is not a gap. Connecting is the client's decision, made in their dashboard. - A Proof product's reply can reach the visitor. On a
formwhose destination is a connected Proof product (EvryList, whose reply to a sign-up carriesreferral_url),data-response-fields="referral_url"(up to 4 names) makes the submit wait up to 6 seconds for the receiver's JSON reply and hands those fields to the page, intodata-mk-response-field="referral_url"elements insidedata-mk-form-success. The value is set as text; on an<a>anhttps://value also becomes itshref. A slow or failed receiver shows the confirmation without them. Any other receiver's reply is ignored.
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.
- Do not build the id from a person's name. About 1 in 13 does not follow
first.last@century21.ca— multi-word surnames, teams and brokerage accounts all break the pattern, and 0.5% are opaque short codes. Store the id you were given. - Every submitted field travels, including ones Engage has no column for — those are appended to the contact note, so a custom question needs no configuration anywhere.
- Consent is sent only when a box was ticked. Submitting a form is implied consent under CASL and that is Engage's default, so a form with no consent checkbox sends nothing rather than recording a refusal it cannot prove.
deliveries[]carries the MoxiWorks contact id on success, and Engage's own reason on failure — almost always an agent id it cannot reach.
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 }
}
}
send: falsekeeps that form's leads out of Engage. Nothing is recorded as failed.recruit: truefiles the lead underdefaultAgentId, never an agent, as an Engage contact that is not a sales lead. Pair it withleadRouting.noAgentFormsso the email goes to the brokerage too.- A form's
groupwins over the destination's. One group name, no commas. - A lead from a listing page carries the listing as Engage's property fields (MLS number, address, price, beds, baths, photo), and its link is the listing page itself.
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.
pendingis the default, and it means double opt-in — Mailchimp emails the person and they join when they confirm."subscribed"adds them straight to the list with no confirmation step.- The routing is what protects the audience, not a consent check. Only forms that name this destination reach Mailchimp at all. The platform's consent flag records that a form's checkbox was ticked, not what it said — and that checkbox is required and ticked on nearly every Moseik form — so it cannot tell newsletter consent from "I agree to be contacted". A form using
subscribedmust setdata-consent-labelto wording that names the newsletter. A form built withdata-consent="false"has no checkbox at all and is always downgraded topending. - Only
email,FNAME,LNAMEandPHONEare sent. Mailchimp 400s the whole signup on a merge tag the audience does not have — it does not ignore it — so the convention covers only the merge fields a new audience is created with. Anything else needs afieldMapentry naming a tag that already exists in that audience. Unmapped fields are dropped from the forward and still saved in full on the lead. - A previously-unsubscribed address is never re-added. Mailchimp does not permit it over the API for anyone, only the person themselves can rejoin from a Mailchimp-hosted form. That lead records a
faileddelivery saying exactly that, is never retried, and is not a broken connection. - Signing up twice is one subscriber. The write is an idempotent upsert keyed on the address, and an existing member only ever has their merge fields refreshed — their subscription status is never changed by us.
deliveries[]carriessubscribedorpending— the member's status after the write, which is the part you cannot work out from the address.POST /v1/forms/<formKey>/testreally does add that address. There is no test audience to route into, so verify with your own address.
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's lead has twelve fixed fields, and everything else a form asks is folded into
additional_informationasLabel: valueclauses, in the order the form asked them, labelled from the field's own name (guestCountreads as "Guest Count"). Name a field the obvious way and it maps itself:
| Tripleseat field | Field names recognised |
|---|---|
first_name / last_name | firstName / lastName |
email_address | email |
phone_number | phone |
company_name | company, organization |
event_name | eventName |
event_date | eventDate, date |
start_time / end_time | startTime / endTime (use type: "time") |
guest_count | guestCount, guests, attendees |
email_opt_in | emailOptIn |
gdpr_consent_granted | gdprConsent |
gdpr_consent_grantedcomes from the visitor's consent tick when the form has nogdprConsentfield of its own. A form that asks the question itself wins, including when it answers no.- Anything the venue sorts or filters on must be one of the twelve. A field left to the fold arrives as prose inside a notes box — delivered, and useless for the thing they wanted it for.
fieldMapmoves one into a real column, and its value must name one of the twelve or the call is refused. - A date is converted to
MM/DD/YYYY, which is the only format their API reads. A value that is not an ISO date passes through as written, so a form asking "roughly when?" as free text still reaches the coordinator. - A submission with no email address is refused, not sent. Tripleseat accepts a lead without one, which leaves a coordinator an enquiry they cannot answer and looks exactly like a real one.
POST /v1/forms/<formKey>/test?notify=1is marked —additional_informationopens withTEST SUBMISSION, so the venue's team can tell a rehearsal from a booking.- The delivery records Tripleseat's own lead id, which is what matches an enquiry in
GET /v1/leadsto a booking in their system.
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
}
- Keys are matched against the column headers, ignoring case and spacing. A field named
guestCountfills a column headed "Guest Count". Anything the sheet spells differently needs acolumnsentry, which also fixes the order. - A field with no column gets one, added to the header row. Nothing is dropped.
- Every row says where it came from: the time, the form's
data-form-id(so two forms on one page stay apart) and the page's URL, under "Timestamp", "Form Name" and "Page URL" unless renamed. A submitted field cannot overwrite them. A form with nodata-form-idis recorded by its component name, such asform. matchColumnupdates a row instead of adding one. A submission whose value in that column matches an existing row, ignoring case and surrounding spaces, updates the latest such row; no match, or no value for the column, adds a row as usual. WithmatchMode: "fill"only blank cells are written, so a stranger who types someone else's email cannot change what is already there;"overwrite"replaces cells with the newest answers. The matched cell itself is never rewritten, and only changed cells are written. Google-connected sheets only (lead_webhook.sheet_match_needs_google). Two submissions in the same instant can both add a row, because Sheets has no lock.- Values are written as text, so a submitted
=…is never run as a formula. - A failure is reported. Google says how many rows it wrote, so a revoked grant, a sheet the account can no longer edit, or a renamed tab fails the delivery on
GET /v1/leadswith the fix, and a daily check alerts the Moseik team. - A
?notify=1rehearsal appends nothing by default. These sheets usually feed an automation, so a test row becomes a real task. To prove the append, settestMode: "send"for one call and delete the row afterwards. dateFormat: "us"for a sheet you are migrating whose existing rows were written12-05-2026, so the column does not go mixed-format.- Legacy link-shared destinations (
extra.auth: "public-link") still deliver and can still be edited, but should be reconnected: the dashboard shows the owner a Reconnect with Google button that keeps the destination's name and columns. - To read a sheet rather than write one, see the
/__data/proxy.
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):
- An email field is required. Without one the forward is recorded as failed.
- Use ordinary field names.
email,name(orfirstname/lastname),phone,company,messageand common variants map automatically. A field that matches nothing is left out of the forward but kept in full on the lead.
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"
}
]
}
- Verify by recomputing the HMAC over
"<timestamp>.<body>"with the shared secret, and reject a timestamp that is not recent.idis stable per lead, so it doubles as an idempotency key. - Retries: a
2xxis success; a4xxis a permanent failure, not retried; a429or5xxis retried up to three times with backoff, then on the schedule [above](#reading-leads--get-v1leads). siteis a hostname and a site can have several; group bysiteId.testis always present,trueforPOST /v1/forms/:formKey/test?notify=1. Branch on it so a test does not create a record staff mistake for a real enquiry.attributionis how the visitor arrived, ornull(always present).filesis[]on a form with no file field. Eachurldownloads the file untilkeptUntiland returns 410 after. A file field's entry indataholds its filenames.assignedTois wholeadRoutinggave the lead to,nullon a site without routing.keyis your recipient id,emailthe address notified (it can benullon a redelivery, when that person has left the roster), andreasonis"attributed"or"rotation". Read it rather than your form's hidden field: they differ whenever the rotation chose, an override changed the address, or the named recipient is inactive.
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:
PUT /v1/lead-webhookand/v1/lead-webhooks/<name>PUT /v1/crm-credential(the call that installs, afterconfirmHubId)PUT /v1/roster-connector(the confirming call)PUT /v1/sitewithnotifyEmail,notifyCc,notifyBccorleadRouting; the request's other fields still apply- approving an allowlist origin, or adding one where the site's policy is
auto - a page, chrome or partial write that adds a form
data-notify-email,-cc,-bccordata-lead-destinationthe site does not already send leads to. That version is held until confirmed. Configured destinations, the site's notify addresses and any address on a published page are already trusted, so moving forms among them, or removing a recipient, publishes as usual.
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.
- The email goes to the current notify address, so a new address is confirmed at the old one. A live site with no notify email refuses with
409 owner.unreachable. - A request within 30 minutes of an undecided email joins it (`pendingChange.emailed:
false`). Install a new destination first, then point forms at it, and the owner confirms once.
- The link lasts 72 hours. A second request for the same thing replaces the first.
- Deleting a destination is not held. Before go-live nothing is held.
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": { … } }
provinceis required the first time. Settable fields:province,city,cities,bbox,officeKey,officeKeys(up to 25 branches),agentKey; omitted fields keep their value andnullclears one.citylimits the market to one town;cities(up to 25, from listing facets, matched exactly) andbbox({ south, west, north, east }in degrees) limit it to a region. Settingcitiesclearscityand the reverse. Every grid, map, facet count and listing page is held inside the region;GET /v1/site→listings.regionFloorreports it.- Lookup results are candidates: confirm the person with your human.
- A write that turns listings on or sets a key returns
tellYourHuman: the agent or brokerage must select Benchmetrics as their technology provider on CREA's DDF dashboard, or the feed can be shut off. Relay it. The owner confirms it on their dashboard Home, andGET /v1/site→listings.techProviderreports{ confirmed: true, confirmedAt }once they have. - Refused with
listings_market.not_applicableoff the real-estate vertical andlistings_market.plan_excludeson a plan without 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" }
- Search returns no lots: names, counts, cities and one sample address. An org id is opaque, so choose on the count and the sample.
- The write is probed first. A scope with no published lots is refused (
listings_scope.no_inventory) rather than stored. - The response names the builder. If it is not whose homes belong on the site, call again with the right org.
provinceis derived from the lots and decides only where a map opens; send one only if told it could not be.cityis accepted the same way and is also map-only. The site re-renders automatically.- Beside MLS, the scope is read only by grids with
data-source="evrylist"; the response says so, with arentalscount, andGET /v1/sitereports it aslistings.evrylist. - A network:
PUT /v1/listings/scope { orgIds, network: "<id or slug>" }adds every builder who opted into that EvryList network; rentals still come only fromorgIds. An empty network is refused (listings_scope.network_empty); omittingnetworkkeeps it andnullclears it. Reported aslistings.evrylist.network. - A marketplace of every builder's lots is a staff grant on any vertical:
listings.inventory.allOrgs: true, andPUT /v1/listings/scopeis refused (listings_scope.staff_granted).
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.
origin | ownBudget | What it means |
|---|---|---|
tenant | true | This site has its own budget. The intended state; nothing to do. |
fleet | false | Still on the shared budget. The platform retries within six hours; call the endpoint above to do it now. |
fleet_after_decrypt_failure | false | The 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. |
none | false | No 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 type | Value | Renders as |
|---|---|---|
image | /media/<asset id>, optionally ?w=<px> | <img class="mk-collection__image"> |
link | a 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.
GET /v1/collections—{ collections: [{ key, name, schema, detailBasePath, updatedAt }], limit }. No row count. Limit 24 per site.POST /v1/collections—{ key, name, schema, detailBasePath? }. Thekeyis a lowercase slug and cannot be renamed, because markup names it; fix a typo by deleting and recreating.PATCH /v1/collections/:key—{ name?, schema?, detailBasePath? }. A schema change that would drop a field still in use on rows is refused with the count; confirm withdropFields.DELETE /v1/collections/:key— frees itskey, slot anddetailBasePath. Refused409 collection.in_usewhile anything depends on it (below).GET /v1/collections/:key/rows— every row, including ones outside their visibility window, each with a computedvisible.POST /v1/collections/:key/rows—{ slug, data, visibleFrom?, visibleUntil?, featured?, sortOrder? }. Limit 2000 rows.PATCH /v1/collections/:key/rows/:id— partial. Changingslugchanges the row's public URL and leaves a301behind.DELETE /v1/collections/:key/rows/:id— the row's URL then answers410 Gone, which stays even after the collection is deleted.
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:
| Warning | What it means |
|---|---|
collection.date_not_a_date | a 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_time | a 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 there | What to do first |
|---|---|
| any row | DELETE …/rows/:id each |
| a published page rendering it | remove the component, republish |
| a partial or a chrome section | same — and chrome means every page renders it |
the detail template <base>/:slug | archive 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:
| Product | For | Members come from | Session rule |
|---|---|---|---|
| Marquee | a brokerage | the Showroom [roster](#the-brokerages-agent-roster--get-v1roster), synced into the roster collection | marquee: true (/__mk/marquee.js) |
| Ensemble | an agent team | the site's own team list | set by team (/__mk/ensemble.js) |
| Signature | one agent | none: every lead goes to notifyEmail | none |
PUT /v1/site { "marquee": true }makes the lead session one browser tab and adds marquee.js to every page;falserestores first-touch.GET /v1/site→ `marquee:
{ enabled }`.
PUT /v1/site { "team": [{ key, name, title?, phone?, email?, photo?, page }] }lists up to 30 members and their hand-built pages.keyis a lowercase slug and the routing key;pageis a route on this site;photoanhttps://URL or/media/path; keys and pages are unique. A member with anemailreceives leads; one without keeps a page but gets none. With noleadRoutingset, writing the list sets{ field: "attributedAgent", fallback: "inbox" }.team: nullclears it, and its members stop receiving leads at once.GET /v1/site→team: { members, routable }. An invalid list is422 site.bad_team.- One member source per site: Showroom, the DDF member roster, or a
teamlist. Each refuses while another is set (409 site.team_source_conflict), andmarqueeandteamrefuse each other (site.team_marquee_on,site.marquee_team_list). - A Signature site gets none of
marquee,teamor a roster.
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
}
]
}
routableis not publishable. An agent with no email still gets a page, and their leads fall back to the inbox. On a real roster that is often half of them; check before promising a client attribution for the whole team.- A placeholder key like
AB-123456with"placeholderCreaId": true(counted incounts.placeholderCreaId) routes leads and fills forms like any key, but is not a CREA number: never print it, and it matches no listings. When the real number replaces it, the agent keeps their page, lead email override, rotation place and leads. configured: falsemeans no roster is connected, which is a state, not a failure; connect one below. An emptyagentswithconfigured: trueis a roster that really is empty.- It is a live read. An upstream outage is a
502, not an empty list.409 roster_connector.needs_reconnectmeans Showroom refused the stored secret, almost always because the brokerage made a new one; agent pages keep their last known details until you reconnect.
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.
| Request | Returns |
|---|---|
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.
Analytics, ad pixels + cookie consent
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.
- Up to 5 IDs per kind, and every page view and event goes to every ID. The singular
ga4MeasurementIdandmetaPixelIdare still accepted and folded into their list. - A Google Ads ID is the
AW-conversion ID without the/label(422 analytics.google_ads_id_invalid); send a conversion withgtag("event", "conversion", { send_to: "AW-…/label" }). - A Meta pixel ID is the 15- or 16-digit id from Events Manager, quoted as a string; a bare number is refused (
422 analytics.meta_pixel_id_invalid) because it cannot survive a JSON round-trip. - A GTM container id (
GTM-…) is refused (422 analytics.gtm_container_refused): a container loads arbitrary scripts. Use a GA4 web stream's measurement id. - Whole-object replace. Send every kind you want to keep. Omitting a kind the site runs is refused (
422 analytics.provider_omitted); set it tonullto remove it. Within a kind, the list you send is the new list.
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:
status | meaning |
|---|---|
active | Serving. |
pending | Provisioned; Cloudflare is still validating. Self-resolves — no action needed. |
failed | Will not serve and will not self-resolve. Needs the platform team. |
blocking — why a hostname is not ready
| value | meaning |
|---|---|
custom_hostname_missing | No Cloudflare-for-SaaS custom hostname. Hard blocker — will not self-resolve; Moseik has to fix it. |
custom_hostname_pending | Provisioned; Cloudflare is still validating. Resolves itself once the client's CNAME resolves. |
custom_hostname_failed | Cloudflare reported the hostname as failed. Moseik has to recreate it. |
provisioning_unconfigured | This 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:
- **You are looking at the
*.moseik.apppreview host of a site with a domain.** The canonical points at the real domain. - 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.
- 3 to 40 letters, numbers and single hyphens:
422 domains.address_invalid.api,draft-…and other reserved names:422 domains.address_reserved. - In use, or held for another site:
409 domains.address_taken. A site can take back a name it gave up. - Three renames a day per site:
429 domains.address_rate_limited.
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.
- Search takes a full name (
smithrealty.ca) or a bare one (smithrealty) and checks up to five: the name as typed, then it on.ca,.com,.net,.organd.biz.priceis{ currency: "CAD", firstYear, renewal }, set only when the name is available and sold through Moseik; otherwisenotOfferedsays why (premium, an unsupported ending). Needscontent:read, and is limited to 10 calls a minute in every mode (shared with requests). A name that isn't a registrable domain is400 domain.invalid;503 registrar.*means search is down, so retry shortly. - A request (
content:edit, inside your lease) names one full domain. The owner is emailed the price and a link to buy it from their dashboard;sentTois that address, masked. Repeating an open request returns it withemailed: false. Refused:409 domain.taken,422 domain.not_offered, and409 domain.no_owner_emailwhen the site has nonotifyEmail. statusisrequested(waiting for the owner to pay),approved(paid; the domain is being registered and connected) orexpired(7 days unpaid).
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.
- Scope:
team:invite. Staff grant it per credential; a connected assistant gets it when the person connecting it approves it. Over such a connection that person must also be an admin of the site right now, or the call is refused403 invite.not_admin. role:admin(everything, including inviting others),collaborator(views pages, domains, settings and billing; no leads or contacts), orbuyer.buyer: for a site you built that nobody pays for yet. A collaborator who can also start a plan, landing onbillingby default, with a 14-day link. Paying for the plan makes them the site's admin. Refused409 invite.site_already_paidonce the site has a plan.offer:"wendell", buyer only. Their Billing page then offers Wendell at the running discount, billed separately by Wendell. Refused409 invite.offer_unavailablewhen no offer is running.landing: the first page they see after accepting:home,pages,billing,domains,settings,team,leads,contactsoragents. It must be one the role can open (400 invite.landing_not_permitted). Omit it for their usual start page.message: an optional plain-text note, up to 1000 characters, printed in the email under the sender's name. The platform sends the email; hand thelinkover yourself only ifemailedis false.- Resend:
POST /v1/invitations/:id/resend(MCP:resend_invitation) emails a pending invitation again with the same link and expiry.404 invite.not_foundonce it was accepted, cancelled or expired. - Refusals:
409 invite.already_has_access, or409 invite.pendingwhen that address already has an open invitation. - Admin invites are announced: the site's other admins are emailed when an agent invites an admin.
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:
kind | Meaning | Filed by |
|---|---|---|
intake-form | Build the form a product's intake template describes | A product |
notice | Something changed; no action required | A product, Moseik |
task | Page work a product asks for | A product, Moseik |
review | Moseik changed something on this site; check it, tell the customer | Moseik 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:
| Body | Meaning |
|---|---|
{"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.
| class | what it is | outcome |
|---|---|---|
| copy | visible text changed, structure didn't | publishes |
| structure | the tag/attribute skeleton or the CSS changed | publishes |
| page-create | a new page | publishes; a template page may carry seo_gate.* warnings |
| theme | design tokens | publishes |
| sensitive-fields | a 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:
- Fair-housing language (real-estate copy) is refused with
422, naming the rule that matched. Reword it and write again. - A new third-party origin waits for a person; see [the allowlist](#external-origin-allowlist).
- A version you held with
hold: truewaits for the site owner; see [Holding a change for approval](#holding-a-change-for-approval).
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.