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

# Regenerate the note for a session

> Queues asynchronous regeneration of the session's clinical note from its transcript. Returns 202 immediately; generation typically takes under a minute. Register a NOTE_REGENERATED outbound webhook to be notified when the fresh note is ready, or poll GET /sessions/{sessionId}/notes. Requires the notes:write scope. Optionally send an Idempotency-Key header: repeated requests with the same key for the same session collapse onto one regeneration (deduplicated for at least one hour — intended for automated retries after a timeout or lost response, not as a permanent operation ledger).



## OpenAPI

````yaml /openapi/ext-api-v1.json post /sessions/{sessionId}/notes/regenerate
openapi: 3.0.0
info:
  title: Healos External API
  version: 1.0.0
  description: >-
    External API for managing patients, documents, and appointments, listing
    providers, and for pulling clinical notes (with transcript and patient
    context).
servers:
  - url: https://api.healos.ai/ext-api/v1
    description: Production
  - url: http://localhost:8787/ext-api/v1
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /sessions/{sessionId}/notes/regenerate:
    post:
      tags:
        - Notes
      summary: Regenerate the note for a session
      description: >-
        Queues asynchronous regeneration of the session's clinical note from its
        transcript. Returns 202 immediately; generation typically takes under a
        minute. Register a NOTE_REGENERATED outbound webhook to be notified when
        the fresh note is ready, or poll GET /sessions/{sessionId}/notes.
        Requires the notes:write scope. Optionally send an Idempotency-Key
        header: repeated requests with the same key for the same session
        collapse onto one regeneration (deduplicated for at least one hour —
        intended for automated retries after a timeout or lost response, not as
        a permanent operation ledger).
      parameters:
        - schema:
            type: string
            description: Session UUID
            example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          required: true
          name: sessionId
          in: path
        - schema:
            type: string
            description: >-
              Optional deduplication key. Repeated requests with the same key
              for the same session collapse onto one regeneration (deduplicated
              for at least one hour).
            example: regen-2026-08-05-0be8b728
          required: false
          name: Idempotency-Key
          in: header
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                template_id:
                  type: string
                  format: uuid
                  description: >-
                    Template to regenerate with. Defaults to the session's
                    current template.
                model:
                  type: string
                  description: >-
                    Note generation model tier (fast, balanced, or detailed).
                    Defaults to the standard tier.
                  example: detailed
              description: Regeneration options (all fields optional)
      responses:
        '202':
          description: Regeneration queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      session_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - queued
                    required:
                      - session_id
                      - status
                  message:
                    type: string
                required:
                  - data
                  - message
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Session not ready for regeneration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
        '503':
          description: Regeneration could not be queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    RateLimitError:
      type: object
      properties:
        error:
          type: string
          example: Rate limit exceeded. Please retry after the window resets.
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key obtained from /api/v1/ext-api-keys

````

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