> ## Documentation Index
> Fetch the complete documentation index at: https://cortex-e852fafe-auto-update-openapi-6a9e3873a7492d091ac8c1f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Context

> Browse over knowledge or memories with optional filters. Results are paginated. 

export const Field = ({name, type, required, recommended}) => {
  const label = required ? 'required' : recommended ? 'recommended' : null;
  const typeLabel = typeof type === 'string' ? type : null;
  const ariaParts = [name, typeLabel && `${typeLabel}`, label].filter(Boolean);
  return <span aria-label={ariaParts.join(', ')} className={label ? 'field-wrap has-field-tip' : 'field-wrap'} style={{
    position: 'relative',
    cursor: label ? 'default' : undefined
  }} tabIndex={label ? 0 : undefined}>
      <span className="field-name-row">
        <code>{name}</code>
        {required && <span className="field-req"> *</span>}
        {recommended && <span className="field-rec"> ●</span>}
      </span>
      {type && <span className="field-type">{type}</span>}
      {label && <span className="field-tip" role="tooltip">
          {label}
        </span>}
    </span>;
};

Specify the category using the `type` parameter to filter and view ingested knowledge or user memories within a database or collection:

* `type=knowledge` *(default)*  -  knowledge sources (documents, app sources).
* `type=memory`  -  user memories.

Supports pagination, metadata filters, and field projection. For metadata design and query-time behavior, see [Scoping using metadata](/essentials/v2/metadata).

<RequestExample>
  ```python Python SDK theme={null}
  sources = client.context.list(
      database="acme_corp",
      type="knowledge",
      page=1,
      page_size=50,
      filters={
          "metadata": {"department": "legal"},
          "source_fields": {"type": "slack"},
      },
      include_fields=["title", "type", "timestamp", "additional_metadata"],
  )
  ```

  ```typescript TypeScript SDK theme={null}
  const sources = await client.context.list({
    database: "acme_corp",
    type: "knowledge",
    page: 1,
    pageSize: 50,
    filters: {
      metadata: { department: "legal" },
      source_fields: { type: "slack" },
    },
    includeFields: ["title", "type", "timestamp", "additional_metadata"],
  });
  ```

  ```bash cURL theme={null}
  curl -X POST 'https://api.hydradb.com/context/list' \
    -H "Authorization: Bearer <your_api_key>" \
    -H "API-Version: 2" \
    -H "Content-Type: application/json" \
    -d '{
      "database": "acme_corp",
      "type": "knowledge",
      "page": 1,
      "page_size": 50,
      "filters": {
        "metadata": { "department": "legal" },
        "source_fields": { "type": "slack" }
      },
      "include_fields": ["title", "type", "timestamp", "additional_metadata"]
    }'
  ```
</RequestExample>

## Request body

