# Update a chart comment

Updates the content of a chart comment, or moves it to a different point in time. You only need to provide the fields you want to change.

[endpoint]
base_url = "https://telemetry.betterstack.com"
path = "/api/v2/dashboards/{dashboard_id}/charts/{chart_id}/comments/{id}"
method = "PATCH"

[[path_param]]
name = "dashboard_id"
description = "The unique identifier of the dashboard."
required = true
type = "integer"

[[path_param]]
name = "chart_id"
description = "The unique identifier of the chart."
required = true
type = "integer"

[[path_param]]
name = "id"
description = "The unique identifier of the comment to update."
required = true
type = "integer"

[[body_param]]
name = "content"
description = "The new content of the comment. [Markdown](https://www.markdownguide.org/basic-syntax/) is supported for formatting."
required = false
type = "string"

[[body_param]]
name = "dt"
description = "The new point on the chart's time axis to pin the comment to, as a datetime such as `2026-08-17T13:00:00Z`."
required = false
type = "string"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content-Type"
description = "application/json"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = "The comment was updated successfully."
body = '''
{
  "data": {
    "id": "1441",
    "type": "chart_comment",
    "attributes": {
      "chart_id": 18718,
      "content": "Deployed v2.1.1",
      "created_at": "2026-08-17T12:52:21.837Z",
      "updated_at": "2026-08-17T12:56:29.769Z",
      "dt": "2026-08-17T13:00:00.000Z",
      "plaintext_content": "Deployed v2.1.1",
      "api_authored": true
    }
  }
}
'''

[[response]]
status = 403
description = "The comment was not created through this API and can only be changed by whoever wrote it."

[[response]]
status = 422
description = "`dt` is not a datetime, `content` is blank, or an attribute that cannot be updated was sent."

[[response]]
status = 404
description = "A comment with the specified ID was not found on this chart."
[/responses]

## Example request

```shell
[label cURL]
curl --request PATCH \
  --url https://telemetry.betterstack.com/api/v2/dashboards/1234/charts/18718/comments/1441 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "content": "Deployed v2.1.1",
    "dt": "2026-08-17T13:00:00Z"
  }'
```

## What you can update

You can update a comment created through this API, meaning one whose `api_authored` attribute is `true`. With an OAuth token you can also update that team member's own comments. Everything else returns `403`, including comments written by other team members and the incident comments synced onto the chart from Uptime.

`user_email` is not accepted here. A mention is part of the comment content, so to change one, send the whole `content` you want.
