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

# Update Note

> Submit a complete markdown body for a note and the exact `version` being updated.
Send the full desired body in `content` (not a partial markdown patch).
The first line of `content` becomes the updated title.
Trashed notes must be restored before they can be updated.



## OpenAPI

````yaml PATCH /v2/notes/{note_id}
openapi: 3.1.0
info:
  title: Mem API
  description: An API that allows you to interact with the Mem platform.
  version: 1.0.0
servers:
  - url: https://api.mem.ai
security:
  - bearerAuth: []
paths:
  /v2/notes/{note_id}:
    patch:
      tags:
        - external
        - external-v2
      summary: Update Note
      description: >-
        Submit a complete markdown body for a note and the exact `version` being
        updated.

        Send the full desired body in `content` (not a partial markdown patch).

        The first line of `content` becomes the updated title.

        Trashed notes must be restored before they can be updated.
      operationId: app_src_api_routes_external_v2_notes_views_update_note
      parameters:
        - in: path
          name: note_id
          schema:
            description: >-
              UUID of the note to update. Use an ID returned by
              create/list/search. The caller must be able to edit this note.
            format: uuid
            title: Note Id
            type: string
          required: true
          description: >-
            UUID of the note to update. Use an ID returned by
            create/list/search. The caller must be able to edit this note.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNoteRequestSchema'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateNoteResponseSchema'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl
            "https://api.mem.ai/v2/notes/01961d40-7a67-7049-a8a6-d5638cbaaeb9" \
                 --header "Content-Type: application/json" \
                 --header "Authorization: Bearer $MEM_API_KEY" \
                 --request PATCH \
                 --data '{
                     "content": "# Updated title\n\nUpdated markdown content.",
                     "version": 3
                 }'
components:
  schemas:
    UpdateNoteRequestSchema:
      properties:
        content:
          description: >-
            Complete markdown body to submit for this write.

            Send the full desired note body (partial patch semantics are not
            supported

            in this request payload).

            The first line is interpreted as the title.
          examples:
            - |-
              # Updated Meeting Notes

              Discussion Topics:
              - Sprint planning
              - Release checklist

              Action Items:
              - Finalize scope by Friday
              - Share release notes draft
          maxLength: 200000
          title: Content
          type: string
        version:
          description: >-
            Exact note content document version this update is based on.

            Use the `version` returned by `GET /v2/notes/{note_id}` or by the
            most

            recent note write response.
          examples:
            - 2
          minimum: 1
          title: Version
          type: integer
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: |-
            Optional "last updated" timestamp for this write (ISO 8601).
            If omitted, the current server time is used.
          examples:
            - '2025-04-02T09:15:22Z'
            - '2023-12-15T09:45:30+01:00'
          title: Updated At
      required:
        - content
        - version
      title: UpdateNoteRequestSchema
      type: object
    UpdateNoteResponseSchema:
      example:
        collection_ids:
          - 59508b41-8770-4855-aa37-302b1e09aee7
          - 026b426c-14fb-4f22-8d98-7a9121bfaec8
        content: |-
          # Sales Call with Acme Corp

          Updated summary and next steps.
        created_at: '2025-04-11T04:47:14.457Z'
        id: 5e29c8a2-c73b-476b-9311-e2579712d4b1
        request_id: api-request-036ed6c7-de00-459f-a89b-43d26aafe522
        title: Sales Call with Acme Corp
        trashed_at: null
        updated_at: '2025-04-12T10:15:00.000Z'
        version: 5
      properties:
        request_id:
          description: Identifier for this API request. Useful for tracing and support.
          title: Request Id
          type: string
        id:
          description: UUID of the updated note.
          format: uuid
          title: Id
          type: string
        title:
          description: Current note title after the update.
          title: Title
          type: string
        content:
          description: Full markdown content stored after the update.
          title: Content
          type: string
        version:
          description: Current note content document version after the update.
          title: Version
          type: integer
        collection_ids:
          description: Collection UUIDs currently associated with this note.
          items:
            type: string
            format: uuid
          title: Collection Ids
          type: array
        trashed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            Timestamp for when the note was moved to trash, or null when the
            note is active.
          title: Trashed At
        created_at:
          description: Creation timestamp for the note in ISO 8601 format.
          format: date-time
          title: Created At
          type: string
        updated_at:
          description: Last modification timestamp after the update in ISO 8601 format.
          format: date-time
          title: Updated At
          type: string
      required:
        - request_id
        - id
        - title
        - content
        - version
        - collection_ids
        - trashed_at
        - created_at
        - updated_at
      title: UpdateNoteResponseSchema
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````