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

# Create Memory

> Create a new memory for the current user.

This endpoint allows users to create personal memories that can be used
for context in future conversations and interactions.



## OpenAPI

````yaml api-reference/openapi.json post /api/v1/memories
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/memories:
    post:
      tags:
        - Memory
      summary: Create Memory
      description: |-
        Create a new memory for the current user.

        This endpoint allows users to create personal memories that can be used
        for context in future conversations and interactions.
      operationId: create_memory_api_v1_memories_post
      parameters:
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The workspace ID
            title: X-Workspace-Id
          description: The workspace ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemoryCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - DualAuthScheme: []
components:
  schemas:
    MemoryCreate:
      properties:
        user_id:
          type: string
          title: User Id
          description: The user ID who owns the memory.
        memory:
          type: string
          title: Memory
          description: The memory content to store.
        memory_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Memory Type
          description: The type of memory. 'user', 'agent', 'team', 'workflow'.
          default: user
        topics:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Topics
          description: Topics associated with the memory.
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Additional metadata for the memory.
      type: object
      required:
        - user_id
        - memory
      title: MemoryCreate
      description: Schema for creating a new memory.
    MemoryCreateResponse:
      properties:
        memory_id:
          type: string
          title: Memory Id
          description: ID of the created memory.
        message:
          type: string
          title: Message
          description: Success message.
        memory:
          $ref: '#/components/schemas/MemoryResponse'
          description: The created memory details.
      type: object
      required:
        - memory_id
        - message
        - memory
      title: MemoryCreateResponse
      description: Schema for memory creation response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MemoryResponse:
      properties:
        memory_id:
          type: string
          title: Memory Id
          description: Unique identifier for the memory.
        user_id:
          type: string
          title: User Id
          description: User ID who owns the memory.
        memory:
          type: string
          title: Memory
          description: The memory content.
        topics:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Topics
          description: Topics associated with the memory.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: When the memory was created.
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: When the memory was last updated.
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Additional metadata for the memory.
      type: object
      required:
        - memory_id
        - user_id
        - memory
      title: MemoryResponse
      description: Schema for memory response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    DualAuthScheme:
      type: http
      scheme: bearer

````