> ## Documentation Index
> Fetch the complete documentation index at: https://docs.visitoai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add an internal ticket note

> Add a durable internal note with the current ticket revision. This does not send a customer message. Read history to reconcile a lost response before adding the same note again.



## OpenAPI

````yaml /openapi.json post /tickets/{ticketId}/notes
openapi: 3.0.3
info:
  title: Visito M2M API
  version: 1.0.0
  description: >-
    Tenant-scoped server-to-server API for channels, conversations, commerce,
    custom AI tools, and WhatsApp templates. Send operations are asynchronous
    and return queued acknowledgements. Expansion adds conversation controls,
    knowledge, sales opportunities, delivery status, reporting, and signed
    webhooks.
servers:
  - url: https://platform-api.visitoai.com/m2m/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Channels
  - name: Conversations
  - name: Commerce
  - name: Custom tools
  - name: WhatsApp templates
  - name: Properties
  - name: Knowledge
  - name: Sales CRM
  - name: Delivery
  - name: Reporting
  - name: Webhooks
paths:
  /tickets/{ticketId}/notes:
    post:
      tags:
        - Tickets
      summary: Add an internal ticket note
      description: >-
        Add a durable internal note with the current ticket revision. This does
        not send a customer message. Read history to reconcile a lost response
        before adding the same note again.
      operationId: add_ticket_note
      parameters:
        - name: ticketId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
          description: >-
            The durable ticketId from list_tickets or get_ticket, including
            escalation items. Not a conversationId.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketNoteInput'
      responses:
        '200':
          description: Confirmed resource state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketSummary'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketApiError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketApiError'
        '403':
          description: Required permission missing or read-only rollout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketApiError'
        '404':
          description: Resource unavailable in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketApiError'
        '409':
          description: State, revision or idempotency conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketApiError'
        '502':
          description: Reconcile an uncertain escalation request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketApiError'
        '503':
          description: Capability unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    TicketNoteInput:
      type: object
      properties:
        revision:
          type: integer
          minimum: 0
        note:
          type: string
          minLength: 1
          maxLength: 2000
      additionalProperties: false
      required:
        - revision
        - note
    TicketSummary:
      type: object
      properties:
        ticketId:
          type: string
        tenantId:
          type: string
        conversationId:
          type: string
        type:
          type: string
          enum:
            - ticket
            - escalation
        status:
          type: string
          enum:
            - pending
            - in_progress
            - resolved
            - cancelled
        title:
          type: string
        description:
          type: string
        revision:
          type: integer
          minimum: 0
        channel:
          type: string
        contextStatus:
          type: string
          enum:
            - available
            - unavailable
        contact:
          $ref: '#/components/schemas/TicketContact'
        business:
          $ref: '#/components/schemas/TicketBusiness'
        assignee:
          $ref: '#/components/schemas/TicketAssignee'
        createdAt:
          type: string
        updatedAt:
          type: string
        resolvedAt:
          type: string
        source:
          $ref: '#/components/schemas/TicketSource'
        permittedActions:
          type: array
          items:
            type: string
            enum:
              - update
              - assign
              - note
              - start
              - resolve
              - cancel
        escalation:
          $ref: '#/components/schemas/TicketEscalation'
      additionalProperties: false
      required:
        - ticketId
        - tenantId
        - conversationId
        - type
        - status
        - title
        - description
        - revision
        - channel
        - contextStatus
        - contact
        - createdAt
        - updatedAt
        - source
        - permittedActions
    TicketApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          additionalProperties: false
          required:
            - code
            - message
      additionalProperties: false
      required:
        - error
    TicketContact:
      type: object
      properties:
        displayName:
          type: string
        avatarUrl:
          type: string
      additionalProperties: false
    TicketBusiness:
      type: object
      properties:
        propertyId:
          type: string
        name:
          type: string
      additionalProperties: false
      required:
        - propertyId
    TicketAssignee:
      type: object
      properties:
        operatorId:
          type: string
        name:
          type: string
      additionalProperties: false
      required:
        - operatorId
    TicketSource:
      type: object
      properties:
        kind:
          type: string
          enum:
            - manual
            - legacy_review
            - runtime
            - agent
        messageId:
          type: string
        eventId:
          type: string
      additionalProperties: false
      required:
        - kind
    TicketEscalation:
      type: object
      properties:
        reasonCode:
          type: string
        capturedFields:
          type: object
          additionalProperties: true
        missingFields:
          type: array
          items:
            type: string
        returnsToAiOnResolve:
          type: boolean
          enum:
            - true
        ownershipActive:
          type: boolean
        knowledgeGap:
          $ref: '#/components/schemas/TicketKnowledgeGap'
      additionalProperties: false
      required:
        - reasonCode
        - returnsToAiOnResolve
        - ownershipActive
    TicketKnowledgeGap:
      type: object
      additionalProperties: false
      required:
        - contextStatus
      description: >-
        Saved knowledge-gap context, loaded only by ticket detail. Requires
        conversations:read for M2M/MCP. Missing or denied evidence is explicit;
        this is historical evidence, not a current policy evaluation.
      properties:
        contextStatus:
          type: string
          enum:
            - available
            - unavailable
            - permission_denied
        schemaVersion:
          type: string
          enum:
            - '1.0'
            - '2.0'
        category:
          type: string
          maxLength: 100
          description: >-
            Usually missing_knowledge, weak_evidence, contradictory_evidence,
            stale_or_unverifiable_evidence or live_provider_required. Older
            saved categories remain readable.
        sourceCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        sourceTitles:
          type: array
          maxItems: 5
          items:
            type: string
            maxLength: 200
          description: >-
            Up to five recorded source titles, not source contents or proof that
            every listed source caused the contradiction.
        importance:
          type: string
          maxLength: 100
          description: Optional legacy diagnostic importance, not a ticket priority.
        confidence:
          type: string
          enum:
            - high
            - medium
          description: Optional saved legacy confidence.
        receiptStatus:
          type: string
          enum:
            - available
            - unavailable
          description: >-
            Whether a matching detection receipt was read. Does not describe
            ticket completion.
        receipt:
          $ref: '#/components/schemas/TicketKnowledgeGapReceipt'
    TicketKnowledgeGapReceipt:
      type: object
      additionalProperties: false
      required:
        - receiptId
        - reportedAt
        - behavior
        - disposition
      properties:
        receiptId:
          type: string
          maxLength: 200
        reportedAt:
          type: string
          format: date-time
        behavior:
          type: string
          enum:
            - report_only
            - create_handoff
        disposition:
          type: string
          enum:
            - reported
            - handoff_requested
            - handoff_rejected
            - handoff_failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Visito M2M API key
      description: Server-side tenant-scoped credential created from Build > API Keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.