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

# Store memory

> Store one or more conversation messages into the user's memory graph. Each message is embedded, classified, and indexed — ready for recall and search.



## OpenAPI

````yaml POST /v1/memory
openapi: 3.1.0
info:
  title: MemWire API
  description: >-
    Persistent AI memory infrastructure — store, recall, and search memories for
    your AI agents.
  version: 1.0.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: http://localhost:8000
    description: Local development server
security: []
paths:
  /v1/memory:
    post:
      tags:
        - Memory
      summary: Store memory
      description: >-
        Store one or more conversation messages into the user's memory graph.
        Each message is embedded, classified, and indexed — ready for recall and
        search.
      operationId: store_memory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreRequest'
            example:
              user_id: alice
              app_id: my_app
              workspace_id: team_1
              messages:
                - role: user
                  content: I prefer dark mode and short answers.
      responses:
        '200':
          description: Memories stored successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreResponse'
              example:
                stored: 1
                memory_ids:
                  - mem_3f7a1c2d9e4b
components:
  schemas:
    StoreRequest:
      type: object
      required:
        - user_id
        - messages
      properties:
        user_id:
          type: string
          description: User identifier. Required for all operations.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          description: One or more conversation messages to store.
        app_id:
          type: string
          description: Optional application namespace.
          nullable: true
        workspace_id:
          type: string
          description: Optional workspace or team namespace.
          nullable: true
        agent_id:
          type: string
          description: Optional agent namespace.
          nullable: true
    StoreResponse:
      type: object
      properties:
        stored:
          type: integer
          description: Number of messages stored.
        memory_ids:
          type: array
          items:
            type: string
          description: IDs of the created memory records.
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - system
          description: The role of the message author.
        content:
          type: string
          description: The text content of the message.

````