Contentrain Studio lets visitors comment on the entries of your collection and document models. Visitors post through a public API, and your team moderates the comments in Studio before (or after) they appear on your site.
Comments live in Studio, not in Git
Only the comment configuration is stored in the model definition in your repository. The comments themselves are stored in Studio's database, so approving or rejecting a comment never creates a commit or a review branch.
Availability
Comments and moderation need the comments.enabled plan feature. Related features are gated separately:
Open the model's Comments tab. The filter bar shows the number of comments per status: Pending, Approved, Spam, Rejected, or All.
Action
What it does
Approve
Shows the comment on your site
Spam
Hides the comment and keeps it in the moderation log
Reject
Hides the comment and keeps it in the moderation log
Restore
Moves a rejected or spam comment back to pending
Delete
Removes the comment and all of its replies permanently
Reply
Publishes a reply from you as a moderator, immediately. Replying to a pending comment approves it first
Close comments on this entry
Blocks new comments on that entry; existing approved comments keep showing. Reopen comments reverses it
Click a comment to open its details (author, email, website, source IP, the comment it replies to, and when it was moderated).
For many comments at once, select them with the checkboxes (or Select all) and use Approve, Spam, Reject, or Delete in the bulk bar. A bulk action covers up to 50 comments.
In the Comments tab, moderators are workspace owners and admins; other members with access to the project can view the queue but not change it. Through the AI chat, a project reviewer can also approve, reject, and reply (see Agent Tools).
Your site reads and submits comments through one public endpoint per entry. No authentication is needed.
GET /api/comments/v1/{projectId}/{modelId}/{entryId}POST /api/comments/v1/{projectId}/{modelId}/{entryId}
GET returns only approved comments, as threads, plus the model's public settings. It never returns emails, IP addresses, user agents, or referrers. It supports locale, page, limit (up to 100), and sort (oldest or newest) query parameters.
POST takes author (name, optional email and url), body, an optional parentId for a reply, and optional captchaToken and _hp fields. A successful response includes the comment's status.
If you migrated a WordPress site with the Contentrain WordPress import, the import writes a comments-export.json file (format contentrain-comments@1) next to your content.
Make sure comments are enabled on the model that holds the posts
Open the model's Comments Settings tab
Under Import from WordPress, click Upload comments-export.json
Studio reports how many comments were received, imported, and already present, and how many threads were closed. Uploading the same file again is safe: comments already imported are skipped. Comments that belong to posts with no matching entry are reported and not imported, and a note appears if some comments still reference a parent that is not in the project. Import needs the comments.import feature and owner or admin access.
If your site was migrated by Contentrain Migrate, the project's setup wizard offers the same import as a step. See Migrated Sites.
Comments
Contentrain Studio lets visitors comment on the entries of your collection and document models. Visitors post through a public API, and your team moderates the comments in Studio before (or after) they appear on your site.
Comments live in Studio, not in Git
Only the comment configuration is stored in the model definition in your repository. The comments themselves are stored in Studio's database, so approving or rejecting a comment never creates a commit or a review branch.
Availability
Comments and moderation need the
comments.enabledplan feature. Related features are gated separately:comments.auto_approvecomments.captchacomments.importcomments.webhook_notification(Enterprise Edition)comments.spam_filter(Enterprise Edition, on the roadmap, not yet available)The number of comment-enabled models and new comments per month are plan limits; see Billing for your plan.
How Comments Work
pending(orapprovedif approval is off)Enabling Comments on a Model
Comments can be enabled on collection and document models. Singletons and dictionaries do not carry threads.
Once enabled, the tab shows the public endpoint for the model, and a Comments tab appears next to it for moderation.
The settings are saved in the model's
commentsblock:enabledfalserequireApprovaltruecomments.auto_approve; without it comments still start aspendingrequireEmailtruemaxDepth4maxBodyLength5000honeypottrue_hpthat catches spam botscaptchaturnstile(Cloudflare Turnstile) or none. Needscomments.captcharateLimitPerIp5notificationstrueOnly workspace owners and admins can change these settings.
Moderating Comments
Open the model's Comments tab. The filter bar shows the number of comments per status: Pending, Approved, Spam, Rejected, or All.
Click a comment to open its details (author, email, website, source IP, the comment it replies to, and when it was moderated).
For many comments at once, select them with the checkboxes (or Select all) and use Approve, Spam, Reject, or Delete in the bulk bar. A bulk action covers up to 50 comments.
In the Comments tab, moderators are workspace owners and admins; other members with access to the project can view the queue but not change it. Through the AI chat, a project reviewer can also approve, reject, and reply (see Agent Tools).
Public API
Your site reads and submits comments through one public endpoint per entry. No authentication is needed.
GETreturns only approved comments, as threads, plus the model's public settings. It never returns emails, IP addresses, user agents, or referrers. It supportslocale,page,limit(up to 100), andsort(oldestornewest) query parameters.POSTtakesauthor(name, optionalemailandurl),body, an optionalparentIdfor a reply, and optionalcaptchaTokenand_hpfields. A successful response includes the comment'sstatus.For request and response details, see the Comments API reference.
Spam Protection
Studio applies several layers to public submissions:
_hpfield is silently accepted but dropped, so bots learn nothingImporting WordPress Comments
If you migrated a WordPress site with the Contentrain WordPress import, the import writes a
comments-export.jsonfile (formatcontentrain-comments@1) next to your content.Studio reports how many comments were received, imported, and already present, and how many threads were closed. Uploading the same file again is safe: comments already imported are skipped. Comments that belong to posts with no matching entry are reported and not imported, and a note appears if some comments still reference a parent that is not in the project. Import needs the
comments.importfeature and owner or admin access.If your site was migrated by Contentrain Migrate, the project's setup wizard offers the same import as a step. See Migrated Sites.
Notifications and Webhooks
comments.webhook_notification:comment.submittedcommentId,modelId,entryId,locale,parentId,status)comment.approvedcommentId,modelId,entryId,locale,source)Agent Tools
The AI chat agent can work through the queue for you:
list_commentsapprove_commentreject_commentreply_commentNone of these write to Git.