Search Documentation
Search for a documentation page...
Post Comments API
REST API endpoints for moderating blog comments and accepting visitor submissions.
Blog comments have two sides. Visitors submit comments via POST /api/v1/posts/{idOrSlug}/comments — these arrive unapproved and stay hidden until a moderator approves them. The store-scoped moderation endpoints under /api/v1/post-comments let you list every comment (including pending ones), approve or reject them, and delete spam.
List Comments (Moderation)
Returns blog comments across all posts for moderation, including those still pending approval. Use this to build a moderation queue. To submit a comment as a visitor, use POST /api/v1/posts/{idOrSlug}/comments instead.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Comments per page (1-100) |
offset | number | 0 | Comments to skip |
query | string | — | Search term for content, author, or email |
approved | boolean | — | Filter by approval status (omit for all, including pending) |
Response (200)
Get Comment
Returns a single blog comment by UUID.
Response (200)
Not Found (404)
Approve or Reject Comment
Sets the comment's approved flag. true publishes it on the storefront; false unpublishes/rejects it.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
approved | boolean | Yes | true to publish, false to unpublish/reject |
Response (200)
Returns the updated comment with the new approved value.
Delete Comment
Hard-deletes the comment by UUID.
Response (200)
List Comments on a Post
Returns approved comments for a single post, resolved by UUID or slug, newest first. This is the visitor-facing list shown on the storefront — pending comments are excluded.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Comments per page (1-100) |
offset | number | 0 | Comments to skip |
Response (200)
Add a Comment to a Post
Creates a comment on the given post (resolved by UUID or slug). New comments are created unapproved (approved: false) and stay hidden until a moderator approves them via PATCH /api/v1/post-comments/{id}.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
author | string | Yes | Commenter display name (1-100 characters) |
email | string | Yes | Commenter email address (valid email) |
content | string | Yes | Comment text (1-5000 characters) |