Base URL and authentication
Authorization: Bearer …. Do not pass a tenant override. Existing credentials and OAuth grants receive no additional permissions automatically; request an explicit grant for new capabilities. See authentication and permissions.
Tickets must be enabled for the workspace. Disabled workspaces return TICKETS_UNAVAILABLE; saved records and history remain preserved. Enabled workspaces support permitted reads and writes without a separate read-only mode.
Routes, tools and permissions
Paths are relative to the base URL.tickets:read discovers both types. Escalation management retains dedicated conversation permissions.
list_assignable_operators requires the existing conversation-assignment read permission. Supporting conversation, message, policy, action-receipt and delivery reads retain their own permissions. Ticket access does not grant those capabilities.
Items and lifecycle
A response includesticketId, tenantId, type, status, title, description, integer revision, timestamps, optional human assignee, source references and permittedActions. Treat permitted actions as current capabilities, not permanent authorization. Every command rechecks access and state.
Several general tickets can coexist with one unresolved escalation. General ticket ownership is independent of conversation ownership; escalation assignment follows conversation ownership. Assignees must be active human operators. Agents are audit actors identified by their credential or OAuth grant, never impersonated human owners.
Start work is explicit. Reading, assignment and replying do not start an item. An agent must assign a human before starting an unassigned item. A human starting an unassigned item claims it. Pending general tickets may resolve or cancel directly. Terminal items are readable but cannot reopen or mutate.
General ticket commands do not change AI mode, unread state or reply attention. Escalation acceptance uses canonical handoff persistence, pauses AI and invalidates pending response epochs. Resolving the exact owning escalation restores AI eligibility subject to other restrictions. No ticket command sends customer messages or clears an independent Needs reply obligation.
Creation and revision checks
POST /tickets requires conversationId, title (1–160 characters) and the Idempotency-Key header (1–200 characters). Optional fields are description (up to 2,000), operatorId, propertyId and stored sourceMessageId. POST /escalations has the same required fields, an optional description up to 800 characters and optional propertyId; assign its owner separately.
VISITO_BASE_URL to the base URL above. Replace example IDs with records in your workspace. Successful creation returns the item with HTTP 201.
Every subsequent ticket mutation addresses the exact ticketId and supplies its current integer revision in the JSON body:
- Update:
revisionand at least one oftitleordescription; open general tickets only. - Assignment:
revisionandoperatorId(human ID ornullto unassign). - Internal note:
revisionand nonemptynote, maximum 2,000 characters. - Start, resolve or cancel:
revision, with optional nonemptynoteup to 2,000 characters.
Discovery, freshness and history
type, status, owner (all, unassigned, or operator ID), propertyId, channel, conversationId, updatedSince, source (commerce or other), purchaseId, includeCommerce, limit and cursor. Default limit is 25, maximum 100. Request includeCommerce=true explicitly to include Commerce in discovery and counts.
The response has tickets, status counts, asOf, hasMore and nullable nextCursor. Counts use the other filters independently of the selected status. Follow nextCursor with unchanged filters. These are live lists, not frozen snapshots; deduplicate IDs and reconcile revisions when items move during pagination. updatedSince enables incremental discovery; it is not a replacement for history or exact-item read-back.
list_ticket_events paginates internal notes and lifecycle history with events, asOf, hasMore and nextCursor. Events identify the actor, action, timestamp and optional revision/note. Detail does not embed full transcripts.
Structured knowledge-gap context
For knowledge-gap escalations,get_ticket can return escalation.knowledgeGap: saved category, schema version, source count, up to five source titles (200 characters each), and optional legacy diagnostic importance/confidence. Those values are not ticket priorities.
A matching saved receipt can add detection time, configured behavior and recorded disposition. It is bound to the exact conversation, initiating event and handoff case. The detection outcome describes the original report, independently of current ticket status. Newer reports are not substituted.
Reading this context requires conversations:read as well as tickets:read. Otherwise contextStatus=permission_denied omits source/category/receipt fields. Missing or malformed historical context returns unavailable; a missing matching receipt has receiptStatus=unavailable without discarding valid saved case context. Source titles are references, not source contents or proof of causation. Queue and mutation responses omit this detailed context: inspect get_ticket after writes.
Conflicts and uncertain outcomes
Request status is one of
not_found, processing, completed, failed, reconciliation_required, with optional ticketId, errorCode, updatedAt. Processing or reconciliation required is not success. When a ticket ID exists, inspect it and its ownership. Do not create a replacement escalation after an uncertain outcome. A not-found receipt alone is not proof that a timed-out command had no effect.
Webhooks and compatibility
Subscribe toticket.created and ticket.updated with tickets:read. Set subscription includeCommerce=true for Commerce events, as well as opting discovery into Commerce. Delivery rechecks authorization, revocation, opt-in and current test/live mode.
Events contain IDs, type, revision and change metadata rather than notes, contact details or full transcripts. Commerce events identify purchase, mode and cycle; purchase-only events omit conversation IDs. Delivery may be duplicated or out of order: deduplicate eventId, compare revisions and reread current state before acting. Keep a recovery cursor and use paginated discovery after delivery interruptions. See webhook authentication and recovery.
Legacy manual reviews retain their original records and history. Deprecated /tasks routes and task tool names remain compatibility adapters with taskId, type=task and tasks fields; existing tasks:read/write grants retain equivalent authority. Legacy task.created/updated subscriptions keep their payload and event identity. Legacy lists exclude Commerce. New integrations should use Tickets names and explicit Commerce opt-in. Existing review/handoff routes and exact-case guards remain supported.
Priorities, deadlines, reminders, arbitrary standalone tickets, agent assignees, guest-AI automatic general-ticket creation, reopening and permanent deletion are outside this version.