Posts API
Endpoints for retrieving posts.
GET
/postsRetrieves a paginated list of published posts. Posts can be filtered by category or tag.
Query Parameters
categoryOptionalSlug of the category to filter by.tagOptionalSlug of the tag to filter by.pageOptionalPage number for pagination. Defaults to 1.limitOptionalNumber 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
slugRequiredThe 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"
}
}