kamau1's picture
feat: ticket attachements
e5f65c7
# Ticket Comments - API Quick Reference
## Endpoints
```
POST /api/v1/tickets/{ticketId}/comments Create comment
GET /api/v1/tickets/{ticketId}/comments List comments
GET /api/v1/comments/{commentId} Get comment
GET /api/v1/comments/{commentId}/replies Get replies
PUT /api/v1/comments/{commentId} Update comment
DELETE /api/v1/comments/{commentId} Delete comment
```
## Request/Response
### Create
```json
// POST /tickets/{id}/comments
{
"comment_text": "string",
"is_internal": true,
"comment_type": "note",
"parent_comment_id": null
}
→ Returns Comment object
```
### List
```json
// GET /tickets/{id}/comments?page=1&page_size=50
→ {
"comments": Comment[],
"total": 100,
"page": 1,
"pages": 2
}
```
### Comment Object
```json
{
"id": "uuid",
"comment_text": "string",
"user_name": "string",
"is_internal": true,
"comment_type": "note",
"parent_comment_id": null,
"attachment_document_ids": ["uuid"],
"attachments": [
{
"id": "uuid",
"file_name": "photo.jpg",
"file_type": "image/jpeg",
"file_url": "https://...",
"file_size": 123456,
"is_image": true
}
],
"reply_count": 0,
"is_edited": false,
"created_at": "2025-11-30T12:00:00Z"
}
```
## Comment Types
`note` | `issue` | `resolution` | `question` | `update`
## Auth
- Create: All users
- Update: Author only
- Delete: Author or PM