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

# Supersede a memory with a corrected successor, or refile it in place with kind: move (mirrors the MCP revise tool)



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/memories/{id}/revise
openapi: 3.1.0
info:
  description: >-
    The /api/v1 REST mirror of the 3ngram memory core
    (docs/concepts/architecture.mdx: one core, N transports). Authenticate with
    an X-API-Key header or a session Bearer token.
  title: 3ngram REST API
  version: v1
servers:
  - description: 3ngram platform
    url: https://api.3ngram.ai
security:
  - apiKey: []
  - sessionBearer: []
paths:
  /api/v1/memories/{id}/revise:
    post:
      summary: >-
        Supersede a memory with a corrected successor, or refile it in place
        with kind: move (mirrors the MCP revise tool)
      operationId: revise
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - additionalProperties: false
                  properties:
                    kind:
                      const: move
                      description: >-
                        Refile in place: no successor, dates and content
                        untouched.
                      type: string
                    project:
                      description: >-
                        New project. Omitted: unchanged. A project can be
                        replaced, not cleared.
                      maxLength: 256
                      minLength: 1
                      type: string
                    scope:
                      description: 'New scope. Omitted: unchanged.'
                      maxLength: 64
                      minLength: 1
                      pattern: ^[a-z0-9][a-z0-9-]*$
                      type: string
                    sessionRunId:
                      description: >-
                        Opaque id of the current agent session run. Pass through
                        from SessionStart. Omit to attach the single leased-open
                        session for this project, if any. A run id not owned by
                        this tenant fails the write.
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      type: string
                    tags:
                      description: >-
                        New tag list, replacing the old one (order is
                        significant). Omitted: unchanged.
                      items:
                        maxLength: 64
                        minLength: 1
                        type: string
                      maxItems: 32
                      type: array
                  required:
                    - kind
                  type: object
                - additionalProperties: false
                  properties:
                    content:
                      maxLength: 2000
                      minLength: 1
                      type: string
                    edgeIntent:
                      default: supersedes
                      enum:
                        - supersedes
                        - updates
                      type: string
                    memoryType:
                      enum:
                        - decision
                        - commitment
                        - blocker
                        - fact
                        - preference
                        - pattern
                        - note
                        - event
                      type: string
                    project:
                      description: >-
                        Project of the successor. Omitted: inherited from the
                        predecessor.
                      maxLength: 256
                      minLength: 1
                      type: string
                    scope:
                      description: >-
                        Scope of the successor. Omitted: inherited from the
                        predecessor.
                      maxLength: 64
                      minLength: 1
                      pattern: ^[a-z0-9][a-z0-9-]*$
                      type: string
                    sessionRunId:
                      description: >-
                        Opaque id of the current agent session run. Pass through
                        from SessionStart. Omit to attach the single leased-open
                        session for this project, if any. A run id not owned by
                        this tenant fails the write.
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      type: string
                    tags:
                      description: >-
                        Tags of the successor. Omitted: inherited from the
                        predecessor.
                      items:
                        maxLength: 64
                        minLength: 1
                        type: string
                      maxItems: 32
                      type: array
                    topic:
                      maxLength: 256
                      minLength: 1
                      type: string
                  required:
                    - memoryType
                    - topic
                    - content
                  type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                properties:
                  embedded:
                    enum:
                      - pending
                      - done
                      - failed
                      - 'off'
                    type: string
                  memory:
                    additionalProperties: true
                    properties:
                      id:
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        type: string
                      memoryType:
                        enum:
                          - decision
                          - commitment
                          - blocker
                          - fact
                          - preference
                          - pattern
                          - note
                          - event
                        type: string
                      project:
                        anyOf:
                          - maxLength: 256
                            minLength: 1
                            type: string
                          - type: 'null'
                      scope:
                        maxLength: 64
                        minLength: 1
                        pattern: ^[a-z0-9][a-z0-9-]*$
                        type: string
                      topic:
                        type: string
                    required:
                      - id
                      - memoryType
                      - topic
                      - scope
                      - project
                    type: object
                required:
                  - memory
                  - embedded
                type: object
          description: Success
components:
  securitySchemes:
    apiKey:
      in: header
      name: X-API-Key
      type: apiKey
    sessionBearer:
      scheme: bearer
      type: http

````