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

# Update Memory

> Update an existing memory.

Only the memory owner can update their memories.
Partial updates are supported - only provided fields will be updated.



## OpenAPI

````yaml api-reference/openapi.json put /api/v1/memories/{memory_id}
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/memories/{memory_id}:
    put:
      tags:
        - Memory
      summary: Update Memory
      description: |-
        Update an existing memory.

        Only the memory owner can update their memories.
        Partial updates are supported - only provided fields will be updated.
      operationId: update_memory_api_v1_memories__memory_id__put
      parameters:
        - name: memory_id
          in: path
          required: true
          schema:
            type: string
            title: Memory Id
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The workspace ID
            title: X-Workspace-Id
          description: The workspace ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemoryUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryUpdateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - DualAuthScheme: []
components:
  schemas:
    MemoryUpdate:
      properties:
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
          description: The user ID who owns the memory.
        memory:
          anyOf:
            - type: string
            - type: 'null'
          title: Memory
          description: Updated memory content.
        topics:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Topics
          description: Updated topics for the memory.
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Updated metadata for the memory.
      type: object
      title: MemoryUpdate
      description: Schema for updating an existing memory.
    MemoryUpdateResponse:
      properties:
        memory_id:
          type: string
          title: Memory Id
          description: ID of the updated memory.
        message:
          type: string
          title: Message
          description: Success message.
        memory:
          $ref: '#/components/schemas/MemoryResponse'
          description: The updated memory details.
      type: object
      required:
        - memory_id
        - message
        - memory
      title: MemoryUpdateResponse
      description: Schema for memory update response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MemoryResponse:
      properties:
        memory_id:
          type: string
          title: Memory Id
          description: Unique identifier for the memory.
        user_id:
          type: string
          title: User Id
          description: User ID who owns the memory.
        memory:
          type: string
          title: Memory
          description: The memory content.
        topics:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Topics
          description: Topics associated with the memory.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: When the memory was created.
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: When the memory was last updated.
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Additional metadata for the memory.
      type: object
      required:
        - memory_id
        - user_id
        - memory
      title: MemoryResponse
      description: Schema for memory response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    DualAuthScheme:
      type: http
      scheme: bearer

````