Related services: CategoriesServicelynkow.categories.getBySlug(), lynkow.categories.list(), lynkow.categories.tree()

Category

Interface

A content category as returned in content relations and list select projections.

Categories organize content hierarchically and control how content is authored:

  • Standard mode: content uses the TipTap rich text editor (body field)

  • Structured mode: content uses custom fields defined by the category's schema (customData field)

This is the lightweight version — see CategoryWithCount and CategoryDetail for progressively richer representations.

Property

Type

Optional

Description

contentMode

"standard" | "structured"

Yes

Determines how content in this category is authored:<br>- 'standard': articles use the TipTap rich text editor (stored in Content.body)<br>- 'structured': articles use custom fields defined by the category's schema (stored in Content.customData)<br><br>Only present in detail responses (GET /public/categories/:id), not in lightweight<br>list projections (e.g. when categories are embedded in content responses).

id

number

No

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

locale

string

No

BCP 47 locale code of this category (e.g. 'en', 'fr').<br>Categories are locale-specific — each locale has its own set of categories.

name

string

No

Category display name in the requested locale (e.g. 'Technology', 'Tutorials').<br>Max 255 characters.

slug

string

No

URL-friendly slug, unique within the site for this locale.<br>Lowercase, hyphenated (e.g. 'web-development'). Max 255 characters.<br>Used in URL path generation for nested blog URL mode.


CategoryDetail

Interface

Full category detail with parent relationship. Returned by single-category endpoints (GET /public/categories/:id).

Extends CategoryWithCount with the parent category reference, enabling you to reconstruct the category hierarchy.

Extends: CategoryWithCount

Property

Type

Optional

Description

contentCount

number

No

Number of published content items in this category (for the current locale).<br>Does not count draft, scheduled, or archived content.<br>Does not include content from child categories — each category counts independently.

contentMode

"standard" | "structured"

Yes

Determines how content in this category is authored:<br>- 'standard': articles use the TipTap rich text editor (stored in Content.body)<br>- 'structured': articles use custom fields defined by the category's schema (stored in Content.customData)<br><br>Only present in detail responses (GET /public/categories/:id), not in lightweight<br>list projections (e.g. when categories are embedded in content responses).

description

string | null

No

Category description as plain text.<br>null if no description is set.<br>Useful for SEO meta descriptions on category listing pages.

id

number

No

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

image

string | null

No

Absolute URL to the category's image (original size).<br>null if no image is set.<br>Prefer imageVariants for optimized, CDN-resized versions.

imageVariants

ImageVariants

Yes

CDN-optimized image variants of the category image at multiple preset sizes.<br>undefined when no image is set or the site has no image transformations configured.<br><br>Available presets: thumbnail (400x300), card (600x400), content (1200w),<br>medium (960w), hero (1920w), og (1200x630), full (2560w).

locale

string

No

BCP 47 locale code of this category (e.g. 'en', 'fr').<br>Categories are locale-specific — each locale has its own set of categories.

name

string

No

Category display name in the requested locale (e.g. 'Technology', 'Tutorials').<br>Max 255 characters.

parentId

number | null

No

ID of the parent category, or null for root-level categories.<br>Use this to build breadcrumbs or reconstruct the category tree.<br>Categories support unlimited nesting depth.

path

string

No

Full URL path for this category's listing page.<br>Format depends on site configuration:<br>- Mono-language: '/blog/parent/child'<br>- Multi-language: '/en/blog/parent/child'<br><br>Includes the blog prefix and full parent category slug chain.<br>Does not include the domain — prepend your site's base URL.

schema

ContentSchema | null

Yes

Field schema for structured categories (when contentMode is 'structured').<br>Defines the custom fields available for content created in this category.<br>null or undefined when contentMode is 'standard'.<br><br>The schema may be the category's own or inherited from a parent category<br>(check schemaSource to distinguish).

schemaSource

"own" | "inherit" | null

Yes

Where the schema originates from:<br>- 'own': this category defines its own field schema<br>- 'inherit': the schema is inherited from a parent category (the nearest ancestor with a schema)<br>- null: no schema is set (standard content mode)<br><br>When 'inherit', the schema field contains the parent's schema.<br>Editing the parent's schema will automatically update all inheriting children.

slug

string

No

URL-friendly slug, unique within the site for this locale.<br>Lowercase, hyphenated (e.g. 'web-development'). Max 255 characters.<br>Used in URL path generation for nested blog URL mode.


CategoryTreeNode

Interface

Recursive category tree node, returned by the tree endpoint (GET /public/categories/tree).

Each node contains its full CategoryWithCount data plus a children array of nested sub-categories. The tree is pre-sorted by the API.

Extends: CategoryWithCount

Property

Type

Optional

Description

children

CategoryTreeNode[]

No

Direct child categories of this node.<br>Empty array ([]) for leaf categories with no sub-categories.<br>Recursively contains the full tree structure to unlimited depth.

contentCount

number

No

Number of published content items in this category (for the current locale).<br>Does not count draft, scheduled, or archived content.<br>Does not include content from child categories — each category counts independently.

contentMode

"standard" | "structured"

Yes

