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

# Get memory graph data

> Returns graph visualization data for the current memory container. The graph only
includes memories inside the selected scope. Omit `scope` to visualize only unscoped/global memories.




## OpenAPI

````yaml /openapi.yaml get /api/memories/graph
openapi: 3.1.0
info:
  title: MemContext API
  version: 1.1.0
  description: |
    REST API for persistent, evolving AI memory. Save, search, and manage
    memories with automatic deduplication, version chains, and hybrid retrieval.
servers:
  - url: https://api.memcontext.in
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Memories
    description: Save, search, list, update, and delete memories.
  - name: History
    description: Inspect how memories evolve over time.
  - name: Feedback
    description: Rate retrieval quality to improve future results.
  - name: Profiles
    description: Pre-aggregated user context from memory.
  - name: Workspaces
    description: >-
      Company/team account boundaries for billing, members, API keys, and
      vaults.
  - name: API Keys
    description: Workspace-bound API keys for server-side integrations.
  - name: Subscription
    description: Workspace-owned billing and member-memory limits.
  - name: Context Vault
    description: Document ingestion and workspace RAG retrieval.
paths:
  /api/memories/graph:
    get:
      tags:
        - Profiles
      summary: Get memory graph data
      description: >
        Returns graph visualization data for the current memory container. The
        graph only

        includes memories inside the selected scope. Omit `scope` to visualize
        only unscoped/global memories.
      operationId: getMemoryGraph
      parameters:
        - in: query
          name: scope
          schema:
            type: string
            maxLength: 200
          description: Hard isolation boundary for graph traversal.
      responses:
        '200':
          description: Memory graph data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryGraphResponse'
components:
  schemas:
    MemoryGraphResponse:
      type: object
      required:
        - nodes
        - links
        - meta
      properties:
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/MemoryGraphNode'
        links:
          type: array
          items:
            $ref: '#/components/schemas/MemoryGraphLink'
        meta:
          type: object
          required:
            - totalNodes
            - totalLinks
            - relationLinks
            - derivedLinks
          properties:
            totalNodes:
              type: integer
            totalLinks:
              type: integer
            relationLinks:
              type: integer
            derivedLinks:
              type: integer
    MemoryGraphNode:
      type: object
      required:
        - id
        - label
        - content
        - createdAt
        - degree
      properties:
        id:
          type: string
        label:
          type: string
        content:
          type: string
        category:
          type: string
          nullable: true
        scope:
          type: string
          nullable: true
        project:
          type: string
          nullable: true
        rootId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        degree:
          type: integer
    MemoryGraphLink:
      type: object
      required:
        - id
        - source
        - target
        - type
        - derived
      properties:
        id:
          type: string
        source:
          type: string
        target:
          type: string
        type:
          type: string
        strength:
          type: number
          nullable: true
        derived:
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >
        API key created from the MemContext dashboard. Keys are prefixed with
        `mc_`, bound to one workspace, and API-key requests cannot override that
        workspace.

````