Blog comments

Submit comments on blog posts with identity and moderation rules enforced by the store.

POST /comments/submit
{% form 'comment_submit' %}

Gated by the blog comments mode (disabled / everyone / registered customers) and moderation setting.

Form fields

client_mutation_id Required

Unique retry key, up to 128 characters. Reusing it for the same action prevents a successful mutation from being applied twice for 24 hours.

post_slug Required

Blog post being commented on.

content Required

Comment body.

author_name Optional

Required for guests; logged-in customers default to their account name.

author_email Optional

Required for guests.

website Optional

Honeypot — must stay empty; bots that fill it are dropped.

_format Optional

Set to json when submitting with fetch; omit for the normal browser redirect.

Validation

Post must exist; comments mode, guest/customer identity, and moderation are enforced. Comments are flat — there is no reply threading. Send blog_post.comment_submission_id as client_mutation_id (a hidden field) and keep it when retrying the same comment, so a retry is not posted twice; each page render gives a new one. The same client_mutation_id with different text is refused with BLOG_COMMENT_SUBMISSION_CONFLICT; reload the page for a new one. A disabled or customers-only blog answers BLOG_COMMENTS_DISABLED or BLOG_COMMENTS_REGISTERED_ONLY before anything else is checked.

Limits

Content 5000 characters; guest name 255; guest email 255; per-store hourly submission cap. Under heavy traffic a submission must carry a solved verification challenge (STOREFRONT_CHALLENGE_REQUIRED): JSON gets challenge_required: true (solve and resubmit); a form submission returns to the post with that notice and the platform adds the script that solves the check before the next submit.

Response

{
  success:true,
  pending,
  response,
  user_errors
}

pending is true when the comment waits for the merchant's approval; response is the shopper message: STOREFRONT_BLOG_COMMENT_POSTED when the comment is live, STOREFRONT_BLOG_COMMENT_IN_REVIEW when it is waiting for approval. A form submission redirects back to the post with HTTP 303 and puts the same code in form_notice, so the theme shows form_notice.message. A refusal returns success: false with the reason in user_errors (or in form_notice for a form submission).

Whether comments are open comes from the store's blog settings. The merchant chooses who can comment — everyone, only logged-in customers, or nobody — and whether new comments wait for review before appearing. When comments are turned off, the whole surface goes quiet: existing comments stop appearing anywhere and counts show zero. Nothing is deleted; turning comments back on brings everything back as it was. Logged-in customers comment under their account name and email automatically; guests provide both with their comment. Comments are flat — there are no replies.