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.
| Method | Path | Access | Purpose |
|---|---|---|---|
| GET | /api/TicketMessages?ticketId={ticketId} | TicketAccess | List messages for one ticket with pagination and sorting. |
| GET | /api/TicketMessages/{id} | TicketAccessOrPhoneAuth | Read full message details. Phone-auth requests must match the message channel. |
| GET | /api/TicketMessages/{id}/prompt | TicketAccess | Return the stored AI prompt for a message. |
| GET | /api/TicketMessages/{id}/draft | TicketAccess | Return the current draft reply for a message. |
| POST | /api/TicketMessages | TicketCreateFromPhone | Create a raw AP_TicketMessage in an existing ticket. |
| POST | /api/TicketMessages/create-new | TicketCreateFromPhone | Create a message and optionally create its parent ticket. Supports incoming messages, drafts, replies and forwards. |
| PUT | /api/TicketMessages/{id} | TicketAccessOrPhoneAuth | Update editable message fields such as response text, body, addresses, draft state, UID and custom fields. |
| DELETE | /api/TicketMessages/{id} | TicketAccess | Delete one message after ticket permission checks. |
| POST | /api/TicketMessages/{id}/reply | TicketAccessOrPhoneAuth | Generate and store an AI reply. |
| POST | /api/TicketMessages/{id}/preview | TicketAccess | Build final email body preview without sending. |
| POST | /api/TicketMessages/{id}/send | TicketAccess | Send a prepared reply. |
| POST | /api/TicketMessages/{id}/send-new | TicketAccess | Send a newly composed outbound email. |
| POST | /api/TicketMessages/{id}/send-forward | TicketAccess | Send a forward email. |
| POST | /api/TicketMessages/{id}/correct-topics | TicketAccess | Replace topic assignments and mark topic learning status. |
| POST | /api/TicketMessages/{id}/detect-topics | TicketAccess | Run topic detection with optional modelName and executeActions. |
| GET | /api/TicketMessages/{id}/promptDocuments | TicketAccessOrPhoneAuth | Return prompt documents and optional historical ticket/end-user context. |
| POST | /api/TicketMessages/{id}/execute-hook | TicketAccessOrPhoneAuth | Execute configured hook actions for hookName. |
| POST | /api/TicketMessages/{id}/execute-action | TicketAccess | Execute one action by actionID. |
| GET | /api/TicketMessages/{id}/execute-single-action | TicketAccess | Execute one action type from query action. |
| GET | /api/TicketMessages/{id}/attachments | TicketAccess | List attachment metadata for a message. |
| POST | /api/TicketMessages/{id}/attachments | TicketAccess | Upload one multipart file field named file; upload limit is 50 MB. |
| DELETE | /api/TicketMessages/{id}/attachments/{attachmentId} | TicketAccess | Delete one message attachment. |
| POST | /api/TicketMessages/{ticketToken}/escalate | Public | Escalate newest message in a tokenized ticket flow. |
| POST | /api/TicketMessages/{messageId}/escalate-by-id | TicketAccessOrPhoneAuth | Escalate one message by ID. |
| GET | /api/TicketMessages/{ticketToken}/like-dislike | Public | Record end-user like/dislike feedback. |
| GET | /api/TicketMessages/ot | Public | Tracking pixel endpoint that marks open state when token matches. |
| GET | /api/TicketMessages/unsubscribejobad | Public | Unsubscribe a job-ad record referenced through message custom fields. |
| Method | Path | Access | Purpose |
|---|---|---|---|
| GET | /api/TicketMessageTopics?messageId={messageId} | TicketAccessOrPhoneAuth | List topics assigned to one message. |
| GET | /api/TicketMessageTopics/{id} | TicketAccessOrPhoneAuth | Read one message-topic link. |
| POST | /api/TicketMessageTopics | TicketAccessOrPhoneAuth | Create a message-topic link after channel policy checks. |
| PUT | /api/TicketMessageTopics/{id} | TicketAccessOrPhoneAuth | Update the message/topic pair after permission checks. |
| DELETE | /api/TicketMessageTopics/{id} | TicketAccessOrPhoneAuth | Delete a message-topic link. |
Body for POST /api/TicketMessages/create-new and related create flows.
| Area | Fields | Notes |
|---|---|---|
| Parent and channel | ticketID, channel, channelID | ticketID is optional; when omitted, the server can create the parent ticket. channel must be Email, Chat, Phone, WhatsApp or Teams. |
| Direction and sender | incoming, senderType, isDraft | Controls incoming/outgoing handling, sender classification and draft lifecycle. |
| Email addresses | fromAddress, fromName, toAddress, ccAddress, bccAddress | fromAddress max length is 320. |
| Phone/messaging addresses | fromNumber, toNumber | Used by phone and messaging channels. |
| Content | messageDate, subject, textBody, htmlBody, message | Email, chat and phone content fields. |
| Context and linkage | pageScreenshot, pageURL, additionalInfo, customFieldsData, uid, aiPrompt, emailTemplateID, replyToMessageID, forwardFromMessageID | Forward drafts clear reply linkage; custom fields are a dictionary. |
Body for PUT /api/TicketMessages/{id}.
| Area | Fields | Notes |
|---|---|---|
| Route match | messageID | Must match the route id on full update. |
| Editable response | ai_ModifiedResponse, message, additionalInfo | Used for modified replies and extra context. |
| Outbound email | subject, toAddress, ccAddress, bccAddress | Editable recipient and subject fields. |
| State and identity | isDraft, uid, customFieldsData | Draft state, end-user identifier and custom data. |
Returned by detail/list endpoints and used by UI workflows.
| Area | Fields | Notes |
|---|---|---|
| Identity | messageID, ticketID, dateCreated, customerID | Ownership and entity identifiers. |
| Sender and channel | senderType, customerRepID, customerRepName, channelID, channelName | Representative and channel context. |
| Content and addressing | message, subject, headers, htmlBody, textBody, bodyPreview, fromAddress, toAddress, ccAddress, bccAddress | Message content, preview and address metadata. |
| Tracking and delivery | isOpened, isBounced, lastOpenDate, messageIdentifier | Email delivery and open tracking state. |
| AI and workflow state | aiSpamStatus, aiTopicsStatus, aiReplyStatus, ai_GeneratedResponse, ai_ModifiedResponse, isEscalated | AI status, generated content and escalation state. |
| Related data | topics, actions, customFieldDefinitions, customFieldsData | Related topic, action and custom-field data. |
Metadata returned by attachment list endpoints. Binary data is downloaded through the File endpoint.
| Area | Fields | Notes |
|---|---|---|
| Identity | ticketMessageAttachmentID, messageID | Attachment and owning message identifiers. |
| File metadata | fileName, contentType, fileSizeBytes, createdDateTime | File listing metadata. |
| Source and conversion | isEndUserProvided, isCustomerRepProvided, convertedFromAttachmentID, contentId | Source flags and conversion/threading metadata. |
| Download | accessToken | Use GET /api/File/{accessToken:guid} for the file bytes. |
Topic assignment DTOs and small action request bodies.
| Area | Fields | Notes |
|---|---|---|
| Topic link | ticketMessageTopicID, messageID, topicID, topicName | Message/topic assignment identity and display name. |
| Correction state | corrected, correctionDate, correctedByCustomerRepID, correctedByCustomerRepName | Tracks manual topic corrections. |
| AI reply body | additionalInfo, overrideModelID, allowInternetAccess | Body for POST /reply. Internet access override only applies to email channel generation. |
| Send/action bodies | modifiedAnswer, oversizedAttachmentDecision, actionID, action, stage | Used by send, execute-action and execute-single-action routes. |
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."
} POST /api/TicketMessages/987/reply
Authorization: Bearer <token>
Content-Type: application/json
{
"additionalInfo": "Keep the answer short.",
"allowInternetAccess": false
} POST /api/TicketMessages/987/attachments
Authorization: Bearer <token>
Content-Type: multipart/form-data
file=@invoice.pdf AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.
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