Free setup on annual plans

Sign up today!

API Reference: Tickets endpoints

The Tickets API now focuses on ticket lifecycle operations: listing, searching, creating, assigning, closing, bulk updates, phone playback and history summary. Conversation messages, drafts, replies, attachments and message-topic flows are documented on the Ticket Messages endpoint page.

Overview and current endpoints

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.

Tickets

MethodPathAccessPurpose
GET/api/TicketsTicketAccessList processed tickets with filters, sorting and pagination.
GET/api/Tickets/{id}TicketAccessRead one ticket after customer and representative permission checks.
POST/api/TicketsTicketCreateFromPhoneCreate a ticket from TicketWriteDTO. Phone-auth calls are bound to the token channel.
PUT/api/Tickets/{id}TicketAccessReplace editable ticket fields. Assignment changes are constrained by role.
PATCH/api/Tickets/{id}TicketAccessOrPhoneAuthPatch ticket fields with JSON Patch; phone-auth cannot change the token channel.
DELETE/api/Tickets/{id}TicketAccessDelete a permitted ticket.
PUT/api/Tickets/bulkTicketAccessBulk update state, assignment, spam/topic learning or action execution.
PUT/api/Tickets/{id}/assignTicketAccessAssign a ticket to the current representative and optionally forward phone calls.
GET/api/Tickets/{ticketId}/playTicketAccessDownload stored call audio for a phone ticket when recording exists.
GET/api/Tickets/{id}/history-summaryTicketAccessOrPhoneAuthReturn historical end-user context for the ticket UID.
POST/api/Tickets/createchatticketPublicCreate a webchat ticket after channel token and hostname validation.

Fields and DTOs

TicketWriteDTO and TicketBaseDTO

Used by create, replace and patch-style ticket lifecycle operations.

AreaFieldsNotes
AssignmentcustomerRepIDOptional assignment. Bulk update treats omitted/null as preserve, 0 as unassign and positive values as assignment subject to permission checks.
Required statestatus, subject, channelTypechannelType is required and limited to 20 characters.
Flagsescalated, isSpam, isImportant, isClosed, isProcessedTicket state flags used by list, detail and workflow operations.
Lifecycle datescloseDate, endDate, followUpDate, lastMessageDateFuture follow-up tickets are hidden unless includeFollowUp=true.
Channel and identitychannelID, uid, preview, summaryuid is limited to 254 characters and links tickets to end-user history.
Phone metadatatwilio_CallSid, fromNumber, toNumberUsed by call playback and assignment/forwarding flows.

TicketReadDTO

Returned by ticket list and detail endpoints.

AreaFieldsNotes
IdentityticketID, token, dateCreatedPrimary identifier, public token and creation timestamp.
Resolved labelscustomerRepName, channelNameDisplay names resolved from assignment and channel relationships.
Related contextaiFeedbackComments, endUsers, topicsRelated feedback, end-user profiles and topic names.
Runtime flagshasRecording, lastEndUserMessageIDUsed by phone playback and latest end-user message context.

Query and bulk DTOs

TicketQueryParameters

Query object for GET /api/Tickets.

AreaFieldsNotes
State filtersstatus, isSpam, isClosed, includeFollowUpstatus can accept multiple values.
Assignment and channel filterscustomerRepID, channelType, channelIDschannelIDs can accept multiple values.
End-user filtersuid, endUserID, searchsearch covers ticket-message text.
Sorting and pagingsortBy, sortOrder, pageNumber, pageSizeDefault sort order is desc; page defaults are 1 and 10.

BulkUpdateRequest

Body for PUT /api/Tickets/bulk.

AreaFieldsNotes
RequiredticketIDs, actionBulk actions include state, spam, topic detection, action execution and cleanup flows.
AssignmentcustomerRepIDOmitted/null preserves, 0 unassigns, positive values assign subject to role checks.
Workflow contexthookName, topicIdshookName defaults to PostTopicDetection; topicIds is used for topic updates.

Ticket endpoint notes

GET /api/Tickets

Lists processed tickets for the authenticated customer. Supports status, customerRepID, channelType, channelIDs, uid, search, endUserID, isSpam, isClosed, includeFollowUp, sortBy, sortOrder, pageNumber and pageSize.

GET /api/Tickets/{id}

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 and webchat creation

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/PATCH /api/Tickets/{id}

PUT replaces editable TicketWriteDTO fields. PATCH applies JSON Patch. Assignment changes are clamped by role, and phone-auth patching cannot change the token channel.

DELETE /api/Tickets/{id}

Deletes a ticket after customer and ticket-permission checks. Returns 204 on success or 404 when the ticket is missing.

PUT /api/Tickets/bulk

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.

Assign, play and history summary

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.

Example requests

List open tickets

GET /api/Tickets?status=Open&pageNumber=1&pageSize=25
Authorization: Bearer <token>

Close several tickets

PUT /api/Tickets/bulk
Authorization: Bearer <token>
Content-Type: application/json

{
  "ticketIDs": [101, 102],
  "action": "close"
}

Assign one ticket

PUT /api/Tickets/101/assign
Authorization: Bearer <token>

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