> ## 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.

# Edit an AI context note

> Edits your connection’s own note. Use its current revision. A conflict requires reloading the note. Requires `contacts:notes:write`.



## OpenAPI

````yaml /openapi.json patch /contacts/{contactId}/notes/{noteId}
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
  - name: Tickets
    description: >-
      General tickets, escalations and Commerce-backed work. See the Tickets
      developer guide for lifecycle, MCP arguments, permissions and retry
      workflows.
    externalDocs:
      description: Tickets developer guide
      url: https://docs.visitoai.com/api-docs/tickets
  - name: Contact notes
    description: Sync customer-specific AI context from your CRM.
paths:
  /contacts/{contactId}/notes/{noteId}:
    patch:
      tags:
        - Contact notes
      summary: Edit an AI context note
      description: >-
        Edits your connection’s own note. Use its current revision. A conflict
        requires reloading the note. Requires `contacts:notes:write`.
      operationId: update_contact_note
      parameters:
        - name: contactId
          in: path
          required: true
          description: Opaque contactId returned by lookup_conversation_contact.
          schema:
            type: string
            maxLength: 160
        - name: noteId
          in: path
          required: true
          description: Stable noteId from the list or create response.
          schema:
            type: string
            pattern: ^[0-9a-f]{64}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  maxLength: 5000
                revision:
                  type: integer
                  minimum: 1
                  maximum: 9007199254740990
              required:
                - text
                - revision
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationContactNoteUpdated'
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    ConversationContactNoteUpdated:
      type: object
      properties:
        note:
          type: object
          properties:
            noteId:
              type: string
            type:
              type: string
              enum:
                - ai_context
            text:
              type: string
              maxLength: 5000
            revision:
              type: integer
              minimum: 1
              maximum: 9007199254740990
            externalRef:
              type: string
              nullable: true
            createdBy:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                source:
                  type: string
                  enum:
                    - staff
                    - integration
              required:
                - id
                - name
                - source
              additionalProperties: false
            updatedBy:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                source:
                  type: string
                  enum:
                    - staff
                    - integration
              required:
                - id
                - name
                - source
              additionalProperties: false
            createdAt:
              type: string
            updatedAt:
              type: string
          required:
            - noteId
            - type
            - text
            - revision
            - externalRef
            - createdBy
            - updatedBy
            - createdAt
            - updatedAt
          additionalProperties: false
      required:
        - note
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: M2M_AUTH_INSUFFICIENT_SCOPE
            message:
              type: string
            details:
              type: object
              additionalProperties: true
      example:
        error:
          code: M2M_AUTH_INSUFFICIENT_SCOPE
          message: M2M credential does not have required scope.
          details:
            requiredScopes:
              - conversations:write
            missingScopes:
              - conversations:write
  responses:
    Error:
      description: Structured error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  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.