> ## Documentation Index
> Fetch the complete documentation index at: https://reach-owl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a comment automation

> Update status, schedule, comments, or limits of a comment automation.

Updates a comment automation. Use this endpoint to pause or resume it by changing `status`. Send only the fields you want to change.

<Note>
  `PUT /api/v1/comment-automations/{id}` is also supported and uses the same handler and body fields as `PATCH`.
</Note>

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer {token}`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`.
</ParamField>

## Path parameters

<ParamField path="id" type="integer" required>
  ID of the comment automation.
</ParamField>

## Body

<ParamField body="name" type="string">
  Name of the comment automation.
</ParamField>

<ParamField body="status" type="integer">
  `0` = paused, `1` = running.
</ParamField>

<ParamField body="limit" type="integer">
  Maximum comments posted per day.
</ParamField>

<ParamField body="executor_ids" type="integer[]">
  IDs of the connected accounts that post comments.
</ParamField>

<ParamField body="comments" type="object[]">
  Comment content. Each entry has a `text` field and supports `{{first_name}}`.
</ParamField>

<ParamField body="schedule" type="object[]">
  Posting windows. Each entry has `day`, `start_time`, and `end_time`.
</ParamField>

## Response

<ResponseField name="data" type="object">
  The updated comment automation.

  <Expandable title="properties">
    <ResponseField name="id" type="integer">
      Unique comment automation ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the comment automation.
    </ResponseField>

    <ResponseField name="status" type="integer">
      `0` = paused, `1` = running.
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Maximum comments posted per day.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Pause theme={null}
  curl -X PATCH "{{baseUrl}}/api/v1/comment-automations/12" \
    -H "Authorization: Bearer {token}" \
    -H "Content-Type: application/json" \
    -d '{"status": 0}'
  ```

  ```bash Resume theme={null}
  curl -X PATCH "{{baseUrl}}/api/v1/comment-automations/12" \
    -H "Authorization: Bearer {token}" \
    -H "Content-Type: application/json" \
    -d '{"status": 1}'
  ```

  ```bash Change limit theme={null}
  curl -X PATCH "{{baseUrl}}/api/v1/comment-automations/12" \
    -H "Authorization: Bearer {token}" \
    -H "Content-Type: application/json" \
    -d '{"limit": 50}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": 12,
      "name": "Post Engagement",
      "status": 1,
      "limit": 50
    }
  }
  ```
</ResponseExample>
