Skip to main content

Create Comment on Ticket

POST /public/action/tickets/comments/create

Adds a comment to an existing ticket.

Authentication: X-API-KEY header (see Authentication).

Request body

FieldTypeDescription
ticketNumberlongNumber of the ticket to comment on.
userEmailstringEmail of the commenting user.
privateCommentbooleanIf true, comment is internal-only.
commentstringComment body.

Request

curl -X POST https://api.withmoxie.com/public/action/tickets/comments/create \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"ticketNumber": 1042, "userEmail": "jane@acme.example", "comment": "Following up."}'

Response

Returns the updated TicketWrapper (ticket plus all comments).

{
"ticket": {
"id": "66b0f6e5c3a9e40012ab7100",
"accountId": 10016,
"ticketNumber": 1042,
"subject": "Cannot log in",
"status": "Open"
},
"comments": [
{ "comment": "Portal returns an error.", "privateComment": false },
{ "comment": "Following up.", "privateComment": false }
]
}