> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uptimeio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Incident Comments

> Read and write team comments on an incident (session authentication only)

## Overview

Comments are the team discussion on an incident. All four endpoints require session authentication (`Authorization: Bearer YOUR_JWT`); API keys are rejected with `403 JWT_REQUIRED`.

| Method and path | Purpose |
| - | - |
| `GET /api/incidents/{incidentId}/comments` | List comments, oldest first |
| `POST /api/incidents/{incidentId}/comments` | Add a comment |
| `PATCH /api/incidents/{incidentId}/comments/{commentId}` | Edit your comment |
| `DELETE /api/incidents/{incidentId}/comments/{commentId}` | Delete your comment |

Authors can edit or delete a comment only within 15 minutes of creating it.

## Comment object

| Field | Type | Description |
| - | - | - |
| `id` | UUID | Comment ID. |
| `incident_id` | UUID | Incident ID. |
| `user_id`, `user_email`, `user_name` | string \| null | Author. |
| `comment_text` | string | 1-5000 characters. |
| `is_internal` | boolean | Internal flag. Default `false`. |
| `created_at`, `updated_at` | string | ISO 8601 times. |
| `deleted_at` | string \| null | Set when deleted. |
| `can_edit`, `can_delete` | boolean | List only: whether you may edit or delete it now. |

## List comments

```bash theme={null}
curl https://api.uptimeio.com/api/incidents/INCIDENT_ID/comments \
  -H "Authorization: Bearer YOUR_JWT"
```

Returns `{ "success": true, "data": { "comments": [ ... ] } }`.

## Add a comment

Body: `comment_text` (required, 1-5000 characters), `is_internal` (optional boolean, default `false`).

```bash theme={null}
curl -X POST https://api.uptimeio.com/api/incidents/INCIDENT_ID/comments \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{ "comment_text": "Failover complete, watching error rates." }'
```

`201 Created`: `{ "success": true, "data": { "comment": { ... } } }`.

## Edit a comment

Body: `comment_text` (required, 1-5000 characters) and `is_internal` (optional boolean). Returns `200` with `{ "data": { "comment": { ... } } }`.

## Delete a comment

Returns `200` with `{ "success": true, "data": { "success": true } }`.

## Errors

| Status | Code | When |
| - | - | - |
| `400` | `VALIDATION_ERROR` | Invalid body or ID, `You cannot edit this comment after 15 minutes`, `You cannot delete this comment after 15 minutes`, `Cannot update a deleted comment` or `Comment already deleted`. |
| `401` | `MISSING_AUTH`, `INVALID_TOKEN` | Missing or invalid session token. |
| `403` | `JWT_REQUIRED` | API key used. |
| `403` | `FORBIDDEN` | `You can only edit your own comments` or `You can only delete your own comments`. |
| `404` | `RESOURCE_NOT_FOUND` | Incident or comment not found. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.