Blog
Category for public blog API endpoints.
Available endpoints
GET /api/posts- Returns a list of published blog posts.
- Limit: up to 100 records.
- Response:
{ ok, posts }
GET /api/posts/:slug- Returns a single published blog post by slug.
- Errors:
400for missing slug,404when the post does not exist. - Response:
{ ok, post }
GET /api/search?q=query- Searches published blog posts by title, slug, excerpt, content and category name.
- When
qis empty, the endpoint returns the newest posts. - Response:
{ ok, items, total }
GET /:slug/json- Returns the full JSON payload of a single published post by slug.
- Errors:
400for missing slug,404when the post does not exist. - Response:
{ ok, post }
GET /api/categories- Returns the list of blog categories.
- Supports optional
qfilter forslugorname. - Response:
{ ok, categories }
POST /api/categories- Creates a new blog category.
- JSON body:
{ name, slug? } - Errors:
400for invalid payload,409for duplicate slug. - Response:
{ ok, category }
GET /api/categories/:id- Returns a single category by id.
- Errors:
400for invalid id,404when the category does not exist. - Response:
{ ok, category }
PUT /api/categories/:idPATCH /api/categories/:id- Updates a blog category.
- JSON body:
{ name?, slug? } - Errors:
400,404,409. - Response:
{ ok, category }
DELETE /api/categories/:id- Deletes a category if it is not the default category and is not linked to blog posts.
- Errors:
400,404,409. - Response:
{ ok: true }
Notes
- All endpoints return JSON.
- Error responses use
{ ok: false, error }. - Category endpoints are currently publicly accessible and are not protected by an authorization layer.

