Comments
LIVEComments on posts with name, email, and body. Filter by postId.
Endpoints
- GETPOSTList or create
- GETPATCHDELETERead, update, or delete one/api/comments/:id
- GETFilter by post
- GETSearch
Query params
| Param | Description | Example |
|---|---|---|
| search | Name, email, or body | search=thanks |
| postId | Filter by post UUID | postId=… |
| sort | createdAt · name | sort=name |
| page | Page number · default 1 | page=2 |
| limit | Page size · default 12 · max 50 | limit=12 |
| order | asc · desc | order=asc |
| lang | Pass fa for Persian text · omit for English (default) | lang=fa |
| delay | Artificial wait in ms · max 5000 | delay=800 |
| status | Force error HTTP status · 400–599 | status=500 |
Persian text: add lang=fa. See Docs · Language.
Request
1const { data } = await axios.get('/api/comments', { params: { limit: 12 } });Response
1{2 "data": [3 {4 "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",5 "postId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",6 "name": "Alex Rivera",7 "email": "alex@example.com",8 "body": "Nice post — thanks for sharing.",9 "createdAt": "2026-09-14T10:00:00.000Z",10 "updatedAt": "2026-09-14T10:00:00.000Z"11 }12 ],13 "pagination": {14 "page": 1,15 "limit": 12,16 "total": 24,17 "totalPages": 218 }19}