Messages

Messages are the individual replies within a ticket. Both players and agents can author messages. Every message is associated with exactly one ticket and carries an authorType field (player or agent) so clients can render the conversation thread correctly.

Agent messages support an isInternal flag. When set to true the message functions as a private note — it is visible to agents and supervisors only and is never surfaced to the player. All messages that are AI-assisted carry aiAssisted: true in the response payload.

List Messages

GET/v1/tickets/:ticketId/messages🔒 Auth required

Returns a paginated list of messages belonging to the specified ticket. By default, internal agent notes are excluded from the response. Pass includeInternal=true to receive the full thread including private notes.

Path Parameters
ParameterTypeRequiredDescription
ticketIdstringRequiredThe unique identifier of the parent ticket (e.g. tkt_xxxx).
Query Parameters
ParameterTypeRequiredDescription
limitintegerOptionalMaximum number of messages to return. Defaults to 50. Maximum 200.
offsetintegerOptionalZero-based index of the first message to return. Use with limit for cursor-style pagination.
includeInternalbooleanOptionalDefault false. Set true to include internal agent notes in the response. Requires agent-level scope.
Response
200
json
1{
2 "total": 8,
3 "data": [
4 {
5 "id": "msg_xxxx",
6 "ticketId": "tkt_xxxx",
7 "body": "Hello, I can help with that — let me look into your account right away.",
8 "authorType": "agent",
9 "authorId": "usr_xxxx",
10 "isInternal": false,
11 "attachments": [],
12 "aiAssisted": true,
13 "createdAt": "2026-06-15T09: 12: 44.000Z",
14 "updatedAt": "2026-06-15T09: 12: 44.000Z"
15 }
16 ]
17}

Add Message to Ticket

POST/v1/tickets/:ticketId/messages🔒 Auth required

Appends a new message to the specified ticket. The message is immediately visible to all parties unless isInternal is set to true. Optionally attach previously uploaded files via attachmentIds.

Path Parameters
ParameterTypeRequiredDescription
ticketIdstringRequiredThe unique identifier of the parent ticket.
Request Body
ParameterTypeRequiredDescription
bodystringRequiredPlain-text or Markdown content of the message. Maximum 10,000 characters.
authorIdstringRequiredThe ID of the user or agent creating the message.
isInternalbooleanOptionalWhen true the message is an internal agent note not visible to the player. Defaults to false.
attachmentIdsstring[]OptionalArray of attachment IDs returned by the /v1/attachments upload endpoint. Each attachment is linked to this message.
Request
bash
1curl -X POST https://api.kemegames.com/v1/tickets/tkt_xxxx/messages \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "body": "Thanks for reaching out! Your refund has been processed and should appear within 3–5 business days.",
6 "authorId": "usr_agent_xxxx",
7 "isInternal": false,
8 "attachmentIds": []
9 }'
Response
201
json
1{
2 "id": "msg_yyyy",
3 "ticketId": "tkt_xxxx",
4 "body": "Thanks for reaching out! Your refund has been processed and should appear within 3–5 business days.",
5 "authorType": "agent",
6 "authorId": "usr_agent_xxxx",
7 "isInternal": false,
8 "attachments": [],
9 "aiAssisted": false,
10 "createdAt": "2026-06-15T10: 05: 17.000Z",
11 "updatedAt": "2026-06-15T10: 05: 17.000Z"
12}

Edit Message

PATCH/v1/messages/:id🔒 Auth required

Updates the body of an existing message. The message is identified directly by its ID rather than the parent ticket. Returns the updated message object.

Path Parameters
ParameterTypeRequiredDescription
idstringRequiredThe unique identifier of the message to edit (e.g. msg_xxxx).
Request Body
ParameterTypeRequiredDescription
bodystringRequiredThe new message content. Replaces the existing body entirely. Maximum 10,000 characters.
Request
bash
1curl -X PATCH https://api.kemegames.com/v1/messages/msg_yyyy \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "body": "Thanks for reaching out! Your refund has been processed and should appear within 2–3 business days."
6 }'
Response
200
json
1{
2 "id": "msg_yyyy",
3 "ticketId": "tkt_xxxx",
4 "body": "Thanks for reaching out! Your refund has been processed and should appear within 2–3 business days.",
5 "authorType": "agent",
6 "authorId": "usr_agent_xxxx",
7 "isInternal": false,
8 "attachments": [],
9 "aiAssisted": false,
10 "createdAt": "2026-06-15T10: 05: 17.000Z",
11 "updatedAt": "2026-06-15T10: 41: 03.000Z"
12}
Note:Only the original message author can edit their own messages. Attempts by other users will return a 403 Forbidden response. All edits are recorded in the ticket audit trail — the original body is preserved for compliance and the edit timestamp is surfaced in updatedAt.

Delete Message

DELETE/v1/messages/:id🔒 Auth required

Permanently removes a message from the ticket thread. The operation is irreversible. A 204 No Content response is returned on success with an empty body. Deleting a message does not affect the parent ticket status or other messages in the thread.

Path Parameters
ParameterTypeRequiredDescription
idstringRequiredThe unique identifier of the message to delete (e.g. msg_xxxx).
Request
bash
1curl -X DELETE https://api.kemegames.com/v1/messages/msg_yyyy \
2 -H "Authorization: Bearer <token>"
Last updated: June 15, 2026Edit this page