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

# Add to Graph V2

> Add data to the knowledge graph with automatic entity and relationship extraction.



## OpenAPI

````yaml https://app.recallio.ai/swagger/v1/swagger.json post /api/GraphMemory/addv2
openapi: 3.0.4
info:
  title: Recallio API
  description: API for Recallio.AI
  contact:
    name: Recallio.AI Team
    email: support@recallio.ai
  version: v1
servers:
  - url: https://app.recallio.ai
security:
  - Bearer: []
tags:
  - name: Knowledge
  - name: Memory
  - name: MemoryGraph (Extra Pack)
paths:
  /api/GraphMemory/addv2:
    post:
      tags:
        - MemoryGraph (Extra Pack)
      summary: Add to Graph V2
      description: >-
        Add data to the knowledge graph with automatic entity and relationship
        extraction.
      operationId: AddGraphMemoryV2
      requestBody:
        description: Graph add request with data and metadata
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphAddRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/GraphAddRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/GraphAddRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphAddResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
components:
  schemas:
    GraphAddRequest:
      type: object
      properties:
        data:
          type: string
          nullable: true
        user_id:
          type: string
          nullable: true
        project_id:
          type: string
          nullable: true
      additionalProperties: false
    GraphAddResponse:
      type: object
      properties:
        deleted_entities:
          type: array
          items:
            $ref: '#/components/schemas/GraphEntity'
          nullable: true
        added_entities:
          type: array
          items:
            $ref: '#/components/schemas/GraphEntity'
          nullable: true
        relationships:
          type: array
          items:
            $ref: '#/components/schemas/GraphRelationship'
          nullable: true
      additionalProperties: false
    ErrorReturnClass:
      required:
        - error
      type: object
      properties:
        error:
          minLength: 1
          type: string
          description: Error message indicating the specific validation issue
          example: '"Invalid scope type. Must be ''user'', ''project'', or ''team''."'
      additionalProperties: false
    GraphEntity:
      type: object
      properties:
        id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        entity_type:
          type: string
          nullable: true
        user_id:
          type: string
          nullable: true
        project_id:
          type: string
          nullable: true
        embedding:
          type: array
          items:
            type: number
            format: float
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      additionalProperties: false
    GraphRelationship:
      type: object
      properties:
        id:
          type: string
          nullable: true
        source:
          type: string
          nullable: true
        destination:
          type: string
          nullable: true
        relationship_type:
          type: string
          nullable: true
        user_id:
          type: string
          nullable: true
        project_id:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````