# Update my task comment

`PATCH /api/task-comment/{taskCommentId}`

URL: https://repsona.com/api/patch-task-comment-taskcommentid

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `taskCommentId` | path | integer | required | ID of the task comment. |

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `doc` | body | object |  | Comment body as a rich-text document (ProseMirror/Tiptap JSON). Send either `doc` or `markdown`. |
| `markdown` | body | string |  | Comment body as Markdown (up to 20,000 characters). Takes precedence over `doc` if both are sent. |

## Request

```sh
curl -X PATCH "https://<space>.repsona.com/api/task-comment/{taskCommentId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "I rewrote the hero section. Could you review it by Thursday?"
  }'
```

## Responses

- 200: Updated comment
- 400: Empty body
- 401: Authentication is required
- 404: Comment not found (or not yours)

## Example response

```json
{
  "comment": {
    "id": 75,
    "parentId": null,
    "comment": "I rewrote the hero section. Could you review it by Thursday?",
    "createdAt": 1793662651194,
    "updatedAt": 1793662651232,
    "user": {
      "id": 1127,
      "name": "emma",
      "fullName": "Emma Carter",
      "avatarUrl": null,
      "color": null,
      "state": "active"
    },
    "files": [],
    "deleted": false,
    "reactions": [],
    "children": []
  }
}
```
