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

> Update a memory's name, description, is_active, or retention. Owner-only.



## OpenAPI

````yaml /api/openapi.json patch /v1/memories/{slug_or_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}:
    patch:
      tags:
        - Memory
      summary: Update Memory
      description: >-
        Update a memory's name, description, is_active, or retention.
        Owner-only.
      operationId: update_memory
      parameters:
        - name: slug_or_id
          in: path
          required: true
          schema:
            type: string
            title: Slug Or 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/UpdateMemoryRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemorySummary'
        '401':
          description: Missing or invalid credentials
        '404':
          description: Memory not found or not owned by caller
        '422':
          description: retention_days out of range
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateMemoryRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retention Days
      type: object
      title: UpdateMemoryRequest
    MemorySummary:
      properties:
        id:
          type: string
          title: Id
        owner:
          type: string
          title: Owner
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
        slug:
          type: string
          title: Slug
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        is_active:
          type: boolean
          title: Is Active
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
        owner_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Email
        can_inject:
          type: boolean
          title: Can Inject
          default: true
        item_counts:
          additionalProperties:
            type: integer
          type: object
          title: Item Counts
          default:
            preference: 0
            guardrail: 0
            fact: 0
        expired_item_counts:
          additionalProperties:
            type: integer
          type: object
          title: Expired Item Counts
          default:
            preference: 0
            guardrail: 0
            fact: 0
        retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retention Days
      type: object
      required:
        - id
        - owner
        - org_id
        - team_id
        - slug
        - name
        - description
        - is_active
        - created_at
        - updated_at
      title: MemorySummary
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter your MeshAPI key (`rsk_...`) — sent as `Authorization: Bearer
        <key>`.

````