Free setup on annual plans

Sign up today!

Ticket Messages

API Reference: Ticket Messages endpoints

The Ticket Messages API documents the conversation layer inside tickets: message list/detail, drafts, AI replies, send flows, attachments, tracking callbacks, escalation, runtime actions and message-topic assignments.

Overview and current endpoints

A ticket message is the communication record inside a ticket. Use these endpoints for inbound and outbound message content, AI-generated replies, attachments and topic/action workflows. Parent ticket lifecycle operations remain on the Tickets endpoint page.

TicketMessages

MethodPathAccessPurpose
GET/api/TicketMessages?ticketId={ticketId}TicketAccessList messages for one ticket with pagination and sorting.
GET/api/TicketMessages/{id}TicketAccessOrPhoneAuthRead full message details. Phone-auth requests must match the message channel.
GET/api/TicketMessages/{id}/promptTicketAccessReturn the stored AI prompt for a message.
GET/api/TicketMessages/{id}/draftTicketAccessReturn the current draft reply for a message.
POST/api/TicketMessagesTicketCreateFromPhoneCreate a raw AP_TicketMessage in an existing ticket.
POST/api/TicketMessages/create-newTicketCreateFromPhoneCreate a message and optionally create its parent ticket. Supports incoming messages, drafts, replies and forwards.
PUT/api/TicketMessages/{id}TicketAccessOrPhoneAuthUpdate editable message fields such as response text, body, addresses, draft state, UID and custom fields.
DELETE/api/TicketMessages/{id}TicketAccessDelete one message after ticket permission checks.
POST/api/TicketMessages/{id}/replyTicketAccessOrPhoneAuthGenerate and store an AI reply.
POST/api/TicketMessages/{id}/previewTicketAccessBuild final email body preview without sending.
POST/api/TicketMessages/{id}/sendTicketAccessSend a prepared reply.
POST/api/TicketMessages/{id}/send-newTicketAccessSend a newly composed outbound email.
POST/api/TicketMessages/{id}/send-forwardTicketAccessSend a forward email.
POST/api/TicketMessages/{id}/correct-topicsTicketAccessReplace topic assignments and mark topic learning status.
POST/api/TicketMessages/{id}/detect-topicsTicketAccessRun topic detection with optional modelName and executeActions.
GET/api/TicketMessages/{id}/promptDocumentsTicketAccessOrPhoneAuthReturn prompt documents and optional historical ticket/end-user context.
POST/api/TicketMessages/{id}/execute-hookTicketAccessOrPhoneAuthExecute configured hook actions for hookName.
POST/api/TicketMessages/{id}/execute-actionTicketAccessExecute one action by actionID.
GET/api/TicketMessages/{id}/execute-single-actionTicketAccessExecute one action type from query action.
GET/api/TicketMessages/{id}/attachmentsTicketAccessList attachment metadata for a message.
POST/api/TicketMessages/{id}/attachmentsTicketAccessUpload one multipart file field named file; upload limit is 50 MB.
DELETE/api/TicketMessages/{id}/attachments/{attachmentId}TicketAccessDelete one message attachment.
POST/api/TicketMessages/{ticketToken}/escalatePublicEscalate newest message in a tokenized ticket flow.
POST/api/TicketMessages/{messageId}/escalate-by-idTicketAccessOrPhoneAuthEscalate one message by ID.
GET/api/TicketMessages/{ticketToken}/like-dislikePublicRecord end-user like/dislike feedback.
GET/api/TicketMessages/otPublicTracking pixel endpoint that marks open state when token matches.
GET/api/TicketMessages/unsubscribejobadPublicUnsubscribe a job-ad record referenced through message custom fields.

TicketMessageTopics

MethodPathAccessPurpose
GET/api/TicketMessageTopics?messageId={messageId}TicketAccessOrPhoneAuthList topics assigned to one message.
GET/api/TicketMessageTopics/{id}TicketAccessOrPhoneAuthRead one message-topic link.
POST/api/TicketMessageTopicsTicketAccessOrPhoneAuthCreate a message-topic link after channel policy checks.
PUT/api/TicketMessageTopics/{id}TicketAccessOrPhoneAuthUpdate the message/topic pair after permission checks.
DELETE/api/TicketMessageTopics/{id}TicketAccessOrPhoneAuthDelete a message-topic link.

Fields and DTOs

TicketMessageCreateDTO

Body for POST /api/TicketMessages/create-new and related create flows.

