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

# Save a new ontology draft version

> Validates and saves a new version. NOT automatically activated — use POST /v1/ontology/apply to make it active.



## OpenAPI

````yaml /api-reference/memory-api.json put /v1/ontology
openapi: 3.1.0
info:
  title: Strattum Memory API
  description: >-
    REST API that serves entity context — profile, timeline, graph, sources and
    formatted context — for agents and UIs. (PRD-003, Workstream 1.3)
  version: 1.0.0
servers: []
security: []
paths:
  /v1/ontology:
    put:
      tags:
        - ontology
      summary: Save a new ontology draft version
      description: >-
        Validates and saves a new version. NOT automatically activated — use
        POST /v1/ontology/apply to make it active.
      operationId: save_ontology_v1_ontology_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveOntologyRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OntologyRecord'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SaveOntologyRequest:
      properties:
        yaml_text:
          type: string
          title: Yaml Text
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
      type: object
      required:
        - yaml_text
      title: SaveOntologyRequest
    OntologyRecord:
      properties:
        id:
          type: integer
          title: Id
        version:
          type: integer
          title: Version
        yaml_text:
          type: string
          title: Yaml Text
        is_current:
          type: boolean
          title: Is Current
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        applied_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Applied At
        applied_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Applied By
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
      type: object
      required:
        - id
        - version
        - yaml_text
        - is_current
        - created_at
        - applied_at
        - applied_by
        - comment
      title: OntologyRecord
      description: Matches the OntologyRecord interface in strattum-console-ui.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````