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

# Create a comment automation

> Create a new comment automation that posts comments through a connected account.

Creates a comment automation. New automations should be created with `status: 0` (paused) and activated later with the [update](/update-comment-automation) endpoint.

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

## Body

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

<ParamField body="platform" type="string" required>
  Social platform. Currently `facebook` is supported.
</ParamField>

<ParamField body="executor_ids" type="integer[]" required>
  IDs of the connected accounts that post comments. Use the `id` values from `GET /api/v1/app-states`.
</ParamField>

<ParamField body="comments" type="object[]" required>
  Comment content to post.

  <Expandable title="properties">
    <ParamField body="text" type="string" required>
      Comment text. Supports the `{{first_name}}` placeholder.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="schedule" default="[]" type="object[]">
  Time windows when comments may be posted.

  <Expandable title="properties">
    <ParamField body="day" type="string" required>
      Day name, for example `Monday`.
    </ParamField>

    <ParamField body="start_time" type="string" required>
      Start time in `HH:MM` format.
    </ParamField>

    <ParamField body="end_time" type="string" required>
      End time in `HH:MM` format.
    </ParamField>
  </Expandable>
</ParamField>

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

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

## Response

<ResponseField name="data" type="object">
  The created 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 cURL theme={null}
  curl -X POST "https://reachowl.com/api/v1/comment-automations" \
    -H "Authorization: Bearer {token}" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Post Engagement",
      "platform": "facebook",
      "executor_ids": [101],
      "comments": [
        { "text": "Great post, {{first_name}}! Thanks for sharing." }
      ],
      "schedule": [
        { "day": "Monday", "start_time": "09:00", "end_time": "17:00" }
      ],
      "limit": 30,
      "status": 0
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "id": 12,
      "name": "Post Engagement",
      "status": 0,
      "limit": 30
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.