---
title: "Add a comment to a ticket"
method: POST
path: "/v1/brands/{brandId}/tickets/{ticketId}/comments"
tags: ["comments"]
---

# Add a comment to a ticket

`POST /v1/brands/{brandId}/tickets/{ticketId}/comments`

## Request

- Base URL: `https://api.dispatchtickets.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dispatchtickets.com/v1/brands/{brandId}/tickets/{ticketId}/comments`
- Auth: HTTP bearer

## Path parameters

- `brandId` string, required
- `ticketId` string, required

## Headers

- `x-idempotency-key` string, required
- `X-Idempotency-Key` string

## Request body

- CreateCommentDto
  - `body` string, required
  - `authorId` string
  - `authorName` string
  - `authorType` 'CUSTOMER' | 'AGENT' | 'SYSTEM'
  - `parentId` string: Parent comment ID for threaded replies
  - `links` LinkDto[]
    - `url` string, required
    - `title` string
    - `type` string
  - `metadata` object: Additional metadata (max 64KB)
  - `source` 'api' | 'web' | 'email' | 'slack' | 'sms' | 'discord' | 'instagram' | 'twitter' | 'whatsapp' | 'recurring' | 'chat' | 'custom': Source channel where the comment originated
  - `sourceId` string: Original ID from the source
  - `sourceData` object: Additional source-specific data (max 64KB)
  - `setStatus` 'open' | 'pending' | 'resolved': Optionally set the ticket status when adding this comment
  - `connectionId` string: Email connection ID to send the reply from (uses primary if not specified)
  - `cc` string[]: CC recipients for the email reply

## Response `200`

Comment already created (idempotent retry)

## Other responses

- `201`: Comment created

---

[API](https://skmtc.dev/dispatchtickets/apis/dispatch-tickets-api.md) · [All operations](https://skmtc.dev/dispatchtickets/apis/dispatch-tickets-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dispatchtickets/apis/dispatch-tickets-api/revisions/529e6717d295?raw)
