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

# Partial-field update



## OpenAPI

````yaml /api-reference/local-api/openapi.yaml patch /modes/{id}
openapi: 3.0.3
info:
  title: HyperWhisper Local API
  description: >
    HTTP API exposed by HyperWhisper.app on `127.0.0.1` when the user enables

    Settings → API Server. Off by default. Used by MCP wrappers, benchmarking

    scripts, and power-user automation.


    **Port + token discovery.** The server writes

    `~/Library/Application Support/HyperWhisper/local-api.json`

    (chmod 600) on every start. Clients read that file to find the port

    and bearer token — neither value is hard-coded.


    **Response envelope.** Successful calls return `{"ok": true, ...}` with

    HTTP 200. Expected business failures (model not installed, missing API

    key, file not found, transcription engine errored, etc.) also return HTTP

    200 with `{"ok": false, "error": {"code": "...", "message": "...", "hint":
    "..."}}`.

    HTTP 4xx is reserved for protocol failures: malformed JSON (400), missing

    or invalid bearer token (401).
  version: 1.0.0
servers:
  - url: http://127.0.0.1:{port}
    description: >-
      Local-only loopback. The port is dynamic — read it from the discovery
      file.
    variables:
      port:
        default: '39201'
        description: >-
          Persisted port from `~/Library/Application
          Support/HyperWhisper/local-api.json`.
security:
  - bearerAuth: []
paths:
  /modes/{id}:
    patch:
      summary: Partial-field update
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModePatch'
      responses:
        '200':
          description: Updated mode
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModeResponse'
components:
  schemas:
    ModePatch:
      description: Partial Mode. Any field omitted is left untouched on the server.
      allOf:
        - $ref: '#/components/schemas/Mode'
    ModeResponse:
      type: object
      properties:
        ok:
          type: boolean
        mode:
          $ref: '#/components/schemas/Mode'
    Mode:
      type: object
      required:
        - name
        - preset
        - language
        - model
        - punctuation
        - capitalization
        - profanityFilter
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        preset:
          type: string
          description: hyper | note | email | commit | custom
        language:
          type: string
        model:
          type: string
        punctuation:
          type: boolean
        capitalization:
          type: boolean
        profanityFilter:
          type: boolean
        customInstructions:
          type: string
          nullable: true
        userSystemPrompt:
          type: string
          nullable: true
        isDefault:
          type: boolean
          nullable: true
        isSystemProvided:
          type: boolean
          nullable: true
        sortOrder:
          type: integer
          nullable: true
        createdDate:
          type: string
          format: date-time
          nullable: true
        modifiedDate:
          type: string
          format: date-time
          nullable: true
        languageModel:
          type: string
          nullable: true
        cloudTranscriptionModel:
          type: string
          nullable: true
        cloudProvider:
          type: string
          nullable: true
        postProcessingMode:
          type: integer
          description: 0 = off, 1 = cloud, 2 = local
        postProcessingProvider:
          type: string
          nullable: true
        englishSpelling:
          type: string
          nullable: true
        useStreamingTranscription:
          type: boolean
          nullable: true
        cloudAccuracyTier:
          type: string
          nullable: true
        removeTrailingPeriod:
          type: boolean
          nullable: true
        enableScreenOCR:
          type: boolean
          nullable: true
        geminiCustomPrompt:
          type: string
          nullable: true
        cloudPostProcessingModel:
          type: string
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: base64-url
      description: >-
        Token from the discovery file. Required on every endpoint except
        /health.

````