Determines how content in this category is authored:<br>- 'standard': articles use the TipTap rich text editor (stored in Content.body)<br>- 'structured': articles use custom fields defined by the category's schema (stored in Content.customData)<br><br>Only present in detail responses (GET /public/categories/:id), not in lightweight<br>list projections (e.g. when categories are embedded in content responses).

description

string | null

No

Category description as plain text.<br>null if no description is set.<br>Useful for SEO meta descriptions on category listing pages.

id

number

No

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

image

string | null

No

Absolute URL to the category's image (original size).<br>null if no image is set.<br>Prefer imageVariants for optimized, CDN-resized versions.

imageVariants

ImageVariants

Yes

CDN-optimized image variants of the category image at multiple preset sizes.<br>undefined when no image is set or the site has no image transformations configured.<br><br>Available presets: thumbnail (400x300), card (600x400), content (1200w),<br>medium (960w), hero (1920w), og (1200x630), full (2560w).

locale

string

No

BCP 47 locale code of this category (e.g. 'en', 'fr').<br>Categories are locale-specific — each locale has its own set of categories.

name

string

No

Category display name in the requested locale (e.g. 'Technology', 'Tutorials').<br>Max 255 characters.

path

string

No

Full URL path for this category's listing page.<br>Format depends on site configuration:<br>- Mono-language: '/blog/parent/child'<br>- Multi-language: '/en/blog/parent/child'<br><br>Includes the blog prefix and full parent category slug chain.<br>Does not include the domain — prepend your site's base URL.

schema

ContentSchema | null

Yes

Field schema for structured categories (when contentMode is 'structured').<br>Defines the custom fields available for content created in this category.<br>null or undefined when contentMode is 'standard'.<br><br>The schema may be the category's own or inherited from a parent category<br>(check schemaSource to distinguish).

schemaSource

"own" | "inherit" | null

Yes

Where the schema originates from:<br>- 'own': this category defines its own field schema<br>- 'inherit': the schema is inherited from a parent category (the nearest ancestor with a schema)<br>- null: no schema is set (standard content mode)<br><br>When 'inherit', the schema field contains the parent's schema.<br>Editing the parent's schema will automatically update all inheriting children.

slug

string

No

URL-friendly slug, unique within the site for this locale.<br>Lowercase, hyphenated (e.g. 'web-development'). Max 255 characters.<br>Used in URL path generation for nested blog URL mode.


CategoryWithCount

Interface

Category with URL path, description, image, and content count. Returned by list endpoints (GET /public/categories).

Extends Category with display-oriented fields useful for rendering category listing pages, navigation menus, and sidebar widgets.

Extends: Category

Property

Type

Optional

Description

contentCount

number

No

Number of published content items in this category (for the current locale).<br>Does not count draft, scheduled, or archived content.<br>Does not include content from child categories — each category counts independently.

contentMode

"standard" | "structured"

Yes

Determines how content in this category is authored:<br>- 'standard': articles use the TipTap rich text editor (stored in Content.body)<br>- 'structured': articles use custom fields defined by the category's schema (stored in Content.customData)<br><br>Only present in detail responses (GET /public/categories/:id), not in lightweight<br>list projections (e.g. when categories are embedded in content responses).

description

string | null

No

Category description as plain text.<br>null if no description is set.<br>Useful for SEO meta descriptions on category listing pages.

id

number

No

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

image

string | null

No

Absolute URL to the category's image (original size).<br>null if no image is set.<br>Prefer imageVariants for optimized, CDN-resized versions.

imageVariants

ImageVariants

Yes

CDN-optimized image variants of the category image at multiple preset sizes.<br>undefined when no image is set or the site has no image transformations configured.<br><br>Available presets: thumbnail (400x300), card (600x400), content (1200w),<br>medium (960w), hero (1920w), og (1200x630), full (2560w).

locale

string

No

BCP 47 locale code of this category (e.g. 'en', 'fr').<br>Categories are locale-specific — each locale has its own set of categories.

name

string

No

Category display name in the requested locale (e.g. 'Technology', 'Tutorials').<br>Max 255 characters.

path

string

No

Full URL path for this category's listing page.<br>Format depends on site configuration:<br>- Mono-language: '/blog/parent/child'<br>- Multi-language: '/en/blog/parent/child'<br><br>Includes the blog prefix and full parent category slug chain.<br>Does not include the domain — prepend your site's base URL.

schema

ContentSchema | null

Yes

Field schema for structured categories (when contentMode is 'structured').<br>Defines the custom fields available for content created in this category.<br>null or undefined when contentMode is 'standard'.<br><br>The schema may be the category's own or inherited from a parent category<br>(check schemaSource to distinguish).

schemaSource

"own" | "inherit" | null

Yes

Where the schema originates from:<br>- 'own': this category defines its own field schema<br>- 'inherit': the schema is inherited from a parent category (the nearest ancestor with a schema)<br>- null: no schema is set (standard content mode)<br><br>When 'inherit', the schema field contains the parent's schema.<br>Editing the parent's schema will automatically update all inheriting children.

slug

string

No

URL-friendly slug, unique within the site for this locale.<br>Lowercase, hyphenated (e.g. 'web-development'). Max 255 characters.<br>Used in URL path generation for nested blog URL mode.