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

# Search memories

> Vector + full-text search over one end user's memory, fused and
reranked. No LLM pass — sub-second.

Use it when your own agent does the reasoning and just needs relevant
raw material; use `POST /api/v1/recall` for a synthesized answer.




## OpenAPI

````yaml /api/openapi.yaml post /api/v1/search
openapi: 3.1.0
info:
  title: Conare API
  version: 1.2.0
  summary: Per-end-user memory for AI applications.
  description: >
    The Conare API gives your application a persistent, personalized

    memory layer. Production applications authenticate as an organization-owned

    Integration. Every request names an `endUserId`, and

    that end user's memory lives in its own isolated ConareDB namespace. The

    physical tenant is an opaque HMAC derived from the Integration and end-user

    ID; clients cannot select namespaces or address another tenant.


    On top of storage the API provides hybrid retrieval (vector + BM25, fused
    and

    reranked, sub-second), LLM-synthesized **deep recall**, and **proactive

    suggestions** grounded in a user's memory.


    Authentication uses a scoped server-side Integration Bearer key
    (`cint_...`).

    The secret is shown once and persisted by Conare only as a SHA-256 digest.

    Keep it in a server-side secret manager; never ship it to the browser.

    Legacy personal `cmem_...` keys remain accepted during migration.


    Every response includes `X-Request-Id`. Send a caller-generated safe value

    (1–128 characters; first alphanumeric, then `A-Za-z0-9._:-`) to correlate

    one request through the Conare edge and memory plane; otherwise Conare
    generates one. Errors use a

    stable `{ statusCode, code, message, requestId, details? }` envelope and

    never include internal tenant IDs or backend error text.
  contact:
    name: Conare
    url: https://conare.ai
    email: artem@conare.ai
servers:
  - url: https://api.conare.ai
    description: Production (dedicated partner-API host)
  - url: https://conare.ai
    description: Production (alias — same API, on the main host)
security:
  - bearerAuth: []
tags:
  - name: Integration
    description: Credential, configuration, and backend readiness.
  - name: Memories
    description: Write and search a single end user's memory.
  - name: Recall
    description: LLM-synthesized personalization primitives.
  - name: Embeddings
    description: Embed text with Conare's own retrieval embedding model.
  - name: Connectors
    description: >-
      Let end users connect any of ~200 data sources that flow into their
      memory.
  - name: Users
    description: End-user lifecycle (GDPR).
paths:
  /api/v1/search:
    post:
      tags:
        - Memories
      summary: Search memories
      description: |
        Vector + full-text search over one end user's memory, fused and
        reranked. No LLM pass — sub-second.

        Use it when your own agent does the reasoning and just needs relevant
        raw material; use `POST /api/v1/recall` for a synthesized answer.
      operationId: searchMemory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
            examples:
              default:
                value:
                  endUserId: u_123
                  query: charter budget boat type
                  limit: 10
      responses:
        '200':
          description: Ranked matches.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    SearchRequest:
      type: object
      required:
        - endUserId
        - query
      properties:
        endUserId:
          $ref: '#/components/schemas/EndUserId'
        query:
          type: string
          minLength: 1
          example: charter budget boat type
        containerTag:
          allOf:
            - $ref: '#/components/schemas/ContainerTag'
          description: |
            Restrict search to one container. A malformed tag is a `400`,
            never a silently unscoped read.
        limit:
          type: integer
          description: Max results.
          example: 10
        after:
          type: integer
          description: Only memories created after this Unix ms timestamp.
        before:
          type: integer
          description: Only memories created before this Unix ms timestamp.
    SearchResponse:
      type: object
      properties:
        success:
          type: boolean
        results:
          type: array
          items:
            $ref: '#/components/schemas/SearchResult'
      required:
        - success
        - results
    EndUserId:
      type: string
      pattern: ^[A-Za-z0-9@._-]{1,128}$
      minLength: 1
      maxLength: 128
      description: Your stable internal user ID. No colon allowed.
      example: u_123
    ContainerTag:
      type: string
      minLength: 1
      maxLength: 128
      description: |
        Free-form grouping label attached at save time (e.g. `"profile"`,
        `"workspace:acme"`). 1-128 characters; must not contain `/` or
        control characters.
      example: workspace:acme
    SearchResult:
      type: object
      properties:
        id:
          type: string
        matchedContent:
          type: string
          description: The matched text (capped; `originalLength` set when truncated).
        originalLength:
          type: integer
          description: Present only when matchedContent was truncated.
        container_tag:
          type: string
        score:
          type: number
          description: Relevance 0-1.
        created_at:
          type: integer
          description: Unix ms.
        updated_at:
          type: integer
          description: Unix ms.
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
    Error:
      type: object
      properties:
        statusCode:
          type: integer
        code:
          type: string
          description: Stable snake_case machine error code.
        message:
          type: string
        requestId:
          type: string
          description: Correlates this response through Conare services and logs.
        details:
          type: object
          additionalProperties: true
      required:
        - statusCode
        - code
        - message
        - requestId
  responses:
    BadRequest:
      description: Missing or invalid fields (e.g. bad `endUserId`, empty `query`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid Bearer key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The Integration credential does not include the required operation
        scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: >
        Rate limit exceeded (reads 300/min, writes 100/min on the current plan),

        enforced atomically per (account, end user). Rate-window exhaustion
        carries

        a `Retry-After` header (seconds); `details` also has
        `retryAfterSeconds`.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: The per-minute request cap for this operation.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix-seconds timestamp when the window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    RequestId:
      description: Caller-provided or generated request correlation identifier.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cint_
      description: |
        A scoped Integration key, prefixed `cint_`. Send as
        `Authorization: Bearer cint_...` on every request. Server-side only.
        Legacy personal `cmem_...` keys remain accepted during migration;
        team/org-scoped `cmem_...` keys are not valid on this API.

````