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

# Update thesis status

> Update thesis status (invalidate, expire, realize).



## OpenAPI

````yaml /api/openapi.json patch /api/graph/v1/thesis/{thesis_id}
openapi: 3.1.0
info:
  title: Sequency Graph API
  description: >

    # Sequency Graph-Native Trading API


    Graph-native API for trading intelligence, built on FalkorDB.


    ## Features


    - **Screener**: Filter stocks using graph-native queries with relationship
    expansion

    - **Stock Detail**: Complete stock context with all relationships

    - **Confluence Scoring**: Setup quality assessment with weighted components

    - **Strategy Matching**: Find matching options strategies via graph
    traversal

    - **Market Context**: Current market-wide context for trading decisions


    ## Data Sources


    All data is sourced from the FalkorDB knowledge graph, populated by:

    - Pattern detector (Go) - Technical indicators, patterns

    - Graph sync service - Levels, volume profiles, news, day classification
  version: 1.0.0
servers: []
security: []
paths:
  /api/graph/v1/thesis/{thesis_id}:
    patch:
      tags:
        - Thesis
      summary: Update thesis status
      description: Update thesis status (invalidate, expire, realize).
      operationId: update_thesis_api_graph_v1_thesis__thesis_id__patch
      parameters:
        - name: thesis_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Thesis Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThesisUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Thesis'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ThesisUpdate:
      properties:
        status:
          $ref: '#/components/schemas/ThesisStatus'
        reason:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Reason
      type: object
      required:
        - status
      title: ThesisUpdate
      description: Request body for updating thesis status.
    Thesis:
      properties:
        thesis_id:
          type: string
          format: uuid
          title: Thesis Id
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/ThesisStatus'
        regime_dominant:
          anyOf:
            - type: string
            - type: 'null'
          title: Regime Dominant
          description: V5 dominant state at creation
        regime_confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Regime Confidence
          description: V5 Shannon entropy confidence (0-100)
        regime_vector:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Regime Vector
          description: Full 6-state probabilities (for audit)
        vix_regime:
          anyOf:
            - type: string
            - type: 'null'
          title: Vix Regime
          description: VIX regime label at creation
        day_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Day Type
          description: Day classification at creation
        direction:
          type: string
          enum:
            - bullish
            - bearish
            - neutral
          title: Direction
        timeframe:
          type: string
          enum:
            - intraday
            - swing
            - position
          title: Timeframe
        narrative:
          type: string
          title: Narrative
          description: 1-2 sentence human-readable thesis
        sectors:
          items:
            type: string
          type: array
          title: Sectors
          description: Ranked by thesis fit
        catalysts:
          items:
            type: string
          type: array
          title: Catalysts
        invalidation_conditions:
          items:
            type: string
          type: array
          title: Invalidation Conditions
        catalyst_ids:
          items:
            type: string
          type: array
          title: Catalyst Ids
          description: Structured catalyst IDs
        risk_ids:
          items:
            type: string
          type: array
          title: Risk Ids
          description: Structured risk IDs
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
          description: Thesis-specific conviction 0-1
        source:
          type: string
          enum:
            - ai_generated
            - user_defined
            - debate_derived
            - news_derived
          title: Source
        debate_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Debate Id
        macro_event_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Macro Event Id
          description: Driving MacroEvent (graph event_id)
        valid_until:
          type: string
          format: date-time
          title: Valid Until
          description: Auto-set based on timeframe
        symbols:
          items:
            type: string
          type: array
          title: Symbols
        regime_drifted:
          type: boolean
          title: Regime Drifted
          description: True if current regime differs from thesis regime
          default: false
      type: object
      required:
        - thesis_id
        - created_at
        - status
        - direction
        - timeframe
        - narrative
        - sectors
        - confidence
        - source
        - valid_until
      title: Thesis
      description: Full thesis model for API responses.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ThesisStatus:
      type: string
      enum:
        - active
        - invalidated
        - expired
        - realized
      title: ThesisStatus
      description: Thesis lifecycle status.
    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

````