Singleton content entries identified by slug (not ID). Use single types for one-off pages like "About", "Privacy Policy", or "Terms of Service" where only one instance exists per locale.
Single types use the same rich text editor as regular contents but are addressed by slug instead of numeric ID.
5 endpoints
GET /single-types
List single types
Returns all defined single types for your site.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Examples
curl https://api.lynkow.com/v1/single-types \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": [
{
"slug": "about",
"name": "About Page",
"locale": "en",
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-03-20T14:00:00.000Z"
},
{
"slug": "privacy-policy",
"name": "Privacy Policy",
"locale": "en",
"createdAt": "2025-01-12T10:00:00.000Z",
"updatedAt": "2025-02-15T11:00:00.000Z"
}
],
"meta": {
"total": 3,
"perPage": 15,
"currentPage": 1,
"lastPage": 1
}
}POST /single-types
Create a single type
Creates a new single type. The slug must be unique and is used as the permanent identifier (it cannot be changed after creation).
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Required. URL-friendly identifier, unique per site and locale. 1-100 characters |
| string | Yes | Required. Display name. 1-255 characters |
| string | No | Description text |
| object | Yes | Required. Resource data object |
| object | No | Field schema definition |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Validation error |
Examples
curl -X POST https://api.lynkow.com/v1/single-types \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Terms of Service",
"slug": "terms-of-service",
"bodyMarkdown": "# Terms of Service\n\nLast updated: April 2025."
}'Response Example
{
"data": {
"slug": "terms-of-service",
"name": "Terms of Service",
"bodyHtml": "<h1>Terms of Service</h1><p>Last updated: April 2025.</p>",
"locale": "en",
"createdAt": "2025-04-06T12:00:00.000Z",
"updatedAt": "2025-04-06T12:00:00.000Z"
}
}GET /single-types/:slug
Get a single type
Returns a single type by its slug, including the full body content.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | URL-friendly identifier, unique per site and locale |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Examples
curl https://api.lynkow.com/v1/single-types/about \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"data": {
"slug": "about",
"name": "About Page",
"bodyHtml": "<h1>About Us</h1><p>We build tools for the modern web.</p>",
"locale": "en",
"meta": {
"metaTitle": "About Us | My Website",
"metaDescription": "Learn about our company and mission."
},
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-03-20T14:00:00.000Z"
}
}PUT /single-types/:slug
Update a single type
Updates the content of a single type. The slug cannot be changed.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | URL-friendly identifier, unique per site and locale |
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| string | No | URL-friendly identifier, unique per site and locale. 1-100 characters |
| string | No | Display name. 1-255 characters |
| string | No | Description text |
| object | No | Resource data object |
| object | No | Field schema definition |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
| Validation error |
Examples
curl -X PUT https://api.lynkow.com/v1/single-types/about \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "About Us",
"bodyMarkdown": "# About Us\n\nUpdated company description."
}'Response Example
{
"data": {
"slug": "about",
"name": "About Us",
"bodyHtml": "<h1>About Us</h1><p>Updated company description.</p>",
"locale": "en",
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-04-06T14:00:00.000Z"
}
}DELETE /single-types/:slug
Delete a single type
Permanently deletes a single type.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | URL-friendly identifier, unique per site and locale |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
Examples
curl -X DELETE https://api.lynkow.com/v1/single-types/terms-of-service \
-H "Authorization: Bearer $API_TOKEN"Response Example
{
"message": "Single type deleted"
}