Skip to content
Webmaster DB

Mock Comments API

Free REST API for testing comment systems and discussion features with CRUD operations

Documentation

A free REST API for testing and prototyping comment systems and discussion features. Perfect for testing comment systems and discussion features, prototyping blog and forum comment sections, building social media comment threads, learning nested comment structures and replies, and testing moderation and filtering features. No authentication required.

Available Endpoints

GET/api/mock/commentsGet all comments
GET/api/mock/comments?postId=:postIdGet comments by post
GET/api/mock/comments/:idGet a specific comment
POST/api/mock/commentsCreate a new comment
PUT/api/mock/comments/:idUpdate a comment
DELETE/api/mock/comments/:idDelete a comment

Comment Schema

{
  "id": 1,
  "postId": 1,
  "name": "Great article!",
  "email": "reader1@example.com",
  "body": "This was really helpful. Thanks for sharing!",
  "createdAt": "2024-02-11T00:00:00.000Z"
}
Interactive API Tester
Code Examples
fetch('/api/mock/comments')
  .then(response => response.json())
  .then(data => console.log(data))

About this tool

Use it to

  • Test comment systems and discussion features
  • Prototype blog and forum comment sections
  • Build social media comment threads
  • Learn nested comment structures and replies
Get Post Comments
Filter comments by post with ?postId=1 to display all comments for a specific article or post.
Add Comment
Test comment creation by POSTing with postId, name, email, and body fields to add new comments.
  • Mock Users API

    Free REST API for testing user management features with full CRUD operations

  • Mock Posts API

    Free REST API for testing blog and content management features with CRUD operations

  • Mock Todos API

    Free REST API for testing task management and todo list features with CRUD operations

  • Mock Products API

    Free REST API for testing e-commerce and product catalog features with CRUD operations

Taggedapitestingmockrestcommentsdiscussions