| Name                                                                     | Description                                                                                                                                                        |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <Field name="database" type="string" required />                         | Owning database. Formerly `tenant_id`; the `tenant_id` alias is still accepted (deprecated).                                                                       |
| <Field name="collection" type="string or null" />                        | Collection scope. If omitted, the default collection is used. Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still accepted (deprecated). (default=`null`) |
| <Field name="type" type="&#x22;knowledge&#x22; or &#x22;memory&#x22;" /> | Bucket to list. (default=`"knowledge"`)                                                                                                                            |
| <Field name="ids" type="string[] or null" />                             | When provided and non-empty, only items with these IDs are returned (pagination + filters still apply). (default=`null`)                                           |
| <Field name="page" type="integer" />                                     | Page number (1-indexed). (default=`1`)                                                                                                                             |
| <Field name="page_size" type="integer" />                                | Items per page, from `1` to `100`. (default=`50`)                                                                                                                  |
| <Field name="filters" type="object" />                                   | Structured exact-match filters. See [Filters](#1-filters). (default=`null`)                                                                                        |
| <Field name="include_fields" type="string[] or null" />                  | Field projection. Only the listed fields plus `id`, `database`, `collection` are populated. Only applies to `type=knowledge`. (default=`null`  -  all fields)      |

### 1. Filters

* `filters` is a structured object with three optional categories. Filters are exact-match constraints i.e. filtered values are matched against stored values as exact values. There are no range, contains, or OR operators on this endpoint; run multiple calls and merge client-side for OR behavior.
* **AND/OR:** All filter pairs combine with a logical AND. To express OR semantics, run multiple calls and union them client-side.
* `ids `**+ filters:** When `ids` is non-empty, only those IDs are considered, but other `filters` still apply on top  -  useful for "show me items 1, 2, 3 that also belong to department=legal".

```json theme={null}
{
  "filters": {
    "metadata": { "department": "Finance", "region": "US" },
    "additional_metadata": { "author": "Alice Smith" },
    "source_fields": { "type": "slack", "title": "standup notes" }
  }
}
```

| Category                                           | Matched against                                                             | Notes                                                                                                                                                                                                                  |
| -------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <Field name="metadata" type="object" />            | Context item's schema-aligned `metadata` payload                            | Use for database metadata fields. `tenant_metadata` is accepted as a legacy alias. Keys must be declared in the database's `database_metadata_schema` with `enable_match: true`; undeclared keys are silently ignored. |
| <Field name="additional_metadata" type="object" /> | Context item's `additional_metadata` payload                                | Free-form per-document JSON. No schema declaration required. `document_metadata` is accepted as a legacy alias.                                                                                                        |
| <Field name="source_fields" type="object" />       | Built-in source fields (`type`, `title`, `description`, `url`, `timestamp`) | Use for app-source categories or quick title lookups.                                                                                                                                                                  |

### 2. Including Fields for convenient data objects

When you don't need every field on every row, pass `include_fields` to keep response payloads small. Only the listed fields are populated; omitted fields should be treated as unavailable in that response. `id`, `database`, and `collection` are always returned.

Allowed values are `title`, `type`, `description`, `note`, `timestamp`, `metadata`, `additional_metadata`, and `relations`. Omit or pass `null` to return everything.

<Note>
  **Projectable vs. fetchable fields.** `content`, `url`, and `attachments` are **not** valid `include_fields` values  -  they are stripped from list responses, and requesting one returns `400`. Fetch them per-source via [Inspect Context](/api-reference/v2/endpoint/fetch-content).
</Note>

`include_fields` only applies to `type=knowledge`. It is ignored for `type=memory`.

<ResponseExample>
  ```json Success theme={null}
  {
    "success": true,
    "data": {
      "success": true,
      "message": "Sources retrieved successfully",
      "sources": [
        {
          "id": "policy_main",
          "database": "acme_corp",
          "collection": "team_docs",
          "title": "Compliance Policy",
          "type": "pdf",
          "timestamp": "2026-05-12T08:14:00Z",
          "additional_metadata": { "author": "Compliance Team" }
        }
      ],
      "total": 318,
      "pagination": {
        "page": 1,
        "page_size": 50,
        "total": 318,
        "total_pages": 7,
        "has_next": true,
        "has_previous": false
      }
    },
    "error": null,
    "meta": {
      "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
      "latency_ms": 12.3
    }
  }
  ```

  ```json Memories response theme={null}
  {
    "success": true,
    "data": {
      "success": true,
      "user_memories": [
        {
          "memory_id": "mem_user_alex_tone",
          "memory_content": "Prefers concise answers and dark mode.",
          "inferred_content": "User prefers concise answers and dark mode."
        }
      ],
      "total": 1,
      "pagination": {
        "page": 1,
        "page_size": 50,
        "total": 1,
        "total_pages": 1,
        "has_next": false,
        "has_previous": false
      }
    },
    "error": null,
    "meta": {
      "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
      "latency_ms": 12.3
    }
  }
  ```

  ```json Failure theme={null}
  {
    "success": false,
    "data": null,
    "error": {
      "code": "DATABASE_NOT_FOUND",
      "message": "Database not found"
    },
    "meta": {
      "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
      "latency_ms": 4.8
    }
  }
  ```
</ResponseExample>

When `type=memory`, `data` is a `ListUserMemoriesResponse` instead  -  same idea but with a `data.user_memories[]` array of memory items.

<Warning>
  **Use the canonical v2 names.** Prefer `filters.metadata` and `filters.additional_metadata`. Legacy `filters.tenant_metadata` and `filters.document_metadata` are accepted for back-compat, with canonical keys winning on conflicts.
</Warning>

<div className="api-before-related-resources" />

<Tip>
  **Related Resources**

  * **Fetch content:** [Fetch Content](/api-reference/v2/endpoint/fetch-content)
  * **Retrieve:** [Query](/api-reference/v2/endpoint/query)
  * **Delete:** [Delete Context](/api-reference/v2/endpoint/delete-source)
</Tip>


## OpenAPI

````yaml api-reference/v2/openapi.json POST /context/list
openapi: 3.1.0
info:
  contact:
    email: support@hydradb.com
    name: HydraDB Support
  description: >-
    HydraDB Application API — knowledge ingestion, search, and memory
    management.
  license:
    name: Proprietary
  title: HydraDB Application API
  version: 0.1.0
servers:
  - description: Production server
    url: https://api.hydradb.com
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /context/list:
    post:
      tags:
        - context
      summary: List documents
      description: >-
        List items (id + metadata) for a database: knowledge sources (default)
        or memories, selected by `type`.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/list.V2ListContentRequest'
        description: List request
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.Envelope-list_V2ListResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Bad Request
      security:
        - BearerAuth: []
components:
  schemas:
    list.V2ListContentRequest:
      properties:
        acl:
          description: 'ACL: see ListContentRequest.ACL (PRO-1684 document ACLs).'
          items:
            type: string
          type: array
          uniqueItems: false
        collection:
          description: >-
            Collection scope. Defaults to the default collection when omitted.
            Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still
            accepted (deprecated).
          example: team_docs
          type: string
        database:
          description: >-
            Database/Collection are the canonical v2 names; TenantID/SubTenantID
            are

            their deprecated aliases (reconciled here in UnmarshalJSON and
            centrally by

            the TenantAliases middleware).
          example: acme_corp
          type: string
        filters:
          $ref: '#/components/schemas/list.ContentFilter'
          example:
            additional_metadata:
              author: ada
            metadata:
              department: finance
        group_threads:
          description: >-
            GroupThreads (type=knowledge only) folds each ticket's/thread root's

            discussion (comment and message app sources carrying an
            app_parent_id)

            under the parent row as `comments`, newest first, instead of listing
            them

            as separate top-level rows. Off by default: the flat shape is the

            existing contract.
          example: true
          type: boolean
        ids:
          description: >-
            When provided, only items with these IDs are returned. Pagination
            and filters still apply.
          example:
            - HydraDoc1234
            - HydraDoc4567
          items:
            type: string
          type: array
          uniqueItems: false
        include_fields:
          description: >-
            Field projection — only the listed fields plus id, database,
            collection are returned. Only applies to type=knowledge.
          example:
            - id
            - title
            - type
          items:
            type: string
          type: array
          uniqueItems: false
        page:
          description: Current page number (1-indexed).
          example: 1
          type: integer
        page_size:
          description: Number of items per page.
          example: 50
          type: integer
        sub_tenant_id:
          deprecated: true
          description: 'deprecated: use collection'
          example: sub_tenant_4567
          type: string
          x-deprecated: 'true'
        tenant_id:
          deprecated: true
          description: 'deprecated: use database'
          example: tenant_1234
          type: string
          x-deprecated: 'true'
        type:
          deprecated: true
          description: |-
            Deprecated: kept for split databases.
            Type names the corpus: knowledge (default) or memory.
          enum:
            - knowledge
            - memory
            - all
          example: knowledge
          type: string
          x-deprecated: true
      type: object
    handler.Envelope-list_V2ListResponse:
      properties:
        data:
          $ref: '#/components/schemas/list.V2ListResponse'
          example:
            message: Success
            pagination:
              has_next: true
              has_previous: false
              page: 1
              page_size: 50
              total: 128
              total_pages: 3
            sources:
              - additional_metadata:
                  author: ada
                  doc_version: 3
                app_external_id: C0123456789
                app_kind: slack
                app_provider: slack
                collection: team_docs
                comments_truncated: true
                database: acme_corp
                description: Internal overview of the Project Phoenix rollout.
                id: HydraDoc1234
                metadata:
                  department: finance
                  priority: 7
                note: Superseded by the Q3 rollout plan.
                sub_tenant_id: sub_tenant_4567
                tenant_id: tenant_1234
                timestamp: '2026-07-02T10:00:00Z'
                title: Project Phoenix Overview
                type: knowledge
            success: true
            total: 128
            user_memories:
              - additional_metadata:
                  author: ada
                  doc_version: 3
                app_external_id: C0123456789
                app_kind: slack
                app_provider: slack
                collection: team_docs
                comments_truncated: true
                database: acme_corp
                description: Internal overview of the Project Phoenix rollout.
                memory_id: memory_1234
                metadata:
                  department: finance
                  priority: 7
                note: Superseded by the Q3 rollout plan.
                sub_tenant_id: sub_tenant_4567
                tenant_id: tenant_1234
                timestamp: '2026-07-02T10:00:00Z'
                title: Project Phoenix Overview
                type: knowledge
        error:
          $ref: '#/components/schemas/handler.apiError'
          description: Error message, empty string on success.
          example:
            code: DATABASE_NOT_FOUND
            message: Database not found
        meta:
          $ref: '#/components/schemas/handler.responseMeta'
          example:
            collection: team_docs
            database: acme_corp
            latency_ms: 12.3
            request_id: 9d13aef4-02f4-4e73-8c62-4c2601d04f9d
            source_type: file
            sub_tenant_id: sub_tenant_4567
            tenant_id: tenant_1234
        success:
          description: Whether the request succeeded.
          example: true
          type: boolean
      type: object
    handler.ErrorResponse:
      properties:
        data: {}
        detail:
          $ref: '#/components/schemas/handler.ErrorDetail'
          description: Structured error detail with code, message, and deprecation hints.
          example:
            deprecated: true
            deprecated_field: tenant_id
            error_code: VALIDATION_ERROR
            message: Request validation failed
            preferred_field: database
        error:
          $ref: '#/components/schemas/handler.apiError'
          description: Error message, empty string on success.
          example:
            code: DATABASE_NOT_FOUND
            message: Database not found
        meta:
          $ref: '#/components/schemas/handler.ErrorMeta'
          example:
            latency_ms: 12.3
            request_id: 9d13aef4-02f4-4e73-8c62-4c2601d04f9d
        success:
          description: Whether the request succeeded.
          example: true
          type: boolean
      type: object
    list.ContentFilter:
      properties:
        additional_metadata:
          additionalProperties: {}
          description: >-
            Filters /context/list by document/additional metadata. Example:
            {"author": "ada"}.
          example:
            author: ada
          type: object
        metadata:
          additionalProperties: {}
          description: >-
            Filters /context/list by tenant/source metadata. Example:
            {"department": "finance"}.
          example:
            department: finance
          type: object
        source_fields:
          additionalProperties: {}
          description: >-
            SourceFields filters by well-known source fields: title, type,

            description, url, timestamp, and the app-source keys app_provider,

            app_kind, app_external_id, app_parent_id.


            app_external_id and app_parent_id are provider-scoped: a Jira issue
            key

            and a Linear id can collide, so pair either with app_provider in the

            same filter to identify one object. Without it a match may span

            providers that reuse the same external id.
          type: object
      type: object
    list.V2ListResponse:
      properties:
        message:
          description: Human-readable result message.
          example: Success
          type: string
        pagination:
          $ref: '#/components/schemas/dashboard.PaginationMeta'
          example:
            has_next: true
            has_previous: false
            page: 1
            page_size: 50
            total: 128
            total_pages: 3
        sources:
          description: Sources carries the rows when type=knowledge (the default).
          example:
            - additional_metadata:
                author: ada
                doc_version: 3
              app_external_id: C0123456789
              app_kind: slack
              app_provider: slack
              collection: team_docs
              comments_truncated: true
              database: acme_corp
              description: Internal overview of the Project Phoenix rollout.
              id: HydraDoc1234
              metadata:
                department: finance
                priority: 7
              note: Superseded by the Q3 rollout plan.
              sub_tenant_id: sub_tenant_4567
              tenant_id: tenant_1234
              timestamp: '2026-07-02T10:00:00Z'
              title: Project Phoenix Overview
              type: knowledge
          items:
            $ref: '#/components/schemas/list.V2SourceItem'
          type: array
          uniqueItems: false
        success:
          deprecated: true
          description: >-
            Deprecated for API clients: to decide whether the request succeeded,

            check the HTTP status code — 2xx is success — or equivalently the

            envelope's top-level `success`. This nested copy always carries the
            same

            value and never carries independent information. Still emitted
            unchanged

            for existing clients (PRO-1208).
          example: true
          type: boolean
          x-deprecated: 'true'
        total:
          description: Total is the total number of matching rows across all pages.
          example: 128
          type: integer
        user_memories:
          description: >-
            UserMemories carries the rows when type=memory. Same item shape as
            Sources

            except each row is keyed by memory_id rather than id.
          example:
            - additional_metadata:
                author: ada
                doc_version: 3
              app_external_id: C0123456789
              app_kind: slack
              app_provider: slack
              collection: team_docs
              comments_truncated: true
              database: acme_corp
              description: Internal overview of the Project Phoenix rollout.
              memory_id: memory_1234
              metadata:
                department: finance
                priority: 7
              note: Superseded by the Q3 rollout plan.
              sub_tenant_id: sub_tenant_4567
              tenant_id: tenant_1234
              timestamp: '2026-07-02T10:00:00Z'
              title: Project Phoenix Overview
              type: knowledge
          items:
            $ref: '#/components/schemas/list.V2MemoryItem'
          type: array
          uniqueItems: false
      type: object
    handler.apiError:
      properties:
        code:
          description: Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).
          example: DATABASE_NOT_FOUND
          type: string
        message:
          description: Human-readable description of the error.
          example: Database not found
          type: string
      type: object
    handler.responseMeta:
      properties:
        api_version:
          description: >-
            APIVersion echoes the version of the API that served the request
            (PRO-1209),

            sourced from reqmeta.APIVersion — the same value carried by OpenAPI

            info.version and /health — so a client always knows which API
            version

            produced a response. Always present (no omitempty).
          type: string
        collection:
          description: >-
            Collection scope. Defaults to the default collection when omitted.
            Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still
            accepted (deprecated).
          example: team_docs
          type: string
        database:
          description: >-
            Owning database. Formerly `tenant_id`; the `tenant_id` alias is
            still accepted (deprecated).
          example: acme_corp
          type: string
        deprecation:
          description: >-
            Deprecation lists any migration nudges that apply to this request —
            the

            caller used a legacy /tenants route, a legacy
            tenant_id/sub_tenant_id field,

            or the deprecated sub_tenant_ids selector. It is a non-breaking
            signal (the

            status code is unchanged); omitempty keeps it absent for
            fully-migrated

            requests. A list so independent deprecations coexist without
            clobbering.
          items:
            $ref: '#/components/schemas/handler.deprecationNotice'
          type: array
          uniqueItems: false
        latency_ms:
          description: Server-side processing time in milliseconds.
          example: 12.3
          type: number
        request_id:
          description: Unique identifier for this request, useful for support and tracing.
          example: 9d13aef4-02f4-4e73-8c62-4c2601d04f9d
          type: string
        source_type:
          description: Type of the parent source (e.g. `file`, `slack`, `notion`).
          example: file
          type: string
        sub_tenant_id:
          deprecated: true
          example: sub_tenant_4567
          type: string
          x-deprecated: 'true'
        tenant_id:
          deprecated: true
          example: tenant_1234
          type: string
          x-deprecated: 'true'
      type: object
    handler.ErrorDetail:
      properties:
        deprecated:
          description: Whether this response concerns a deprecated field or route.
          example: true
          type: boolean
        deprecated_field:
          description: The deprecated field name.
          example: tenant_id
          type: string
        error_code:
          description: Machine-readable error classification code.
          example: VALIDATION_ERROR
          type: string
        message:
          description: Human-readable description of the error.
          example: Request validation failed
          type: string
        preferred_field:
          description: The canonical replacement for the deprecated field.
          example: database
          type: string
        success:
          deprecated: true
          description: >-
            Deprecated for API clients: always false on this path, so it carries
            no

            information. To detect a failure read the HTTP status code; for what

            went wrong read the envelope's error.code and error.message, and

            meta.request_id when reporting it. The whole `detail` object is

            deprecated legacy — tagging the field individually so SDK users see
            it

            on the property, not just the container (PRO-1208).
          example: true
          type: boolean
          x-deprecated: 'true'
      type: object
    handler.ErrorMeta:
      properties:
        api_version:
          type: string
        latency_ms:
          example: 12.3
          type: number
        request_id:
          description: Unique identifier for this request, useful for support and tracing.
          example: 9d13aef4-02f4-4e73-8c62-4c2601d04f9d
          type: string
      type: object
    dashboard.PaginationMeta:
      properties:
        has_next:
          description: Whether a next page exists.
          example: true
          type: boolean
        has_previous:
          description: Whether a previous page exists.
          example: false
          type: boolean
        page:
          description: Current page number (1-indexed).
          example: 1
          type: integer
        page_size:
          description: Number of items per page.
          example: 50
          type: integer
        total:
          description: Total number of items across all pages.
          example: 128
          type: integer
        total_pages:
          description: Total number of pages.
          example: 3
          type: integer
      type: object
    list.V2SourceItem:
      properties:
        additional_metadata:
          additionalProperties: {}
          description: >-
            AdditionalMetadata is the caller-supplied per-document metadata
            (stored as

            document_metadata).
          example:
            author: ada
            doc_version: 3
          type: object
        app_external_id:
          description: >-
            Provider-assigned identifier for this source (e.g. Slack channel
            ID).
          example: C0123456789
          type: string
        app_kind:
          description: App integration category, populated for connector-synced sources.
          example: slack
          type: string
        app_parent_id:
          description: >-
            AppParentID is the provider external id of this source's
            conversational

            parent (a Jira comment carries its issue key, a Slack reply its
            thread

            root), and AppThreadID the discussion grouping key. Mirrored from
            the

            ingestion pipeline; absent for sources without a parent/thread.
          type: string
        app_provider:
          description: >-
            App* carry connector provenance, mirrored onto the source document
            by the

            ingestion pipeline. Null for sources that were not
            connector-ingested.
          example: slack
          type: string
        app_relations:
          description: >-
            Connector-derived relations for this source. Present on
            connector-ingested rows.
        app_thread_id:
          description: >-
            Discussion grouping key shared by a thread root and its
            replies/comments. Absent for unthreaded sources.
          type: string
        collection:
          description: >-
            Collection is the canonical name for the sub-scope this row was
            listed

            from. Empty string when the row lives in the database's default
            collection.
          example: team_docs
          type: string
        comments:
          description: >-
            Comments is the group_threads discussion: the source's
            comment/message

            children as full sibling rows, newest first, capped per parent with

            CommentsTruncated marking an overflow. Present (possibly empty) on
            every

            row of a group_threads response; absent otherwise.
          items:
            additionalProperties: {}
            type: object
          type: array
          uniqueItems: false
        comments_truncated:
          description: >-
            True when the inline `comments` array hit the per-parent cap and
            more children exist. Fetch them via `filters.additional_metadata` on
            the parent's external ID.
          example: true
          type: boolean
        context_category:
          description: >-
            ContextCategory is the context category the caller pinned on ingest:

            one of user_preference, business_knowledge or decision_trace,
            written

            onto the source row by the ingestion pipeline (PRO-1618). Absent
            when no

            category was pinned, on rows ingested before the category existed,
            and

            on every split-database row, which carries no category.
          type: string
        database:
          description: >-
            Database is the canonical name for the scope this row was listed
            from.
          example: acme_corp
          type: string
        description:
          description: Human-readable description of the source.
          example: Internal overview of the Project Phoenix rollout.
          type: string
        id:
          description: |-
            ID is the source identifier. Always present: buildProjection pins
            source.id as an identity field on every projection path.
          example: HydraDoc1234
          type: string
        metadata:
          additionalProperties: {}
          description: >-
            Metadata is the caller-supplied source metadata (stored as
            tenant_metadata).
          example:
            department: finance
            priority: 7
          type: object
        note:
          description: Free-form note attached to the source.
          example: Superseded by the Q3 rollout plan.
          type: string
        relations:
          description: >-
            Relations/AppRelations are passthrough graph subtrees, returned only
            when

            requested via include_fields. Their internal source_id/source_ids
            keys are

            renamed to id/ids on the way out; the rest of the subtree is
            unconstrained.
        sub_tenant_id:
          deprecated: true
          description: >-
            SubTenantID is the deprecated spelling of Collection, carrying an
            identical value.
          example: sub_tenant_4567
          type: string
          x-deprecated: 'true'
        tenant_id:
          deprecated: true
          description: >-
            TenantID is the deprecated spelling of Database, carrying an
            identical value.
          example: tenant_1234
          type: string
          x-deprecated: 'true'
        timestamp:
          description: RFC3339 timestamp associated with this item.
          example: '2026-07-02T10:00:00Z'
          type: string
        title:
          description: Title or name of the source.
          example: Project Phoenix Overview
          type: string
        type:
          description: Type is the source kind, e.g. "knowledge" or "memory".
          example: knowledge
          type: string
      required:
        - collection
        - database
        - id
        - sub_tenant_id
        - tenant_id
      type: object
    list.V2MemoryItem:
      properties:
        additional_metadata:
          additionalProperties: {}
          description: >-
            AdditionalMetadata is the caller-supplied per-document metadata
            (stored as

            document_metadata).
          example:
            author: ada
            doc_version: 3
          type: object
        app_external_id:
          description: >-
            Provider-assigned identifier for this source (e.g. Slack channel
            ID).
          example: C0123456789
          type: string
        app_kind:
          description: App integration category, populated for connector-synced sources.
          example: slack
          type: string
        app_parent_id:
          description: >-
            AppParentID is the provider external id of this source's
            conversational

            parent (a Jira comment carries its issue key, a Slack reply its
            thread

            root), and AppThreadID the discussion grouping key. Mirrored from
            the

            ingestion pipeline; absent for sources without a parent/thread.
          type: string
        app_provider:
          description: >-
            App* carry connector provenance, mirrored onto the source document
            by the

            ingestion pipeline. Null for sources that were not
            connector-ingested.
          example: slack
          type: string
        app_relations: {}
        app_thread_id:
          type: string
        collection:
          description: >-
            Collection is the canonical name for the sub-scope this row was
            listed

            from. Empty string when the row lives in the database's default
            collection.
          example: team_docs
          type: string
        comments:
          description: >-
            Comments is the group_threads discussion: the source's
            comment/message

            children as full sibling rows, newest first, capped per parent with

            CommentsTruncated marking an overflow. Present (possibly empty) on
            every

            row of a group_threads response; absent otherwise.
          items:
            additionalProperties: {}
            type: object
          type: array
          uniqueItems: false
        comments_truncated:
          example: true
          type: boolean
        context_category:
          description: >-
            ContextCategory is the context category the caller pinned on ingest:

            one of user_preference, business_knowledge or decision_trace,
            written

            onto the source row by the ingestion pipeline (PRO-1618). Absent
            when no

            category was pinned, on rows ingested before the category existed,
            and

            on every split-database row, which carries no category.
          type: string
        database:
          description: >-
            Database is the canonical name for the scope this row was listed
            from.
          example: acme_corp
          type: string
        description:
          description: Human-readable description of the source.
          example: Internal overview of the Project Phoenix rollout.
          type: string
        memory_id:
          description: >-
            MemoryID is the memory identifier — the type=memory spelling of ID,
            and

            present on exactly the same terms.
          example: memory_1234
          type: string
        metadata:
          additionalProperties: {}
          description: >-
            Metadata is the caller-supplied source metadata (stored as
            tenant_metadata).
          example:
            department: finance
            priority: 7
          type: object
        note:
          example: Superseded by the Q3 rollout plan.
          type: string
        relations:
          description: >-
            Relations/AppRelations are passthrough graph subtrees, returned only
            when

            requested via include_fields. Their internal source_id/source_ids
            keys are

            renamed to id/ids on the way out; the rest of the subtree is
            unconstrained.
        sub_tenant_id:
          deprecated: true
          description: >-
            SubTenantID is the deprecated spelling of Collection, carrying an
            identical value.
          example: sub_tenant_4567
          type: string
          x-deprecated: 'true'
        tenant_id:
          deprecated: true
          description: >-
            TenantID is the deprecated spelling of Database, carrying an
            identical value.
          example: tenant_1234
          type: string
          x-deprecated: 'true'
        timestamp:
          description: RFC3339 timestamp associated with this item.
          example: '2026-07-02T10:00:00Z'
          type: string
        title:
          description: Title or name of the source.
          example: Project Phoenix Overview
          type: string
        type:
          description: Type is the source kind, e.g. "knowledge" or "memory".
          example: knowledge
          type: string
      required:
        - collection
        - database
        - memory_id
        - sub_tenant_id
        - tenant_id
      type: object
    handler.deprecationNotice:
      properties:
        deprecated:
          description: Whether this response concerns a deprecated field or route.
          example: true
          type: boolean
        deprecated_field:
          description: The deprecated field name.
          example: tenant_id
          type: string
        deprecated_since:
          description: API version when the field was deprecated.
          example: 2.0.1
          type: string
        message:
          description: Migration guidance message.
          example: tenant_id is deprecated; use database instead.
          type: string
        preferred_field:
          description: The canonical replacement for the deprecated field.
          example: database
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API key
      description: 'API key sent as a Bearer token: "Bearer prefix.secret"'
      scheme: bearer
      type: http

````