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

# Import Memory from Text



## OpenAPI

````yaml POST /api/v1/users/profile/import/{user_id}
openapi: 3.1.0
info:
  title: Memobase API
  summary: APIs for Memobase, a user memory system for LLM Apps
  version: 0.0.40
servers:
  - url: https://api.memobase.dev
  - url: https://api.memobase.cn
security:
  - BearerAuth: []
paths:
  /api/v1/users/profile/import/{user_id}:
    post:
      tags:
        - profile
      summary: Import User Context
      operationId: import_user_context_api_v1_users_profile_import__user_id__post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid4
              - type: string
                format: uuid5
            description: The ID of the user
            title: User Id
          description: The ID of the user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserContextImport'
              description: The content of the user context to import
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UserContextImport:
      properties:
        context:
          type: string
          title: Context
          description: The user context you want to import to Memobase
      type: object
      required:
        - context
      title: UserContextImport
    BaseResponse:
      properties:
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
          description: Response data payload
        errno:
          $ref: '#/components/schemas/CODE'
          description: Error code, 0 means success
          default: 0
        errmsg:
          type: string
          title: Errmsg
          description: Error message, empty when success
          default: ''
      type: object
      title: BaseResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CODE:
      type: integer
      enum:
        - 0
        - 400
        - 401
        - 403
        - 404
        - 405
        - 409
        - 422
        - 500
        - 501
        - 502
        - 503
        - 504
        - 520
      title: CODE
    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:
    BearerAuth:
      type: http
      scheme: bearer

````