> ## 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.

# Comment Automations

> ReachOwl comment automations post comments on Facebook through your connected accounts. Learn how status, scheduling, limits, and executions work.

ReachOwl comment automations let you post comments on Facebook automatically through a connected account. When you create a comment automation, you define the comment content, the connected account that posts it, and constraints like daily limits and schedules. You can also review every run through the executions endpoint. This page explains the core fields and behavior you will work with through the API.

Comment automations are separate from \[campaigns]\(/campaigns). Campaigns send friend requests, messages, or comments to an audience. Comment automations are managed through their own \`/api/v1/comment-automations\` endpoints and provide execution history for each automation.

## Endpoints at a glance

Comment automations use standard REST routes.

| Method          | Endpoint                                      | Description                                         |
| :-------------- | :-------------------------------------------- | :-------------------------------------------------- |
| `GET`           | `/api/v1/comment-automations`                 | List comment automations.                           |
| `POST`          | `/api/v1/comment-automations`                 | Create a comment automation.                        |
| `GET`           | `/api/v1/comment-automations/{id}`            | Retrieve a single comment automation.               |
| `PUT` / `PATCH` | `/api/v1/comment-automations/{id}`            | Update a comment automation.                        |
| `DELETE`        | `/api/v1/comment-automations/{id}`            | Delete a comment automation.                        |
| `GET`           | `/api/v1/comment-automations/{id}/executions` | List the executions (runs) of a comment automation. |

Unlike campaigns, which use `/campaigns/create` and `/campaigns/update`, comment automations follow REST conventions: the HTTP method determines the action.

## Platform

* `platform` — currently `facebook` is supported.

## Status and control

You control the lifecycle of a comment automation through the `status` field. There is no separate `/pause` or `/resume` endpoint. Send an update request with the new status.

\{/\* TODO: confirm status values and defaults against CommentAutomationController \*/}

| Status | Meaning                                                                    |
| :----- | :------------------------------------------------------------------------- |
| `0`    | Paused. The automation will not post comments until you set status to `1`. |
| `1`    | Running. ReachOwl actively processes the automation.                       |

Create an automation with `POST /api/v1/comment-automations`, defaulting to `status: 0`, and then activate it with `PUT /api/v1/comment-automations/{id}` or `PATCH /api/v1/comment-automations/{id}` by setting `status: 1`.

## Daily limit

The `limit` field sets the maximum number of comments the automation posts per day. You can set it during creation or update it later to speed up or slow down the automation.

## Schedule

Use the `schedule` array to restrict when comments are posted. Each entry must include a day name, a start time, and an end time.

```json theme={null}
[
  {
    "day": "Monday",
    "start_time": "09:00",
    "end_time": "17:00"
  }
]
```

ReachOwl only posts comments during the specified windows.

## Comment content

Each automation posts the comment text you provide in `comments`. Use the `{{first_name}}` placeholder to personalize a comment. ReachOwl replaces it with the target's first name when the comment is posted.

```json theme={null}
[
  {
    "text": "Great post, {{first_name}}! Thanks for sharing."
  }
]
```

## Executors

Comment automations run through connected social accounts called executors. Link executors by providing `executor_ids`, which are the `id` values returned by `GET /api/v1/app-states`.

## Executions

Every time a comment automation runs, ReachOwl records an execution. Use `GET /api/v1/comment-automations/{id}/executions` to review what was posted, when it ran, and whether it succeeded. This is the best way to audit an automation or troubleshoot a comment that did not post.

```bash theme={null}
curl -X GET "{{baseUrl}}/api/v1/comment-automations/12/executions" \
  -H "Authorization: Bearer {{token}}"
```

## Update and delete

* `PUT` and `PATCH` both call the same update handler. Use `PATCH` to change only the fields you send, such as `status` or `limit`.
* `DELETE` permanently removes the comment automation.

Deleting a comment automation cannot be undone. To stop an automation temporarily, set \`status\` to \`0\` instead.

## Minimal create example

```bash theme={null}
curl -X POST "{{baseUrl}}/api/v1/comment-automations" \
  -H "Authorization: Bearer {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Post Engagement",
    "platform": "facebook",
    "limit": 30,
    "status": 0,
    "schedule": [],
    "comments": [
      {
        "text": "Great post, {{first_name}}! Thanks for sharing."
      }
    ],
    "executor_ids": [1]
  }'
```

## Pause or resume example

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

## Related endpoints

* `[/api-reference/comment-automations/list](/api-reference/comment-automations/list)` — list comment automations
* `[/api-reference/comment-automations/create](/api-reference/comment-automations/create)` — create a comment automation
* `[/api-reference/comment-automations/get](/api-reference/comment-automations/get)` — retrieve a single comment automation
* `[/api-reference/comment-automations/update](/api-reference/comment-automations/update)` — update status, schedule, comments, and limits
* `[/api-reference/comment-automations/delete](/api-reference/comment-automations/delete)` — delete a comment automation
* `[/api-reference/comment-automations/executions](/api-reference/comment-automations/executions)` — list executions
