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

# Create comment

> Create a comment or reply on a post

## Create comment

Send **`content`** and/or **`media`** (at least one resolved media item or non-empty text required). The **`media`** array matches post threads: each entry is an **integer** library id (from `POST /api/v1/media/upload/file` or `POST /api/v1/media/upload/url`) and/or an **HTTPS URL** to import (direct image/video, supported social post URLs, Unsplash-same as the media library URL flow). If you send **only** `media` and **none** of the entries resolve, the request returns **422**. For a **reply**, set **`parent_comment_id`**; `post_id` must still refer to the same post as the parent (validated server-side).

### Body

<ParamField body="post_id" type="integer" required>
  Post id.
</ParamField>

<ParamField body="parent_comment_id" type="integer">
  Parent comment id for a threaded reply.
</ParamField>

<ParamField body="content" type="string">
  Text (max 65535 chars) if not using media only.
</ParamField>

<ParamField body="media" type="string[]">
  Up to 10 items: **integers** (media ids in the post’s workspace) and/or **strings** (URLs to import). Mix ids and URLs in one array if needed.
</ParamField>

<ParamField body="is_resolved" type="boolean">
  Optional initial resolved flag.
</ParamField>

<ParamField body="is_approved" type="boolean">
  Optional initial approval flag.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST "https://postsyncer.com/api/v1/comments" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"post_id":123,"content":"Thanks for the feedback!"}'
  ```
</RequestExample>

### Response

`201` with `data` (comment) and `message`.

### Errors

`401` · `403` · `422` validation

See [Comments overview](/api-reference/comments/overview).
