Hierarchical content categorization. Categories support nesting (parent/child), multi-language translations, and optional structured content schemas.
When a category has a custom schema defined, contents assigned to it can
include customData with fields matching that schema.
8 endpoints
GET /categories
List categories
Returns a flat list of all categories for your site. Use
GET /categories/tree for the nested hierarchy.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| query | number | No | Number |
| query | number | No | Number <= 100 |
| query | string | No | Full-text search query |
| query | "created_at" | "updated_at" | "name" | "slug" | No | One of: created_at, updated_at, name, slug |
| query | "asc" | "desc" | No | One of: asc, desc |
| query | string | No | Filter from date (ISO 8601) |
| query | string | No | Filter until date (ISO 8601) |
| query | string | No | URL-friendly identifier, unique per site and locale |
| query | string[] | No | Array of strings |
| query | string[] | No | Array of strings |
| query | string[] | No | Array of strings |
| query | string | null | No | Parent resource ID |
| query | boolean | No | Boolean |
| query | boolean | No | Boolean |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Examples
curl https://api.lynkow.com/v1/categories \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": [
{
"id": 1,
"name": "Tutorials",
"slug": "tutorials",
"description": "Step-by-step guides and how-tos",
"parentId": null,
"locale": "en",
"contentCount": 12,
"createdAt": "2025-01-10T09:00:00.000Z"
},
{
"id": 2,
"name": "API Guides",
"slug": "api-guides",
"description": "REST API integration tutorials",
"parentId": 1,
"locale": "en",
"contentCount": 5,
"createdAt": "2025-01-12T14:00:00.000Z"
}
],
"meta": {
"total": 8,
"perPage": 15,
"currentPage": 1,
"lastPage": 1
}
}POST /categories
Create a category
Creates a new category. Set parentId to create it as a child of an
existing category. The slug is auto-generated from the name if not provided.
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Required. Display name. 1-255 characters |
| string | Yes | Required. URL-friendly identifier, unique per site and locale. 1-255 characters |
| string | null | No | Description text |
| string | null | No | Image URL |
| string | null | No | Parent resource ID |
| string | No | BCP 47 locale code (e.g. "en", "fr") |
| number | null | No | Sitemap priority (0.0-1.0) |
| "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never" | null | No | Sitemap change frequency (daily, weekly, monthly) |
| "standard" | "structured" | No | One of: standard, structured |
| object | No | Field schema definition |
| "own" | "inherit" | No | One of: own, inherit |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Validation error |
Notes: - Maximum nesting depth is not enforced, but 3 levels is recommended for UX.
Examples
curl -X POST https://api.lynkow.com/v1/categories \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "API Guides",
"description": "REST API integration tutorials",
"parentId": 1
}'Response Example
{
"data": {
"id": 5,
"name": "API Guides",
"slug": "api-guides",
"description": "REST API integration tutorials",
"parentId": 1,
"locale": "en",
"contentCount": 0,
"createdAt": "2025-04-06T12:00:00.000Z",
"updatedAt": "2025-04-06T12:00:00.000Z"
}
}GET /categories/tree
Get category tree
Returns categories as a nested tree structure, with each parent containing its children. Useful for building navigation menus and sidebar filters.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Examples
curl https://api.lynkow.com/v1/categories/tree \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": [
{
"id": 1,
"name": "Tutorials",
"slug": "tutorials",
"contentCount": 12,
"children": [
{
"id": 2,
"name": "API Guides",
"slug": "api-guides",
"contentCount": 5,
"children": []
},
{
"id": 3,
"name": "Frontend",
"slug": "frontend",
"contentCount": 7,
"children": []
}
]
},
{
"id": 4,
"name": "News",
"slug": "news",
"contentCount": 18,
"children": []
}
]
}GET /categories/:id
Get a category
Returns a single category with its parent information and content count.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Examples
curl https://api.lynkow.com/v1/categories/1 \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"id": 1,
"name": "Tutorials",
"slug": "tutorials",
"description": "Step-by-step guides and how-tos",
"parentId": null,
"locale": "en",
"contentCount": 12,
"parent": null,
"contents": {
"data": [
{
"id": 42,
"title": "Getting Started with Lynkow",
"slug": "getting-started-with-lynkow",
"status": "published"
}
],
"meta": {
"total": 12,
"perPage": 15,
"currentPage": 1,
"lastPage": 1
}
},
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-02-20T16:45:00.000Z"
}PUT /categories/:id
Update a category
Updates a category's name, slug, description, parent, or schema. Moving a category to a different parent re-organizes the tree.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| string | No | Display name. 1-255 characters |
| string | No | URL-friendly identifier, unique per site and locale. 1-255 characters |
| string | null | No | Description text |
| string | null | No | Image URL |
| string | null | No | Parent resource ID |
| number | null | No | Sitemap priority (0.0-1.0) |
| "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never" | null | No | Sitemap change frequency (daily, weekly, monthly) |
| "standard" | "structured" | No | One of: standard, structured |
| object | No | Field schema definition |
| "own" | "inherit" | No | One of: own, inherit |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
| Validation error |
Notes: - Changing the slug does not update content URLs — only the category's own slug changes.
Examples
curl -X PUT https://api.lynkow.com/v1/categories/5 \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "REST API Guides",
"description": "Updated description for API guides"
}'Response Example
{
"data": {
"id": 5,
"name": "REST API Guides",
"slug": "api-guides",
"description": "Updated description for API guides",
"parentId": 1,
"locale": "en",
"contentCount": 5,
"createdAt": "2025-04-06T12:00:00.000Z",
"updatedAt": "2025-04-06T16:00:00.000Z"
}
}DELETE /categories/:id
Delete a category
Deletes a category. Contents assigned to this category are NOT deleted — they simply lose this category association.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Notes: - Child categories are re-parented to the deleted category's parent (or become root-level).
Examples
curl -X DELETE https://api.lynkow.com/v1/categories/5 \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"message": "Category deleted"
}GET /categories/:id/translations
Get category translation status
Returns the translation status for this category across all enabled locales.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Examples
curl https://api.lynkow.com/v1/categories/1/translations \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": {
"en": {
"status": "complete"
},
"fr": {
"status": "missing"
},
"es": {
"status": "partial"
}
}
}POST /categories/:id/copy-to-locale
Copy category to another locale
Creates a translated copy of this category in the target locale.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Unique identifier |
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Required |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
| Validation error |
Examples
curl -X POST https://api.lynkow.com/v1/categories/1/copy-to-locale \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"locale": "fr"}'Response Example
{
"data": {
"id": 50,
"name": "Tutorials",
"slug": "tutorials",
"description": "Step-by-step guides and how-tos",
"parentId": null,
"locale": "fr",
"createdAt": "2025-04-06T15:00:00.000Z",
"updatedAt": "2025-04-06T15:00:00.000Z"
}
}