Fetch the cacheable form schema document
Cache-friendly sibling of GET /api/public/v1/forms/{codeOrId}: the
same render-safe schema of one live, embeddable form, but served from
the published edge document when one exists (computed live otherwise —
identical content; the X-Edge-Source response header tells you which)
and never recording key usage. Use it from embeds and widgets that
poll or refresh the schema; keep the plain endpoint for the initial,
metered mount.
The key’s form scope must cover the requested form; supply the key as
the publicKey query param or the X-Comerix-Public-Key header (a
body field is not read here). {codeOrId} is the form’s public code or
its UUID — an uppercase UUID is accepted and canonicalised internally.
The tenant is always taken from the key’s binding, never from request
input. Unlike the plain schema read, the response carries no
locale field.
Because the outcome varies per key (the form scope), the response is
only privately cacheable: Cache-Control: max-age=60, private —
deliberately no s-maxage, so shared/CDN caches stay out (a shared
entry warmed by an authorized key would leak past another key’s 403).
Revalidate with If-None-Match to get 304 Not Modified.
Authorizations
Public widget/form key (pk_live_…). Exchanged for a session token by
POST /api/public/v1/chat/sessions. Public Forms operations accept the
same key directly, supplied via this publicKey query param, the
X-Comerix-Public-Key header (publicFormKey scheme), or in the JSON
body.
Path Parameters
The form's stable code or its UUID.
Query Parameters
Public gateway key. Alternatively send X-Comerix-Public-Key.
Response
The form schema document — published (X-Edge-Source: store) or
its identical live-computed fallback (X-Edge-Source: live).
The cacheable form schema document served by
GET /api/public/v1/forms/{codeOrId}/schema — the same render-safe
shape as PublicFormSchema minus locale, plus the edge publication
timestamp.