Related services: PagesServicelynkow.pages.getByPath(), lynkow.pages.getBySlug(), lynkow.pages.getJsonLd(), lynkow.pages.list() | BlocksServicelynkow.blocks.getBySlug(), lynkow.blocks.global(), lynkow.blocks.siteConfig()

Alternate

Interface

An alternate language version of the same page. Used to build <link rel="alternate" hreflang="..."> tags for multi-language SEO and language switcher UI components.

Property

Type

Optional

Description

current

boolean

No

Whether this alternate represents the currently requested locale.<br>Exactly one alternate in the array will have current: true.<br>Useful for highlighting the active language in a language switcher.

locale

string

No

BCP 47 locale code of this version (e.g. 'en', 'fr', 'de').<br>Matches one of the site's enabled locales.

path

string

No

URL path to this locale's version of the page (e.g. '/fr/about').<br>Does not include the domain — prepend your site's base URL.<br>null is never returned here; every alternate has a valid path.


GlobalBlock

Interface

A global block (reusable site-wide data object).

Global blocks are schema-driven data containers used for site-wide elements like headers, footers, navigation menus, and banners. Their data is defined via a schema in the admin dashboard and can include DataSource references that are resolved server-side before delivery.

Global blocks are typically fetched once at app initialization via site.getConfig() (which returns all globals) or individually via blocks.getBySlug().

Property

Type

Optional

Description

_warnings

string[]

Yes

Warnings generated during DataSource resolution.<br>Present only when one or more DataSources failed to resolve<br>(e.g. referenced content was deleted, DataSource query timed out).<br>When absent or empty, all data resolved successfully.<br>Each string describes the specific resolution failure.

data

Record<string, unknown>

No

Resolved block data.<br>Structure depends on the block's schema definition in the admin dashboard.<br>DataSource references are resolved server-side, so this object contains<br>actual data (e.g. arrays of content summaries, navigation links) rather<br>than DataSource identifiers.<br><br>Richtext fields within the data are automatically converted to HTML strings.

name

string

No

Human-readable display name of the block, as set in the admin dashboard.<br>For UI/debugging purposes; use slug for lookups.

slug

string

No

URL-friendly identifier for the block.<br>Unique within the site. Used to fetch individual blocks via blocks.getBySlug().<br>Also used as the key in the globals map returned by site.getConfig().


LegalDocument

Interface

A legal document (privacy policy, terms of service, cookie policy, etc.).

Legal documents are implemented as pages tagged with 'legal' in the CMS. They use the same schema-driven data model as regular pages but are surfaced through the dedicated legal service for convenience.

Property

Type

Optional

Description

data

Record<string, unknown>

No

Document content resolved from the page's schema.<br>Structure depends on how the page's schema was configured in the admin.<br>Richtext fields are automatically converted to HTML strings.<br>Typically contains a 'content' or 'body' key with the legal text as HTML.

id

string

No

Unique identifier for the document.<br>Format varies by implementation (numeric string or UUID).

locale

string

No

Locale code of this document version (e.g. 'en', 'fr').<br>Each locale has its own version of the legal document.

name

string

No

Display name of the document (e.g. 'Privacy Policy', 'Terms of Service').<br>Localized -- changes based on the requested locale.

seo

{ description?: string | null; ogImage?: string | null; title?: string | null } | null

Yes

SEO metadata for the document.<br>null when no SEO settings have been configured for this page.

slug

string

No

URL-friendly slug used to fetch the document via legal.getBySlug().<br>Typically descriptive: 'privacy-policy', 'terms-of-service', 'cookie-policy'.<br>Unique within the site for a given locale.

updatedAt

string

No

ISO 8601 datetime string of the last update.<br>Important for legal compliance -- display this to indicate when the document<br>was last revised (e.g. "Last updated: March 15, 2025").


Page

Interface

Full page with resolved data sources, SEO settings, and locale alternates. Returned by single-page endpoints (GET /public/pages/:idOrSlug).

Pages are layout-driven containers whose content comes from DataSources — configurable queries that fetch content, categories, forms, or other data. The API resolves all DataSources server-side and returns the results in data.

Extends: PageSummary

Property

Type

Optional

Description

_warnings

string[]

Yes

Warnings emitted during DataSource resolution.<br>Present only when one or more DataSources encountered non-fatal errors<br>(e.g. a referenced content was deleted, a query returned no results unexpectedly).<br>undefined when all DataSources resolved successfully.<br><br>These are informational — the page still renders, but some data keys may<br>contain empty arrays or null instead of the expected content.<br>Useful for debugging during development; avoid displaying these to end users.

alternates

Alternate[]

No

Alternate language versions of this page.<br>Empty array if the site has only one locale or no translations exist.<br>Always includes the current locale (with current: true).<br>Use these to build <link rel="alternate" hreflang="xx" href="..."> tags<br>and language switcher navigation.

data

Record<string, unknown>

No

Resolved data from all configured DataSources, keyed by the DataSource name.<br><br>Each key corresponds to a DataSource defined in the page's schema.<br>The value type depends on the DataSource type:<br>- Content list: array of ContentSummary objects<br>- Single content: a Content object<br>- Category list: array of Category objects<br>- Form: a Form object<br>- Custom data: any JSON value

id

number

No

