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

# Observe a note enhancement

> Returns an operation snapshot using the caller's existing note-edit authorization.
With `operation_id`, observe that operation; an unknown ID returns 404.
Without it, observe the latest operation, or an idle snapshot when none exists.

`Accept: application/json` returns the current snapshot. With
`Accept: text/event-stream`, each `enhancement` event's JSON data has the
GetNoteEnhancementResponse schema. The stream subscribes before reading and
replaying the latest snapshot, then sends ordered full accumulated HTML snapshots.
Content replaces the previous preview; it is never a text delta. Compare
both `operation_id` and `sequence`, because sequences restart for each operation.
SSE IDs are `<operation_id>:<sequence>`; reconnect always replays the latest
full snapshot, so retaining an event ID is not required.

The stream without an operation ID remains open to observe subsequent operations
and their durable terminal state. `content` is only a preview while running.
Only a completed snapshot's `ai_note` confirms that the result has been saved.


Only the note owner can observe enhancements. Use `operation_id` to read a specific operation; omit it for the latest operation, or `idle` when none exists.

`Accept: application/json` returns `{enhancement: ...}`. `Accept: text/event-stream` opens an authenticated stream of `enhancement` events with the same JSON wrapper. Subscribe before starting an enhancement to show progress in an open editor. The stream replays the latest snapshot when reconnecting and, without `operation_id`, continues observing later operations.

Each `content` is the full accumulated HTML preview: replace the previous preview rather than appending it. Compare `operation_id` and `sequence` together because the sequence restarts for each operation. SSE event IDs use `<operation_id>:<sequence>`.

