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

> Update your own comment text and/or media

## Update comment

Only the **author** (`user_id` matches token user) may update.

**Allowed JSON fields:** `content` and/or `media` (same rules as [create comment](/api-reference/comments/create)). Omit a field to leave it unchanged. Send **`media`: `[]`** to detach all media from the comment.

### Path

<ParamField path="comment" type="integer" required>
  Numeric id of the comment to update.
</ParamField>

### Body

<ParamField body="content" type="string">
  Comment text (max 65535 characters). Empty string clears text to null.
</ParamField>

<ParamField body="media" type="string[]">
  Up to 10 items (integer ids and/or URLs) to **replace** attached media. When this key is present, attachments are re-synced from the new list (or cleared if the array is empty).
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X PUT "https://postsyncer.com/api/v1/comments/456" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"content":"Updated text"}'
  ```
</RequestExample>

### Errors

`401` · `403` (not author) · `404` · `422` (e.g. all `media` entries failed to resolve)

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