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

# Update Memory Item

> Edit one item's content, key, or position. Owner-only.

``item_type`` is NOT editable. It decides two things at once — which section
of the composed block the item lands in, and whether the row is mirrored
into Qdrant — so switching it is a delete plus a create, not an edit. In
place it would also strand a preference's ``key`` on a fact, where nothing
reads it. Callers who need a different type should delete and re-add.



## OpenAPI

````yaml /api/openapi.json patch /v1/memories/{slug_or_id}/items/{item_id}
openapi: 3.1.0
info:
  title: MeshAPI
  description: One key, all AI models.
  version: 0.1.0
servers:
  - url: https://api.meshapi.ai
security:
  - BearerAuth: []
paths:
  /v1/memories/{slug_or_id}/items/{item_id}:
    patch:
      tags:
        - Memory
      summary: Update Memory Item
      description: >-
        Edit one item's content, key, or position. Owner-only.


        ``item_type`` is NOT editable. It decides two things at once — which
        section

        of the composed block the item lands in, and whether the row is mirrored

        into Qdrant — so switching it is a delete plus a create, not an edit. In

        place it would also strand a preference's ``key`` on a fact, where
        nothing

        reads it. Callers who need a different type should delete and re-add.
      operationId: update_memory_item
      parameters:
        - name: slug_or_id
          in: path
          required: true
          schema:
            type: string
            title: Slug Or Id
        - name: item_id
          in: path
          required: true
          schema:
            type: string
            title: Item Id
        - in: header
          name: X-Mesh-Version
          required: false
          schema:
            type: string
            enum:
              - 2026-08
            default: 2026-08
          example: 2026-08
          description: >-
            Dated version of the API contract to pin this request to. Omit it
            and the request is served under `2026-08` — the oldest supported
            version, so an existing integration is never moved by a release. A
            malformed or unsupported value is rejected with `400
            invalid_api_version` rather than falling back silently. The version
            actually served is echoed as `X-Mesh-Version` on every response,
            including errors.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMemoryItemRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryItemSummary'
        '401':
          description: Missing or invalid credentials
        '404':
          description: Memory or item not found or not owned by caller
        '422':
          description: content must not be blank
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateMemoryItemRequest:
      properties:
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position
      type: object
      title: UpdateMemoryItemRequest
      description: |-
        Partial edit of one item. Every field omitted = leave unchanged.

        ``item_type`` is absent on purpose — see ``update_memory_item``.
      example:
        content: Always answer in British English.
    MemoryItemSummary:
      properties:
        id:
          type: string
          title: Id
        memory_id:
          type: string
          title: Memory Id
        item_type:
          type: string
          title: Item Type
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
        content:
          type: string
          title: Content
        position:
          type: integer
          title: Position
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
        expires_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Expires At
      type: object
      required:
        - id
        - memory_id
        - item_type
        - key
        - content
        - position
        - created_at
        - updated_at
      title: MemoryItemSummary
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter your MeshAPI key (`rsk_...`) — sent as `Authorization: Bearer
        <key>`.

````