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

# Update a contact memory entry

> Create or replace the memory entry with this name; the entry is upserted, so a PUT to a name that does
not exist yet creates it. This is a full replace, not a patch: omitting `description` clears the stored
description. Returns `{ ok: true, entries: <count after the write> }`; invalid input returns 400 and an
unknown session 404. Staff writes work even when the project's contact-memory feature is disabled.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json put /sessions/{sessionId}/memory/{entryName}
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /sessions/{sessionId}/memory/{entryName}:
    put:
      tags:
        - ContactMemory
      summary: Update a contact memory entry
      description: >-
        Create or replace the memory entry with this name; the entry is
        upserted, so a PUT to a name that does

        not exist yet creates it. This is a full replace, not a patch: omitting
        `description` clears the stored

        description. Returns `{ ok: true, entries: <count after the write> }`;
        invalid input returns 400 and an

        unknown session 404. Staff writes work even when the project's
        contact-memory feature is disabled.
      operationId: UpdateEntry
      parameters:
        - in: path
          name: sessionId
          required: true
          schema:
            type: string
        - in: path
          name: entryName
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactMemoryUpdateBody'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactMemoryWriteResult'
      security:
        - jwt: []
components:
  schemas:
    ContactMemoryUpdateBody:
      properties:
        description:
          type: string
          description: >-
            Optional. Omitting it clears the stored description; this is a full
            replace, not a patch. Truncated to 240 characters.
        content:
          type: string
          description: Required. Truncated to 4000 characters.
      required:
        - content
      type: object
      additionalProperties: false
    ContactMemoryWriteResult:
      properties:
        ok:
          type: boolean
        reason:
          type: string
          enum:
            - disabled
            - no_userId
            - invalid_input
            - session_not_found
          description: >-
            Only set on internal (non-admin) calls; never present in an admin
            API 200 response.
        consolidationEnqueued:
          type: boolean
        entries:
          type: number
          format: double
      required:
        - ok
      type: object
      additionalProperties: false
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````