Skip to main content
Version: Latest
Technical Manual

Tickets API

The Tickets API feature maps api/tickets/v1 with Orchard Core's Api authentication scheme (a bearer token). Each call checks the caller's ticket permissions and scope as the pages do; a ticket out of scope is answered 404. Writes take an Idempotency-Key header, so sending one again returns the first answer.

EndpointDoesNeeds
GET ticketsLists tickets, newest change first: q (number or subject), deskId, status (categories, comma separated), assignee (me, unassigned or a user id), requester, accountId, skip, take (at most 100)A view scope
GET tickets/{id}A ticket by its id or numberView
GET tickets/{id}/entriesIts replies, notes and events, newest first, with download addresses for files that work for an hourView
POST ticketsOpens a ticket: type, subject, body, deskId, priorityId, requester (Kind:Id) or requesterName and requesterEmail, accountId, attachmentsReply on the desk
PATCH tickets/{id}Changes subject, statusId, priorityId, deskId, escalationLevel (edit) and teamId, assigneeId (assign)Edit or assign
POST tickets/{id}/repliesA public reply with body, setStatusId and attachmentsReply
POST tickets/{id}/notesAn internal note with body and attachmentsNote

Files travel as { "fileName", "contentType", "content" } with the content in base64, under the site's attachment policy. Tickets opened through the API have the Api channel.

This is the agents' API: entries returns internal notes to anyone who may view the ticket, and every call is scoped by desk permissions. It is never the requesters' API. A customer portal gets its own endpoints with the requester rule (their own tickets, public entries only) rather than reusing these.