Gen-Endpoint
Back to API List
Blog & CMS API
Manage blog posts, categories, tags, content publishing, and SEO metadata.
Content
Internal API - Hosted by this App
API Endpoints & Usage
Explore and interact with the available endpoints for the Blog & CMS API. These API routes are live! The paths shown below are relative to your application's base URL. For example, if this application is hosted at https://gen-endpoint.com, an endpoint path for this API, such as /api/posts, would be accessible at https://gen-endpoint.com/api/posts. You can use the "Try it out" section for each endpoint or use tools like curl, Postman, or your browser's address bar (for GET requests) to interact with them.
GET

/api/posts

List blog posts with pagination, filtering (status, category, search), and sorting.

Show Static Examples

Example Request Parameters:

?status=published&category=tech&page=1&limit=10&search=javascript

Example Response:

{
  "posts": [
    {
      "id": "post_123",
      "title": "Getting Started with JavaScript",
      "slug": "getting-started-javascript",
      "excerpt": "Learn the basics of JavaScript programming...",
      "author": {
        "id": "usr_1",
        "name": "Alice Wonderland"
      },
      "publishedAt": "2024-08-15T10:00:00Z",
      "readTime": "5 min"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 45
  }
}
Try it out

You can add or change query parameters in the path above (e.g., ?name=User).

POST

/api/posts

Create new blog post with SEO metadata.

Show Static Examples

Example Request Body:

{
  "title": "Advanced React Patterns",
  "content": "# Advanced React Patterns - In this post we explore advanced React development patterns including render props, compound components, and custom hooks.",
  "excerpt": "Explore advanced patterns in React development",
  "categoryId": "cat_1",
  "tags": ["react", "javascript", "frontend"],
  "seo": {"metaDescription": "Learn advanced React patterns", "keywords": ["react", "patterns"]}
}

Example Response:

{
  "id": "post_124",
  "title": "Advanced React Patterns",
  "slug": "advanced-react-patterns",
  "status": "draft",
  "createdAt": "2024-08-16T12:00:00Z"
}
Try it out
GET

/api/posts/{slug}

Get single post by slug with full content. Replace {slug} with an actual post slug like "getting-started-javascript".

Show Static Examples

Example Response:

{
  "id": "post_123",
  "title": "Getting Started with JavaScript",
  "content": "# Getting Started with JavaScript - A versatile programming language used for web development.",
  "author": {
    "id": "usr_1",
    "name": "Alice Wonderland"
  },
  "publishedAt": "2024-08-15T10:00:00Z",
  "views": 1250,
  "likes": 89
}
Try it out

Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).

GET

/api/categories

List post categories and tags with post counts.

Show Static Examples

Example Response:

{
  "categories": [
    {
      "id": "cat_1",
      "name": "Technology",
      "slug": "tech",
      "postCount": 25
    },
    {
      "id": "cat_2",
      "name": "Design",
      "slug": "design",
      "postCount": 18
    }
  ],
  "tags": [
    {
      "name": "javascript",
      "count": 15
    },
    {
      "name": "react",
      "count": 12
    }
  ]
}
Try it out

You can add or change query parameters in the path above (e.g., ?name=User).