Unique numeric page ID. Auto-incremented.<br>Use this for API calls like GET /public/pages/:id.

locale

string

No

BCP 47 locale code of this page (e.g. 'en', 'fr').<br>Matches one of the site's enabled locales.

name

string

No

Internal page name used for identification in the admin dashboard.<br>May differ from the SEO title. Max 255 characters.

path

string | null

No

URL path for this page, including locale prefix when applicable.<br>Format: '/about' (mono-language) or '/en/about' (multi-language).<br>null if the page has no path set (e.g. a page used only as a data container).<br>Does not include the domain — prepend your site's base URL.

seo

PageSeo | null

No

Page-level SEO settings for meta tags, Open Graph, and Twitter Card.<br>null if no SEO settings are configured for this page.

slug

string

No

URL-friendly slug, unique within the site for this locale.<br>Lowercase, hyphenated (e.g. 'about-us'). Max 255 characters.<br>Can be used instead of id in API calls: GET /public/pages/:slug.

updatedAt

string | null

No

ISO 8601 datetime of the last modification (e.g. '2024-06-01T14:00:00.000+00:00').<br>Updated whenever the page content, data sources, or SEO settings are saved.<br>null if the page has never been modified after creation (rare edge case).


PageSeo

Interface

SEO settings for a page, controlling meta tags, Open Graph, Twitter Card, and technical SEO directives.

All fields are optional — unset fields mean "use the default" or "don't render this tag". The frontend is responsible for rendering these values into the appropriate <meta> tags.

Property

Type

Optional

Description

canonicalUrl

string

Yes

Override canonical URL for this page. Absolute URL.<br>undefined means the page's own URL is canonical.<br>Use when the same content is accessible at multiple URLs to avoid duplicate content penalties.

keywords

string[]

Yes

Array of keyword strings for <meta name="keywords">.<br>undefined means no keywords are set.<br>Note: most search engines no longer use this for ranking.

metaDescription

string

Yes

<meta name="description"> value.<br>undefined means no meta description is set.<br>Recommended length: 150-160 characters for optimal search engine display.

metaTitle

string

Yes

Custom <title> and <meta property="og:title"> value.<br>undefined means use the page name as fallback.<br>Recommended length: 50-60 characters for optimal search engine display.

noIndex

boolean

Yes

When true, adds <meta name="robots" content="noindex"> to prevent search engine indexing.<br>undefined or false means the page is indexable.<br>Use for staging pages, internal tools, or pages that should not appear in search results.

ogDescription

string

Yes

<meta property="og:description"> value.<br>undefined means fall back to metaDescription.

ogImage

SeoImage | null

Yes

Image for Open Graph sharing previews.<br>null means explicitly no image; undefined means not configured.<br>Recommended size: 1200x630px.

ogSiteName

string

Yes

<meta property="og:site_name"> value.<br>undefined means use the site's name from site settings.

ogTitle

string

Yes

<meta property="og:title"> value.<br>undefined means fall back to metaTitle, then the page name.

ogUrl

string

Yes

<meta property="og:url"> value. Absolute URL.<br>undefined means use the canonical URL or the page's own URL.

twitterCard

"summary" | "summary_large_image" | "app" | "player"

Yes

<meta name="twitter:card"> value controlling the Twitter Card layout:<br>- 'summary': small square image with title and description<br>- 'summary_large_image': large banner image above title and description<br>- 'app': app install card (rarely used for websites)<br>- 'player': embedded media player<br><br>undefined defaults to 'summary_large_image' if an image is present.

twitterDescription

string

Yes

<meta name="twitter:description"> value.<br>undefined means fall back to ogDescription, then metaDescription.

twitterImage

SeoImage | null

Yes

Image for Twitter Card previews.<br>null means explicitly no image; undefined means fall back to ogImage.<br>Recommended size: 1200x628px for summary_large_image, 144x144px for summary.

twitterTitle

string

Yes

<meta name="twitter:title"> value.<br>undefined means fall back to ogTitle, then metaTitle, then the page name.


PageSummary

Interface

Lightweight page representation returned in list endpoints. Contains basic identification and routing information.

Use Page (from GET /public/pages/:idOrSlug) for the full page including resolved data, SEO settings, and alternates.

Property

Type

Optional

Description

id

number

No

Unique numeric page ID. Auto-incremented.<br>Use this for API calls like GET /public/pages/:id.

locale

string

No

BCP 47 locale code of this page (e.g. 'en', 'fr').<br>Matches one of the site's enabled locales.

name

string

No

Internal page name used for identification in the admin dashboard.<br>May differ from the SEO title. Max 255 characters.

path

string | null

No

URL path for this page, including locale prefix when applicable.<br>Format: '/about' (mono-language) or '/en/about' (multi-language).<br>null if the page has no path set (e.g. a page used only as a data container).<br>Does not include the domain — prepend your site's base URL.

slug

string

No

URL-friendly slug, unique within the site for this locale.<br>Lowercase, hyphenated (e.g. 'about-us'). Max 255 characters.<br>Can be used instead of id in API calls: GET /public/pages/:slug.

updatedAt

string | null

No

ISO 8601 datetime of the last modification (e.g. '2024-06-01T14:00:00.000+00:00').<br>Updated whenever the page content, data sources, or SEO settings are saved.<br>null if the page has never been modified after creation (rare edge case).