AreaFieldsNotes
Parent and channelticketID, channel, channelIDticketID is optional; when omitted, the server can create the parent ticket. channel must be Email, Chat, Phone, WhatsApp or Teams.
Direction and senderincoming, senderType, isDraftControls incoming/outgoing handling, sender classification and draft lifecycle.
Email addressesfromAddress, fromName, toAddress, ccAddress, bccAddressfromAddress max length is 320.
Phone/messaging addressesfromNumber, toNumberUsed by phone and messaging channels.
ContentmessageDate, subject, textBody, htmlBody, messageEmail, chat and phone content fields.
Context and linkagepageScreenshot, pageURL, additionalInfo, customFieldsData, uid, aiPrompt, emailTemplateID, replyToMessageID, forwardFromMessageIDForward drafts clear reply linkage; custom fields are a dictionary.

TicketMessageUpdateDTO

Body for PUT /api/TicketMessages/{id}.

AreaFieldsNotes
Route matchmessageIDMust match the route id on full update.
Editable responseai_ModifiedResponse, message, additionalInfoUsed for modified replies and extra context.
Outbound emailsubject, toAddress, ccAddress, bccAddressEditable recipient and subject fields.
State and identityisDraft, uid, customFieldsDataDraft state, end-user identifier and custom data.

TicketMessageDetailDTO and TicketMessageSummaryDTO

Returned by detail/list endpoints and used by UI workflows.

AreaFieldsNotes
IdentitymessageID, ticketID, dateCreated, customerIDOwnership and entity identifiers.
Sender and channelsenderType, customerRepID, customerRepName, channelID, channelNameRepresentative and channel context.
Content and addressingmessage, subject, headers, htmlBody, textBody, bodyPreview, fromAddress, toAddress, ccAddress, bccAddressMessage content, preview and address metadata.
Tracking and deliveryisOpened, isBounced, lastOpenDate, messageIdentifierEmail delivery and open tracking state.
AI and workflow stateaiSpamStatus, aiTopicsStatus, aiReplyStatus, ai_GeneratedResponse, ai_ModifiedResponse, isEscalatedAI status, generated content and escalation state.
Related datatopics, actions, customFieldDefinitions, customFieldsDataRelated topic, action and custom-field data.

Attachments, topics and action bodies

TicketMessageAttachmentDTO

Metadata returned by attachment list endpoints. Binary data is downloaded through the File endpoint.

AreaFieldsNotes
IdentityticketMessageAttachmentID, messageIDAttachment and owning message identifiers.
File metadatafileName, contentType, fileSizeBytes, createdDateTimeFile listing metadata.
Source and conversionisEndUserProvided, isCustomerRepProvided, convertedFromAttachmentID, contentIdSource flags and conversion/threading metadata.
DownloadaccessTokenUse GET /api/File/{accessToken:guid} for the file bytes.

TicketMessageTopicDTO and action bodies

Topic assignment DTOs and small action request bodies.

AreaFieldsNotes
Topic linkticketMessageTopicID, messageID, topicID, topicNameMessage/topic assignment identity and display name.
Correction statecorrected, correctionDate, correctedByCustomerRepID, correctedByCustomerRepNameTracks manual topic corrections.
AI reply bodyadditionalInfo, overrideModelID, allowInternetAccessBody for POST /reply. Internet access override only applies to email channel generation.
Send/action bodiesmodifiedAnswer, oversizedAttachmentDecision, actionID, action, stageUsed by send, execute-action and execute-single-action routes.

Example requests

Create an outbound draft

POST /api/TicketMessages/create-new
Authorization: Bearer <token>
Content-Type: application/json

{
  "ticketID": 101,
  "channel": "Email",
  "channelID": 7,
  "incoming": false,
  "isDraft": true,
  "subject": "Follow-up",
  "message": "Thanks for your question."
}

Generate an AI reply

POST /api/TicketMessages/987/reply
Authorization: Bearer <token>
Content-Type: application/json

{
  "additionalInfo": "Keep the answer short.",
  "allowInternetAccess": false
}

Attach a file

POST /api/TicketMessages/987/attachments
Authorization: Bearer <token>
Content-Type: multipart/form-data

file=@invoice.pdf

Table of Contents

AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.

Contact

For all support, sales, and partnership inquiries, email us at info@answerpal.eu

AnswerPal
Bisschoppenhoflaan 380
2100 Antwerp
Belgium

+32.36416685

BE 0862.692.858