Builder API and Endpoints
Tagixo exposes a headless API consumed by SDK adapters and custom integrations.
The package ships one HTML route (/tagixo/builder/embed — the builder mount) and everything else as JSON. SDK packages (Filament, Primix) and direct consumers all build their admin UI on top of these JSON endpoints; they all point at the same embed route to drop the Vue builder onto a page.
Builder mount (the only HTML route)
GET /tagixo/builder/embed?type={type}&id={id}&back={url} — dispatched by BuilderEmbedController (invokable). Renders the tagixo::builder.embed Blade view, which mounts the Vue SPA against the record resolved by (type, id) via the BuilderTypeRegistry.
Query parameters:
type(required) — registry key (pages,mails,pdfs, or your own custom key)id(required) — primary key of the record to editback(optional) — absolute or relative URL injected asdata-back-url; omit to hide the back button
The mount <div> carries data-page-id, data-context, data-layout-variant, data-data-url, data-config-url, and optional data-back-url. The bundled JS wires:
tagixo:save→POST /tagixo/manage/{type}/{id}/savetagixo:save-global-variables→POST /tagixo/builder/global-variablestagixo:structure-changed→POST /tagixo/builder/stylesheet
Error responses:
- Unknown
type→ 404 - Unknown
id→ 404 - Missing
typeoridquery → 422
Your admin links the user at this URL (anchor, iframe, or redirect). The plugin owns the editor surface; you own the chrome around it.
Bootstrap endpoints
GET /tagixo/builder/bootstrapGET /tagixo/builder/config(alias)
Supported query parameters:
context(page,form,mail,pdf,partial)layout_variant(default,carousel)bound_model(optional)structure(optional)
Example request:
GET /tagixo/builder/bootstrap?context=page&layout_variant=default
What bootstrap returns
The bootstrap payload is the canonical source of truth for the frontend editor.
Core fields include:
contextlayoutVariantcanvasstructureregistry.componentsregistry.propTypesresources.iconsresources.fontsresources.translationsresources.globalVariablesresources.dataModels- compatibility aliases such as
availableComponents,propTypeRegistry,availableFonts endpoints
The important architectural rule is simple:
- your frontend should render from bootstrap metadata
- your frontend should not ship a hardcoded parallel registry
Render endpoints
POST /tagixo/builder/renderPOST /tagixo/builder/stylesheet
Typical render payload:
{
"structure": {
"body": {},
"components": []
},
"context": "page",
"layout_variant": "default",
"entity_type": "page",
"entity_id": "15"
}
Important request keys:
structurecontextlayout_variantentity_typeandentity_idwhen the preview flow needs entity awareness
Render behavior:
context=formuses form preview path.context=page + layout_variant=carouseluses carousel preview path.- default path uses page renderer.
Typical render response:
{
"html": "<div>...</div>",
"css": ".vb-section {...}",
"fonts": "<link ...>"
}
Stylesheet-only endpoint
POST /tagixo/builder/stylesheet returns only regenerated CSS.
Use this when:
- you need style refresh without full HTML render
- your host UI already owns the surrounding markup
- you are debugging CSS generation separately
Preview endpoints
POST /tagixo/builder/preview-url— issue a short-lived signed URL for the entityGET /tagixo/builder/preview-mail/{id}— render aMailTemplateinline (HTML)GET /tagixo/builder/preview-pdf/{id}— render aPdfTemplateinline (real PDF ifdompdf/dompdfis installed, otherwise print-ready HTML)
Preview flow (page context):
- The editor calls
POST /tagixo/builder/preview-urlwith{context: "page", entity_id}. - The backend returns
{preview_url, expires_in}wherepreview_urlpoints to the page's final public slug, carrying_preview=1+expires+signaturequery params. - Opening the URL hits your consumer's
PublicPageController, which honours the bypass viaPage::isAuthorizedPreviewRequest($request)— checking valid signature,_preview=1, and an authenticated session. - The page renders through the final renderer pipeline, bypassing the
published()gate.
Preview flow (mail / pdf contexts):
- The editor calls
POST /tagixo/builder/preview-urlwith{context: "mail"|"pdf", entity_id}. - The returned URL points at
/tagixo/builder/preview-mail/{id}orpreview-pdf/{id}(signed the same way). - The endpoint renders the template inline.
Important configuration keys:
tagixo.preview.url_ttl_seconds— signed URL lifetime.
The signed URL is bound to the issuing user or session. Three conditions must all hold for the published gate to be bypassed: valid signature, _preview=1 query param, and authenticated session. If your middleware/auth stack is wrong, preview will fail even while bootstrap works.
Global variables and model metadata
GET /tagixo/builder/global-variablesPUT|POST /tagixo/builder/global-variablesGET /tagixo/builder/modelsGET /tagixo/builder/models/{key}/attributes
Library/template/layout endpoints
/tagixo/library/*/tagixo/templates/*/tagixo/layouts/*
Form-specific endpoints
GET /tagixo/form-builder/configGET /tagixo/form-builder/models/{key}/attributesPOST /tagixo/forms/{formKey}/submit
Adapter implementation rules
- Always consume bootstrap payload as source of truth.
- Do not hardcode component registry on the frontend.
- Keep
contextandlayout_variantexplicit in every request. - Validate payload shape before saving.
- Keep preview and save flows separate.
- Treat
body + componentsas the only accepted structure shape.
Practical adapter checklist
Your custom frontend integration should know how to:
- request bootstrap
- render the palette from
availableComponents - render property panels from
propTypeRegistry - submit
structureto render and stylesheet endpoints - issue signed preview URLs
- save raw structure to your application backend
If any of these are hardcoded outside the payload contract, your adapter will drift from the core package.