Tickets are customer-scoped containers for conversations across email, chat, phone, WhatsApp and Teams. Use this page for ticket metadata and lifecycle state. Use Ticket Messages for the actual communication records and reply workflows.
| Method | Path | Access | Purpose |
|---|---|---|---|
| GET | /api/Tickets | TicketAccess | List processed tickets with filters, sorting and pagination. |
| GET | /api/Tickets/{id} | TicketAccess | Read one ticket after customer and representative permission checks. |
| POST | /api/Tickets | TicketCreateFromPhone | Create a ticket from TicketWriteDTO. Phone-auth calls are bound to the token channel. |
| PUT | /api/Tickets/{id} | TicketAccess | Replace editable ticket fields. Assignment changes are constrained by role. |
| PATCH | /api/Tickets/{id} | TicketAccessOrPhoneAuth | Patch ticket fields with JSON Patch; phone-auth cannot change the token channel. |
| DELETE | /api/Tickets/{id} | TicketAccess | Delete a permitted ticket. |
| PUT | /api/Tickets/bulk | TicketAccess | Bulk update state, assignment, spam/topic learning or action execution. |
| PUT | /api/Tickets/{id}/assign | TicketAccess | Assign a ticket to the current representative and optionally forward phone calls. |
| GET | /api/Tickets/{ticketId}/play | TicketAccess | Download stored call audio for a phone ticket when recording exists. |
| GET | /api/Tickets/{id}/history-summary | TicketAccessOrPhoneAuth | Return historical end-user context for the ticket UID. |
| POST | /api/Tickets/createchatticket | Public | Create a webchat ticket after channel token and hostname validation. |
Used by create, replace and patch-style ticket lifecycle operations.
| Area | Fields | Notes |
|---|---|---|
| Assignment | customerRepID | Optional assignment. Bulk update treats omitted/null as preserve, 0 as unassign and positive values as assignment subject to permission checks. |
| Required state | status, subject, channelType | channelType is required and limited to 20 characters. |
| Flags | escalated, isSpam, isImportant, isClosed, isProcessed | Ticket state flags used by list, detail and workflow operations. |
| Lifecycle dates | closeDate, endDate, followUpDate, lastMessageDate | Future follow-up tickets are hidden unless includeFollowUp=true. |
| Channel and identity | channelID, uid, preview, summary | uid is limited to 254 characters and links tickets to end-user history. |
| Phone metadata | twilio_CallSid, fromNumber, toNumber | Used by call playback and assignment/forwarding flows. |
Returned by ticket list and detail endpoints.
| Area | Fields | Notes |
|---|---|---|
| Identity | ticketID, token, dateCreated | Primary identifier, public token and creation timestamp. |
| Resolved labels | customerRepName, channelName | Display names resolved from assignment and channel relationships. |
| Related context | aiFeedbackComments, endUsers, topics | Related feedback, end-user profiles and topic names. |
| Runtime flags | hasRecording, lastEndUserMessageID | Used by phone playback and latest end-user message context. |
Query object for GET /api/Tickets.
| Area | Fields | Notes |
|---|---|---|
| State filters | status, isSpam, isClosed, includeFollowUp | status can accept multiple values. |
| Assignment and channel filters | customerRepID, channelType, channelIDs | channelIDs can accept multiple values. |
| End-user filters | uid, endUserID, search | search covers ticket-message text. |
| Sorting and paging | sortBy, sortOrder, pageNumber, pageSize | Default sort order is desc; page defaults are 1 and 10. |
Body for PUT /api/Tickets/bulk.
| Area | Fields | Notes |
|---|---|---|
| Required | ticketIDs, action | Bulk actions include state, spam, topic detection, action execution and cleanup flows. |
| Assignment | customerRepID | Omitted/null preserves, 0 unassigns, positive values assign subject to role checks. |
| Workflow context | hookName, topicIds | hookName defaults to PostTopicDetection; topicIds is used for topic updates. |
Lists processed tickets for the authenticated customer. Supports status, customerRepID, channelType, channelIDs, uid, search, endUserID, isSpam, isClosed, includeFollowUp, sortBy, sortOrder, pageNumber and pageSize.
Returns one TicketReadDTO after customer and representative permission checks. Restricted users must own the assignment; agents can read assigned or unassigned tickets.
POST /api/Tickets creates a ticket from TicketWriteDTO. POST /api/Tickets/createchatticket is anonymous and creates a chat ticket only after channel token and hostname validation.
PUT replaces editable TicketWriteDTO fields. PATCH applies JSON Patch. Assignment changes are clamped by role, and phone-auth patching cannot change the token channel.
Deletes a ticket after customer and ticket-permission checks. Returns 204 on success or 404 when the ticket is missing.
BulkUpdateRequest requires ticketIDs and action. Current actions handled by the service include invertstate, spam, notspam, read, close, open, delete, deletecleanup, detectspam, detecttopics, executeactions and updatetopics.
PUT /api/Tickets/{id}/assign assigns to the current rep and can forward phone calls. GET /api/Tickets/{ticketId}/play streams call audio. GET /api/Tickets/{id}/history-summary returns historical end-user context.
GET /api/Tickets?status=Open&pageNumber=1&pageSize=25
Authorization: Bearer <token> PUT /api/Tickets/bulk
Authorization: Bearer <token>
Content-Type: application/json
{
"ticketIDs": [101, 102],
"action": "close"
} PUT /api/Tickets/101/assign
Authorization: Bearer <token> 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