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

# Append a new memory (mirrors the MCP remember tool)



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/memories
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:
    post:
      summary: Append a new memory (mirrors the MCP remember tool)
      operationId: remember
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                content:
                  maxLength: 2000
                  minLength: 1
                  type: string
                memoryType:
                  enum:
                    - decision
                    - commitment
                    - blocker
                    - fact
                    - preference
                    - pattern
                    - note
                    - event
                  type: string
                project:
                  maxLength: 256
                  minLength: 1
                  type: string
                scope:
                  default: personal
                  maxLength: 64
                  minLength: 1
                  pattern: ^[a-z0-9][a-z0-9-]*$
                  type: string
                tags:
                  default: []
                  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:
        '201':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  commitmentId:
                    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
                  embedded:
                    enum:
                      - pending
                      - done
                      - failed
                      - 'off'
                    type: string
                  memory:
                    additionalProperties: false
                    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
        '409':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  error:
                    enum:
                      - duplicate_memory
                      - resource_limit_exceeded
                    type: string
                required:
                  - error
                type: object
          description: >-
            The content is already live or the live-memory resource limit has
            been reached
components:
  securitySchemes:
    apiKey:
      in: header
      name: X-API-Key
      type: apiKey
    sessionBearer:
      scheme: bearer
      type: http

````