Comment System
Add comments to any page or blog post. Supports threaded replies, moderation (approve/reject), and visitor identification via SAPI Visitor Auth. Comments are pending by default until approved.
Endpoints (6)
Submit a comment on a page. Status is "pending" by default — requires moderation. If the visitor is authenticated via SAPI Visitor Auth, their identity is attached automatically.
| Field | Type | Required | Description |
|---|---|---|---|
page_slug |
string | ✓ Yes | The page slug this comment is for (e.g. "blog/my-post", "about"). |
author_name |
string | ✓ Yes | Display name of the commenter. |
author_email |
string | No | Email of the commenter (not displayed publicly, used for Gravatar and moderation notifications). |
body |
string | ✓ Yes | Comment text. HTML is stripped server-side. Max 5000 characters. |
parent_id |
integer | No | ID of the parent comment for threaded replies. Omit for top-level comments. |
visitor_id |
string | No | SAPI Visitor Auth ID (auto-attached from session if authenticated). |
List comments for a page. Default: only approved comments, newest first. Returns threaded structure (replies nested under parent). Use status="any" or "pending" for moderation view.
| Field | Type | Required | Description |
|---|---|---|---|
page_slug |
string | ✓ Yes | The page slug to get comments for. |
status |
string | No | Filter: "approved" (default for public), "pending", "rejected", or "any" (for moderation). Admin auth required for non-approved. |
sort |
string | No | "newest" (default) or "oldest". |
limit |
integer | No | Max comments per page (default: 50, max: 200). |
offset |
integer | No | Pagination offset. |
Approve or reject a comment. Sets moderated_at timestamp. Requires admin auth (wsa_ token).
| Field | Type | Required | Description |
|---|---|---|---|
comment_id |
integer | ✓ Yes | The comment ID to moderate. |
status |
string | ✓ Yes | "approved" or "rejected". |
Delete a comment permanently. Also deletes all replies (children). Requires admin auth.
| Field | Type | Required | Description |
|---|---|---|---|
comment_id |
integer | ✓ Yes | The comment ID to delete. |
Get comment counts for one or more pages. Useful for displaying "12 comments" badges on blog listing pages. Only counts approved comments.
| Field | Type | Required | Description |
|---|---|---|---|
page_slugs |
array | ✓ Yes | Array of page slugs, e.g. ["blog/post-1", "blog/post-2"]. Max 50. |
Get the most recent approved comments across all pages. Useful for a "Recent Comments" sidebar widget.
| Field | Type | Required | Description |
|---|---|---|---|
limit |
integer | No | Number of recent comments (default: 5, max: 20). |
MCP Tool Names
When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:
| Endpoint | MCP Tool Name |
|---|---|
| submit-comment | comment-system_submit_comment |
| list-comments | comment-system_list_comments |
| moderate-comment | comment-system_moderate_comment |
| delete-comment | comment-system_delete_comment |
| get-comment-counts | comment-system_get_comment_counts |
| get-recent-comments | comment-system_get_recent_comments |