Developer API Reference

API Reference

Complete reference for the Laravix REST API, version 1. All endpoints are GET, live under /api/v1, require a Bearer token and work only on headless sites — setup in Headless Mode and API Tokens.

Common query parameter: locale (an enabled language code; defaults to the site's default language) on every content endpoint.

Pages

GET /api/v1/pages

All published pages and archives of the locale, sorted by title. Returns summaries (no fields/blocks/html).

GET /api/v1/pages/homepage

The published homepage as a full page object.

GET /api/v1/pages/{slug}

One published page or archive by slug, full object:

{
  "data": {
    "id": 12,
    "type": "page",
    "title": "About us",
    "slug": "about-us",
    "is_homepage": false,
    "status": "published",
    "published_at": "2026-07-01T10:00:00+00:00",
    "fields": { "meta_title": "About", "og_image": "34" },
    "og_image": { "id": 34, "name": "team.jpg", "mime_type": "image/jpeg", "size": 812345, "url": "…", "variants": { "thumbnail": "…", "medium": "…", "large": "…", "og": "…", "favicon": "…", "full": "…" } },
    "blocks": [ { "type": "hero", "data": { "heading": "…" } } ],
    "html": "<section>…</section>",
    "taxonomies": [ { "id": 3, "type": "category", "name": "Company", "slug": "company", "parent_id": null } ],
    "author": { "id": 1, "name": "Jane Doe" }
  }
}

html is the visual builder's exported HTML (null when the page wasn't built there); blocks is the classic block array; fields holds every custom/SEO field as raw key–value pairs.

Posts

GET /api/v1/posts

Published posts, newest first, paginated (Laravel pagination envelope with data, links, meta).

Parameter Meaning
per_page Page size, default 15, max 100
page Page number
taxonomy_slug Only posts assigned to the taxonomy with this slug
locale Language

GET /api/v1/posts/{slug}

One published post — same shape as a full page, without is_homepage.

Taxonomies

GET /api/v1/taxonomies

Top-level taxonomies with nested children, sorted by name. Filter with type (e.g. ?type=category).

{ "data": [ { "id": 3, "type": "category", "name": "News", "slug": "news", "parent_id": null, "children": [] } ] }

Settings

GET /api/v1/settings

The site's public settings — a fixed whitelist:

  • text values: site_name, site_description, locale, contact_email, meta_title, meta_description, google_site_verification, twitter_url, linkedin_url, facebook_url, instagram_url, github_url
  • media objects (or null): logo, favicon, og_image

GET /api/v1/navigation

The site's menus and their design settings, exactly as configured in the admin:

{ "data": { "navigations": { "header": [ { "label": "Home", "url": "/", "target": "_self", "children": [] } ], "footer": [] }, "design": { "header": { "bg_color": "#ffffff" } } } }

GET /api/v1/search?q=term

Full-text search over published content (Laravel Scout). Returns paginated summaries.

Parameter Meaning
q Required. 2–200 characters
type Restrict to one content type (page, post, …)
per_page Default 15, max 100
locale Language

Result quality depends on the configured Scout driver — see Full-text Search.

Media objects

Wherever media appears (og_image, logo, favicon), the shape is:

{ "id": 34, "name": "team.jpg", "mime_type": "image/jpeg", "size": 812345, "url": "https://…/storage/media/….jpg", "variants": { "thumbnail": "…", "medium": "…", "large": "…", "og": "…", "favicon": "…", "full": "…" } }

Variants map to preset sizes (300×300 cropped, ≤800×600, ≤1200×800, ≤1200×630, 32×32, original). For non-image files the variant URLs equal the original.

Publication semantics

All endpoints return only content with status = published whose published_at is empty or in the past — drafts and scheduled content never leak through the API.

Laravix Documentation · 14.07.2026
Star on GitHub