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; the owner can turn on auto_approve (configure) so comments without a link are published at once. Visitors post through a SAPI form (configure_form, action type iapi, service comment-system, endpoint submit-comment with page_slug, author_name, author_email, body and optional parent_id), so the form honeypot, timing check and rate limit apply. Pages read approved comments with list-comments, get-comment-counts and get-recent-comments.
Try it with your AI assistant
Once WebsitePublisher is connected to your AI assistant, paste one of these into the chat.
@WebsitePublisher add comments under my blog posts that only show after I approve them@WebsitePublisher show the comments waiting for approval and approve the ones that are not spamWith WebsitePublisher, add comments under my blog posts that only show after I approve themWith WebsitePublisher, show the comments waiting for approval and approve the ones that are not spamWith WebsitePublisher, add comments under my blog posts that only show after I approve themWith WebsitePublisher, show the comments waiting for approval and approve the ones that are not spamEndpoints (7)
Owner only. Read or change the comment settings. auto_approve true: a comment without a link is published at once; a comment with a URL, www. or a domain name in its text or name still waits for moderation. Default false: every comment waits. Call without fields to read the current settings.
| Field | Type | Required | Description |
|---|---|---|---|
auto_approve |
boolean | No | true = publish comments without a link at once; false = every comment waits for moderation (default). |
Submit a comment on a page, from a SAPI form action (type iapi), so the form honeypot, timing check and rate limit apply. Status is "pending" by default and needs moderation; with auto_approve on (configure) a comment without a link is "approved" at once, a comment with a link stays "pending" (held_reason contains_link).
| Field | Type | Required | Description |
|---|---|---|---|
page_slug |
string | ✓ Yes | The page slug this comment is for (e.g. "blog/my-post", "about"). The characters < > " ' and control characters are refused. |
author_name |
string | ✓ Yes | Display name of the commenter. HTML, the characters < > " and control characters are removed server-side. |
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. Show comments on the page with textContent, not innerHTML. Max 5000 characters. |
parent_id |
integer | No | ID of the parent comment for threaded replies. Omit for top-level comments. |
visitor_id |
string | No | Optional visitor reference, stored with the comment and shown only to the owner. Not verified. |
List comments for a page, threaded (replies nested under their parent), newest first by default. From a page (SAPI, no login) it always returns approved comments only, without visitor_id. As owner use status "pending" to find comments waiting for moderation, or "any". Render author_name and body with textContent, not innerHTML. limit max 200.
| Field | Type | Required | Description |
|---|---|---|---|
page_slug |
string | ✓ Yes | The page slug to get comments for. |
status |
string | No | Filter: "approved" (default), "pending", "rejected", or "any" (for moderation). Owner only: visitor calls always get 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 |
|---|---|
| configure | comment-system_configure |
| 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 |
Website