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

# Check Resource Drift

> Check whether a source doc (Google Doc, Notion page, Linear doc, watched URL) has drifted from the library entities linked to it. Returns a per-entity verdict (contradicts / invalidates / strengthens / validates / immaterial, with change kinds and which side moved) and, when material, a consolidated doc-update proposal. Set propose: true to persist that proposal as a real suggestion for human review — then /suggestion/accept posts the attributed comment upstream. The doc must have linked entities (see /resource/link-entities).



## OpenAPI

````yaml post /api/v2/resource/check-drift
openapi: 3.0.0
info:
  version: 5.4.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/resource/check-drift:
    post:
      tags:
        - Resource
      summary: Check Resource Drift
      description: >-
        Check whether a source doc (Google Doc, Notion page, Linear doc, watched
        URL) has drifted from the library entities linked to it. Returns a
        per-entity verdict (contradicts / invalidates / strengthens / validates
        / immaterial, with change kinds and which side moved) and, when
        material, a consolidated doc-update proposal. Set propose: true to
        persist that proposal as a real suggestion for human review — then
        /suggestion/accept posts the attributed comment upstream. The doc must
        have linked entities (see /resource/link-entities).
      operationId: checkDrift
      requestBody:
        description: Resource to check plus the propose flag
        content:
          application/json:
            schema:
              type: object
              properties:
                resourceOId:
                  type: string
                  minLength: 1
                  description: >-
                    The resource (doc) oId to check. Get this from
                    /resource/list or /resource/search.
                  example: rs_1234567890
                propose:
                  type: boolean
                  default: false
                  description: >-
                    When true and the check finds material drift, persist the
                    proposal as a real suggestion on the review rails (visible
                    in the suggestions inbox and via /suggestion/list,
                    /suggestion/accept). When false (default), the check is a
                    pure diagnostic — nothing is created.
              required:
                - resourceOId
      responses:
        '200':
          description: The drift check verdicts and optional proposal
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  material:
                    type: boolean
                    description: >-
                      True when the doc warrants an update from the library's
                      state
                  skippedReason:
                    type: string
                    nullable: true
                    description: >-
                      Why the check was skipped (doc unreadable, no linked
                      entities, unchanged since last check) — null when it ran
                  assessments:
                    type: array
                    items:
                      $ref: '#/components/schemas/ResourceDriftAssessment'
                    description: Per-linked-entity phase-1 verdicts
                  proposal:
                    $ref: '#/components/schemas/ResourceDriftProposal'
                  editHunks:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        anchor:
                          type: string
                        replacement:
                          type: string
                        kind:
                          type: string
                          enum:
                            - replace
                            - insert_after
                            - delete
                      required:
                        - anchor
                        - replacement
                        - kind
                    description: >-
                      Anchor-validated before/after edits for the doc: every
                      anchor was located verbatim in the live document
                      (unmatched ones are dropped), so they can be applied
                      as-is. Null when the model returned none — a change
                      amounting to a full rewrite has a proposal but no hunks.
                  suggestionOId:
                    type: string
                    nullable: true
                    description: >-
                      The persisted suggestion's oId when propose: true created
                      one — pass it to /suggestion/get or /suggestion/accept
                  checkedAt:
                    type: string
                    nullable: true
                  tokensUsed:
                    type: number
                required:
                  - _metadata
                  - material
                  - skippedReason
                  - assessments
                  - proposal
                  - editHunks
                  - suggestionOId
                  - checkedAt
                  - tokensUsed
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          example: 0
          description: API usage
        requestId:
          type: string
          example: requestId
          description: Request ID
        message:
          type: string
          example: message
          description: Message
        timestamp:
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: Timestamp
      required:
        - requestId
        - timestamp
    ResourceDriftAssessment:
      type: object
      properties:
        entityType:
          type: string
          enum:
            - Product
            - Service
            - Solution
            - Persona
            - UseCase
            - Reference
            - Segment
            - Competitor
            - Alternative
            - BuyingTrigger
            - CoreFeature
            - Objection
            - ProofPoint
            - Playbook
            - Agent
            - Hypothesis
            - BrandVoice
            - Resource
        entityOId:
          type: string
        entityName:
          type: string
        classification:
          type: string
          enum:
            - contradicts
            - invalidates
            - validates
            - strengthens
            - immaterial
            - baseline
          description: >-
            How the linked entity's state relates to the doc: contradicts /
            invalidates / strengthens / validates / immaterial (baseline =
            hash-only reconciliation stamp, no LLM verdict)
        warrantsDocUpdate:
          type: boolean
        rationale:
          type: string
        changeKinds:
          type: array
          items:
            type: string
            enum:
              - positioning_change
              - messaging_approach_change
              - new_fact
              - new_stat
              - new_anecdote_or_scenario
              - concept_refinement
              - key_language_change
              - claim_retired
              - stat_superseded
              - relationship_reclassified
              - audience_or_icp_shift
              - proof_point_withdrawn
        direction:
          type: string
          nullable: true
          enum:
            - entity_moved
            - doc_moved
            - both_moved
            - none
            - null
          description: Which side moved (doc vs library), when attributable
      required:
        - entityType
        - entityOId
        - entityName
        - classification
        - warrantsDocUpdate
        - rationale
        - changeKinds
    ResourceDriftProposal:
      type: object
      nullable: true
      properties:
        summary:
          type: string
        insight:
          type: string
        recommendedAction:
          type: string
        proposedUpstreamEdit:
          type: string
        confidence:
          type: number
      required:
        - summary
        - insight
        - recommendedAction
        - proposedUpstreamEdit
        - confidence
      description: The consolidated doc-update proposal when material
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````