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

# Create Memory



## OpenAPI

````yaml POST /api/memory
openapi: 3.1.0
info:
  title: MemoryPlugin
  version: 1.0.0
  description: API for managing and querying user memories
servers:
  - url: https://www.memoryplugin.com
security: []
paths:
  /api/memory:
    post:
      summary: Store a new memory
      operationId: AddNewMemory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemoryInput'
      responses:
        '200':
          description: Memory stored successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    MemoryInput:
      type: object
      properties:
        text:
          type: string
          description: >-
            The memory to be added. Always prepend with current date in
            YYYY-MM-DD format in the users timezone if you know it, UTC
            otherwise.
        bucketId:
          type: integer
          description: >-
            The id of the bucket to add the memory to. If not provided, the
            memory will be added to the default bucket.
        source:
          type: string
          description: Client source identifier (e.g., 'chatgpt' for ChatGPT requests)
      required:
        - text
    SuccessResponse:
      type: object
      properties:
        done:
          type: string
          enum:
            - ok
        memoryId:
          type: string
          description: Encoded identifier for the created memory
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        text:
          type: string
        score:
          type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````