Posts API
Endpoints for retrieving posts.
GET
/posts
Retrieves a paginated list of published posts. Posts can be filtered by category or tag.
Query Parameters
category
OptionalSlug of the category to filter by.tag
OptionalSlug of the tag to filter by.page
OptionalPage number for pagination. Defaults to 1.limit
OptionalNumber of items per page. Defaults to 10.
Response
json
{
"posts": [
{
"title": "My First Blog Post",
"slug": "my-first-blog-post",
"excerpt": "This is a short summary of the post...",
"publishedAt": "2025-08-12T19:28:43.383Z",
"author": { "name": "Admin User" }
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 10,
"pages": 1
}
}
GET
/posts/{slug}
Retrieves a single published post by its unique slug.
Path Parameters
slug
RequiredThe unique slug of the post.
Response
json
{
"title": "My First Blog Post",
"slug": "my-first-blog-post",
"content": "<p>This is the full content of the post.</p>",
"excerpt": "This is a short summary of the post...",
"publishedAt": "2025-08-12T19:28:43.383Z",
"author": {
"name": "Admin User"
},
"category": {
"name": "General",
"slug": "general"
}
}