---
title: "Enable graph capabilities"
method: PUT
path: "/api/v0/knowledge-bases/{kb_id}/graph"
tags: ["Knowledge Bases"]
---

# Enable graph capabilities

`PUT /api/v0/knowledge-bases/{kb_id}/graph`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/knowledge-bases/{kb_id}/graph`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/knowledge-bases/:kb_id/graph/put.ts> (a function with typed inputs; its response is checked against the schema)

Attach a graph layer to an existing knowledge collection.

## Path parameters

- `kb_id` string, uuid, required

## Request body

- KnowledgeBaseGraphEnableRequest: Request body for enabling graph capabilities on a collection. Both fields are optional, but supplying one without the other is a 400: a subscription pins a package at an exact version.
  - `package_slug` string, nullable: Slug of the package to subscribe the new graph to.
  - `package_version` string, nullable: Exact version of the package to pin.

## Response `200`

Successful Response

- KnowledgeBaseGetResponse: Response for getting a knowledge base.
  - `id` string, uuid, required: The ID of the knowledge base.
  - `name` string, required: The name of the knowledge base.
  - `description` string, required: The description of the knowledge base.
  - `document_count` integer, required: The number of documents in the knowledge base.
  - `created_at` string, date-time, required: When the knowledge base was created.
  - `updated_at` string, date-time, required: When the knowledge base was last updated.
  - `processing_settings` KnowledgeBaseProcessingSettingsResponse, required: Materialized processing defaults for a knowledge base.
    - `processing_preset` 'full' | 'text_and_tables' | 'layout_only' | 'existing_text' | 'disabled', required: Named template for page-processing options.
    - `page_processing_options` PageProcessingOptions, required: Stage selection for the per-page document pipeline.
      - `text_extraction` 'auto' | 'ocr' | 'vlm' | 'embedded' | 'none': How a page obtains text content.
      - `detect_layout` boolean
      - `extract_tables` boolean
      - `classify_pages` boolean
      - `classify_visuals` boolean
      - `transcribe_visuals` boolean
      - `describe_visuals` boolean
      - `generate_page_descriptions` boolean
      - `process_schematics` boolean
      - `aggregate_viewboxes` boolean
      - `defer_table_refinement` boolean
      - `defer_component_descriptions` boolean
      - `defer_page_descriptions` boolean
  - `graph_enabled` boolean: Whether the collection has graph capabilities enabled.
  - `graph_status` 'disabled' | 'ready' | 'stale': Graph projection status: disabled, ready, or stale.
  - `graph_source_revision` integer, nullable: Counter bumped every time the graph's inputs change: a document joining or leaving the collection, or a member drawing's annotation being edited. Null when no graph layer exists.
  - `graph_projected_revision` integer, nullable: The source revision the last projection ran against. Equal to graph_source_revision exactly when the projection is current, which is what graph_status reports as 'ready'. Null when no graph layer exists.
  - `graph_packages` string[]: Slugs of the ontology packages this collection's graph subscribes, sorted. Empty when no graph layer exists.
  - `graph_features` GraphPackageFeatures[]: What each subscribed package the caller's tier may use offers a client, sorted by slug. A package the tier may not use is absent, and so are its routes' answers.
    - `slug` string, required
    - `version` string, required
    - `story_type_ids` string[], required: Entity types a client opens as the story they belong to rather than as themselves.
    - `interview_type_ids` string[], required: Entity types a client may start an interview about.
    - `drawing` DrawingFeatures: How a client walks this package's items on their drawings.
      - `relationships` DrawingRelationshipFeature[], required: Relationships listed for a focused item, in display order.
        - `type_id` string, required
        - `display_name` string, required: The relationship's name in the reader's language.
      - `pass_through_type_ids` string[], required: Types of the drawn run between two items: reached over a listed relationship, the walk continues from one over the same relationship to the item on its far side.
      - `element_ids_attribute` string, nullable, required: Attribute in which a domain entity lists the drawing element ids it covers.
      - `kind_attribute_names` string[], required: Attributes, in order of preference, whose first non-empty value names what kind of item an entity is; its type's name when none holds one.

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-09** `ecd5b922e78a`: 1 info
  - added the optional property `graph_features/items/drawing` to the response with the `200` status
- **2026-10-13** `7f81908bcdfe`: 2 info
  - added the optional property `graph_features` to the response with the `200` status
  - added the optional property `graph_packages` to the response with the `200` status
- **2026-09-25** `fcd15f6d35b4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/knowledge-bases/:kb_id/graph/put.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
