> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update post comment moderation

> Per-post comment moderation (filters, keywords, optional AI reply) aligned with the dashboard.

## Update post comment moderation

Sets **`comments_settings`** on a post: rules for handling incoming comments (profanity, negativity, custom topics, URLs, mentions, hashtags, keywords, AI reply). When `enabled` is `false`, settings are stored with moderation off.

Requires bearer token with the **`posts`** ability. Returns the full post object (same shape as `GET /posts/{post}`).

### Request

<ParamField path="post" type="integer" required>
  Post ID
</ParamField>

<ParamField body="enabled" type="boolean" required>
  Master switch for moderation on this post.
</ParamField>

<ParamField body="settings" type="object">
  Required when `enabled` is `true`. All boolean flags below are required when moderation is enabled.

  <Expandable title="settings fields">
    <ParamField body="remove_profanity" type="boolean" />

    <ParamField body="remove_negativity" type="boolean" />

    <ParamField body="remove_all_comments" type="boolean" />

    <ParamField body="remove_custom_topics" type="boolean" />

    <ParamField body="custom_topics_list" type="string[]">
      Required when `remove_custom_topics` is `true`.
    </ParamField>

    <ParamField body="remove_urls" type="boolean" />

    <ParamField body="remove_emails" type="boolean" />

    <ParamField body="remove_phones" type="boolean" />

    <ParamField body="remove_mentions" type="boolean" />

    <ParamField body="mentions_list" type="array" />

    <ParamField body="remove_hashtags" type="boolean" />

    <ParamField body="hashtags_list" type="array" />

    <ParamField body="remove_keywords" type="boolean" />

    <ParamField body="keywords_list" type="string[]">
      Required when `remove_keywords` is `true`.
    </ParamField>

    <ParamField body="ai_reply" type="boolean" />
  </Expandable>
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X PATCH "https://postsyncer.com/api/v1/posts/123/comment-moderation" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "enabled": true,
      "settings": {
        "remove_profanity": true,
        "remove_negativity": false,
        "remove_all_comments": false,
        "remove_custom_topics": false,
        "custom_topics_list": [],
        "remove_urls": false,
        "remove_emails": false,
        "remove_phones": false,
        "remove_mentions": false,
        "mentions_list": [],
        "remove_hashtags": false,
        "hashtags_list": [],
        "remove_keywords": false,
        "keywords_list": [],
        "ai_reply": false
      }
    }'
  ```
</RequestExample>

### Response

`200` - full post resource including `comments_settings`.

`404` - post not found or not accessible.

`422` - validation error.

See also: [Comments API overview](/api-reference/comments/overview), [Auto plug](/api-reference/posts/auto-plug), [Contact collection](/api-reference/posts/contact-collection).
