Update an incident comment

Edit the content of an existing incident comment.

PATCH https://incidents.betterstack.com/api/v7/incidents/{incident_id}/comments/{id}
incident_id string required

The ID of the incident the incident comment belongs to.

id string required

The ID of the incident comment to update.

team_id string

Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

content string

The comment text in Markdown, up to 100,000 characters. A user mention you send can name the user by u123 or their e-mail. Responses name each mentioned user by u123. Get the user ID via List team members.

attachment_upload_ids array of strings

Files to attach, as upload IDs. Get one by creating a file upload and sending the file with its upload_command. Up to 10 files of up to 10 MB each per request, counting attachment_urls. On update, the files are added to the comment's existing files. An upload expires after a day. An upload can be attached only once, and only in the organization that created it.

attachment_urls array of strings

Files to attach, as public https:// URLs to download the files from. Up to 10 files of up to 10 MB each per request, counting attachment_upload_ids. On update, the files are added to the comment's existing files.

200

Returns the updated incident comment.

200 OK
{
  "data": {
    "id": "123456789",
    "type": "incident_comment",
    "attributes": {
      "id": "123456789",
      "content": "Updated comment content",
      "user_email": "test@example.com",
      "attachments": [
        {
          "id": "124",
          "filename": "checkout-errors.log",
          "content_type": "text/plain",
          "size": 35,
          "url": "https://…"
        }
      ],
      "user_id": "u123",
      "created_at": "2025-06-03T12:10:28.357Z",
      "updated_at": "2025-06-03T12:10:28.357Z"
    }
  }
}
401

The API token is missing or invalid.

401 Unauthorized
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
403

The token is read-only, your role doesn't include Acknowledge, resolve, and escalate on Incidents, or the token can't be used for this API. A team member posted the comment, so only that member can edit or delete it, with an OAuth token. An API token can edit and delete only comments posted with an API token.

403 Forbidden
{
  "errors": "This API token is read-only and cannot be used for write operations."
}
404

The incident comment doesn't exist, or the token can't access it.

422

A mention in content isn't u123 or the e-mail of someone in the organization, attachment_upload_ids or attachment_urls name a file that can't be attached, or validation failed.

422 Unprocessable Content
{
  "errors": "Sorry, these attributes have unsupported values",
  "allowed_values": {
    "content": "Send a user ID such as u123. Get it via List team members, or send their e-mail."
  }
}
503

The files in attachment_upload_ids couldn't be read right now. Try again in a moment.

id string

The ID of the incident comment.

type string

Always incident_comment.

attributes.id string

The comment's ID, the same as the top-level id.

content string

The comment text in Markdown, up to 100,000 characters. A user mention you send can name the user by u123 or their e-mail. Responses name each mentioned user by u123. Get the user ID via List team members.

user_email string

On create, the e-mail of a user in your organization to tag. The comment then starts with a mention of them. In a response, the e-mail of the user who posted the comment. Left out when the comment was posted with an API token.

attachments array of objects

The comment's files, oldest first.

attachments[].id string

The attachment's ID.

attachments[].filename string

The file's name.

attachments[].content_type string

The file's MIME type.

attachments[].size integer

The file's size in bytes.

attachments[].url string

A link to the file. For a file attached through the API it expires after 15 minutes, so read the comment again for a fresh one.

user_id string

The user who posted the comment, as u123. Left out when the comment was posted with an API token.

created_at datetime

When the comment was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the comment was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

Example cURL

Simple text Rich-formatted comment
curl --request PATCH \
  --url https://incidents.betterstack.com/api/v7/incidents/1/comments/1 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "content": "Updated comment content"
}'
curl --request PATCH \
  --url https://incidents.betterstack.com/api/v7/incidents/1/comments/1 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "content": "# 🚨 Incident Update\n\nHere is the current system status:\n\n| Component | Status       |\n|-----------|--------------|\n| API       | ✅ Operational |\n| Database  | 🔄 Restarting |\n| Cache     | ❌ Down       |\n\n_Updated automatically via API._"
}'