Statuses are `idle`, `running`, `completed`, and `failed`. A running preview is not saved; only `completed` with `ai_note` confirms the durable result. On failure, keep the previous saved content and read the latest note before retrying. See [start enhancement](/docs/api-docs/notes/enhance-a-note) and [CLI status commands](/docs/cli/notes#check-enhancement-status).


## OpenAPI

````yaml GET /{team_id}/notes/{note_id}/enhancement
openapi: 3.0.0
info:
  description: Superthread Public API Specification
  version: '0.1'
  title: Public API
  contact:
    email: engineering@superthread.com
servers:
  - url: https://api.superthread.com/v1
security:
  - BearerAuth: []
tags:
  - name: AI
    description: >-
      [Service: AI]. Handles AI-powered functionalities, such as
      recommendations, predictions, and automation features.
  - name: Activity
    description: >-
      [Service: Activity] Manages all activities; creating notifications and
      digests
  - name: Auth
    description: >-
      [Service: Auth] Responsible for user authentication, authorization, and
      session management.
  - name: Boards
    description: >-
      [Service: Boards] Manages core collaboration features such as "boards",
      "cards", "lists", "sprints", "epics".
  - name: Comments
    description: >-
      [Service: Comments] Handles the creation, editing, and management of
      comments across various entities.
  - name: Favourites
    description: >-
      [Service: Favourites] Responsible for favouriting resources in the system
      for quick access.
  - name: Files
    description: >-
      [Service: Files] Manages file uploads, storage, and retrieval for user and
      project resources.
  - name: Importer
    description: >-
      [Service: Importer] Handles data import operations from external sources
      into the platform.
  - name: Integrations
    description: >-
      [Service: Integrations] Facilitates connectivity with external tools and
      services, enabling smooth integration with third-party platforms and APIs.
  - name: Pages
    description: >-
      [Service: Pages] Manages the creation and organization of both public and
      private pages, supporting structured content and navigation and
      collaboration.
  - name: Projects
    description: '[Service: Projects] Handles all project related tasks.'
  - name: Reports
    description: >-
      [Service: Reports] Generates and manages analytical reports and insights
      for users and projects.
  - name: Search
    description: >-
      [Service: Search] Provides search functionalities, including indexing and
      retrieval of platform data.
  - name: TimeTracking
    description: >-
      [Service: TimeTracking] Manages time entries, active timers, time
      categories, billing rates, and audit/lock for time-tracking workflows.
  - name: Views
    description: >-
      [Feature] Provides tools to create and customize views, enabling users to
      organize and visualize their data according to their preferences and
      workflows.
  - name: OAuth2
    description: >-
      [Feature] Supports OAuth2 integration for seamless user authentication and
      authorization, ensuring secure access to external APIs and services.
  - name: Sprints
    description: >-
      [Feature] Facilitates sprint management within agile workflows, including
      planning, progress tracking, and reporting.
  - name: Cards
    description: >-
      [Feature] A Card is the core concept used in the system to describe an
      individual task or work item. They are used across Boards, Sprints, and
      Roadmaps. Cards include features like descriptions, checklists, comments,
      priorities, tags and more.
  - name: Checklists
    description: >-
      [Feature] A Checklist is a list of items that need to be completed. It is
      used to track progress on a card.
  - name: Lists
    description: >-
      [Feature] Represents a collection of tasks or items grouped within
      different contexts in the system. Lists (externally referenced as
      "statuses") are utilized across various entities such as boards, sprints,
      and roadmaps.
  - name: Notes
    description: >-
      [Feature] Enables users to create, edit, and organize notes, supporting
      rich text, attachments, transcriptions and AI enhancements.
  - name: Tags
    description: >-
      [Feature] Groups endpoints related to the creation, retrieval, updating,
      deletion, and merging of tags within teams (workspaces).
  - name: Agents
    description: >-
      [Feature] Manages agents and runs. Provides CRUD operations for agents,
      launching cloud agents, monitoring agent status, retrieving conversations,
      and sending follow-ups.
paths:
  /{team_id}/notes/{note_id}/enhancement:
    parameters:
      - $ref: '#/components/parameters/path_team_id'
      - $ref: '#/components/parameters/path_note_id'
    get:
      tags:
        - Pages
      summary: Observe a note enhancement
      description: >
        Returns an operation snapshot using the caller's existing note-edit
        authorization.

        With `operation_id`, observe that operation; an unknown ID returns 404.

        Without it, observe the latest operation, or an idle snapshot when none
        exists.


        `Accept: application/json` returns the current snapshot. With

        `Accept: text/event-stream`, each `enhancement` event's JSON data has
        the

        GetNoteEnhancementResponse schema. The stream subscribes before reading
        and

        replaying the latest snapshot, then sends ordered full accumulated HTML
        snapshots.

        Content replaces the previous preview; it is never a text delta. Compare

        both `operation_id` and `sequence`, because sequences restart for each
        operation.

        SSE IDs are `<operation_id>:<sequence>`; reconnect always replays the
        latest

        full snapshot, so retaining an event ID is not required.


        The stream without an operation ID remains open to observe subsequent
        operations

        and their durable terminal state. `content` is only a preview while
        running.

        Only a completed snapshot's `ai_note` confirms that the result has been
        saved.
      operationId: getNoteEnhancement
      parameters:
        - in: query
          name: operation_id
          required: false
          description: >-
            Enhancement operation to observe; omit to observe the latest
            operation and future operations.
          schema:
            type: string
            format: uuid
        - in: header
          name: Accept
          required: false
          description: Return a JSON snapshot or an authenticated SSE stream.
          schema:
            type: string
            enum:
              - application/json
              - text/event-stream
            default: application/json
      responses:
        '200':
          description: Current enhancement snapshot or stream of full snapshots.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetNoteEnhancementResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/GetNoteEnhancementResponse'
        default:
          description: client error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
            text/event-stream:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
components:
  parameters:
    path_team_id:
      in: path
      name: team_id
      description: >-
        Team ID is an alphanumerical string that identifies a Team. This is
        externally referred to as a "Workspace".
      required: true
      schema:
        type: string
    path_note_id:
      in: path
      name: note_id
      description: Note ID is a numerical string that identifies a Note.
      required: true
      schema:
        type: string
  schemas:
    GetNoteEnhancementResponse:
      type: object
      required:
        - enhancement
      properties:
        enhancement:
          $ref: '#/components/schemas/NoteEnhancementOperation'
    Error:
      type: object
      properties:
        id:
          type: string
          example: err5f744ab
        code:
          type: integer
          format: int32
          example: 403
        sec:
          $ref: '#/components/schemas/SuperthreadErrorCode'
        message:
          type: string
          example: You do not have access to this resource
          description: A user-friendly error message
        date:
          $ref: '#/components/schemas/STime'
    NoteEnhancementOperation:
      type: object
      required:
        - note_id
        - base_revision
        - sequence
        - status
      properties:
        operation_id:
          type: string
          format: uuid
          description: Operation identity; omitted for an idle snapshot.
        note_id:
          type: string
        note_template_id:
          type: string
          description: Template association of the target enhanced note.
        enhanced_note_id:
          type: string
          description: Target enhanced-note entry.
        base_revision:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Whole-note revision captured when the operation starts; current
            revision for an idle snapshot.
        sequence:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Monotonically increasing snapshot number within one operation. Zero
            for idle; compare together with operation_id.
        status:
          type: string
          enum:
            - idle
            - running
            - completed
            - failed
        mode:
          type: string
          enum:
            - revise
            - reenhance
          description: >-
            Revise persisted enhanced HTML, or regenerate raw notes and
            transcript with an explicit template.
        content:
          type: string
          maxLength: 102400
          x-omitempty: false
          description: >-
            Full accumulated HTML preview, replacing previous snapshots. An
            empty preview is serialized explicitly.
        ai_note:
          $ref: '#/components/schemas/AIEnhancedNote'
        error:
          $ref: '#/components/schemas/Error'
        time_created:
          $ref: '#/components/schemas/STime'
        time_updated:
          $ref: '#/components/schemas/STime'
    SuperthreadErrorCode:
      type: string
      description: |
        Superthread Error Code (`SEC`): A structured error code.
        Format: `SEC:{ServiceID}-{InternalErrorCode}`.


          - `SEC`: Prefix for all structured error codes.
          - `ServiceID`: First 3 characters identify the service, '000' is reserved for generic errors.
          - `InternalErrorCode`: the next (last) 5 characters define the specific error.
      pattern: ^SEC:\d{3}-\d{5}$
      example: SEC:000-00014
    STime:
      type: integer
      format: int64
      example: 1608742037016
      description: unix timestamp in seconds
      x-go-type:
        type: STime
        import:
          package: github.com/superthread-com/common/pkg/types
        hints:
          noValidation: true
          kind: primitive
    AIEnhancedNote:
      type: object
      properties:
        id:
          type: string
          example: 866a3b86-4651-482c-bb69-61921ea4548c
        note_template_id:
          type: string
          example: 1da3b68c-3a82-495c-a6c9-e7a494281a36
        title:
          type: string
          example: Team Note
        content:
          type: string
          maxLength: 102400
        time_updated:
          $ref: '#/components/schemas/STime'
        related_resources:
          type: array
          items:
            $ref: '#/components/schemas/AINoteRelatedResource'
    AINoteRelatedResource:
      type: object
      properties:
        id:
          type: string
          example: '123'
        type:
          type: string
          enum:
            - card
          example: card
        cosine_similarity:
          type: number
          format: float64
          description: cosine similarity score
          example: 0.8
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.