---
title: "/discussions/:discussionId/comments/:commentId"
method: PATCH
path: "/v1/discussions/{discussionId}/comments/{commentId}"
tags: ["Discussions"]
---

# /discussions/:discussionId/comments/:commentId

`PATCH /v1/discussions/{discussionId}/comments/{commentId}`

## Request

- Base URL: `api.air.inc` (relative, and the document’s source URL is not known)
- URL: `api.air.inc/v1/discussions/{discussionId}/comments/{commentId}`
- Auth: one of:
  - API key in header `x-api-key` and API key in header `x-air-workspace-id`
  - HTTP bearer and API key in header `x-air-workspace-id`
- TypeScript: <https://skmtc.dev/air/apis/air-api/docs/v1/discussions/:discussionId/comments/:commentId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Replace a comment's text and mentions.

Only the author can edit. An author who no longer has
`asset.canManageDiscussions` can no longer edit. The response is 204
with no body. `updatedAt` moves to the edit time when the stored text
changes. An edit that leaves the text and mentions as they are changes
nothing and keeps `updatedAt`. Edits replace mentions and notify no
one.

Omitting `mentions`, or sending `null`, on a comment that has them is
409. Send the mentions again to keep them, or send `mentions: []` to
remove them.
The same placeholder rules as create apply.

Requires the `comments.write` OAuth scope.

## Request body

- CommentWriteRequest
  - `body` string, required
  - `mentions` MentionInput[], nullable: Required on edit when the comment already has mentions: omitting it or sending `null` is 409. An empty array removes them. On a reply, `null` is the same as no mentions.
    - `accountId` string, uuid, required

## Response `204`

Comment updated. No response body.

## Other responses

- `400`: Invalid body or mentions
- `403`: You are not the author, or you cannot manage discussions
- `404`: Discussion or comment not found
- `409`: The comment has mentions and the request omitted `mentions` or sent `null`

## Changes

- **2026-11-03** `8e6005b272a1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/air/apis/air-api/changes/v1/discussions/:discussionId/comments/:commentId/patch.md)

---

[API](https://skmtc.dev/air/apis/air-api.md) - [All operations](https://skmtc.dev/air/apis/air-api/llms.txt) - [OpenAPI document](https://skmtc.dev/air/apis/air-api/revisions/8e6005b272a1?raw)
