openapi: 3.1.0 info: title: Heidi Health Ask Heidi Sessions API version: v2 summary: Public Heidi REST API for ambient AI medical scribe, transcription, consult notes, documents, clinical coding, and Ask Heidi. description: 'The Heidi API lets partner platforms (EHRs, telehealth apps, custom clinician tools) drive Heidi''s ambient documentation engine end-to-end: authentication via tenant API key + per-user JWT, patient profile management, session lifecycle (create, update, list, retrieve), contextual attachments and linked sessions, audio upload (single file or chunked live), transcript retrieval (final or live-chunked), template discovery, streamed consult-note and document generation against Heidi or custom templates, multi-standard clinical coding (ICD-10/SNOMED/CPT and others), and streamed Ask Heidi assistant responses. Documentation: https://www.heidihealth.com/developers/heidi-api/overview ' contact: name: Heidi Health Support url: https://support.heidihealth.com license: name: Heidi Health Terms of Service url: https://www.heidihealth.com/legal/terms-of-service servers: - url: https://registrar.api.heidihealth.com/api/v2/ml-scribe/open-api description: Production security: - bearerAuth: [] tags: - name: Sessions description: Clinical session lifecycle. paths: /sessions: post: tags: - Sessions summary: Create Session operationId: createSession requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionCreate' responses: '200': description: Session created. content: application/json: schema: type: object properties: session_id: type: string /sessions/{session_id}: get: tags: - Sessions summary: Get Session operationId: getSession parameters: - $ref: '#/components/parameters/SessionId' responses: '200': description: Session details. content: application/json: schema: $ref: '#/components/schemas/Session' patch: tags: - Sessions summary: Update Session operationId: updateSession parameters: - $ref: '#/components/parameters/SessionId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionUpdate' responses: '200': description: Session updated. content: application/json: schema: $ref: '#/components/schemas/Session' /sessions/linked-user: get: tags: - Sessions summary: List Linked User Sessions operationId: listLinkedUserSessions parameters: - in: query name: page_size schema: type: integer minimum: 1 maximum: 200 responses: '200': description: Paginated list of sessions. content: application/json: schema: type: object properties: count: type: integer total_count: type: integer has_next: type: boolean has_previous: type: boolean data: type: array items: $ref: '#/components/schemas/Session' components: schemas: SessionCreate: type: object properties: patient_profile_id: type: string ehr_appointment_id: type: string Session: type: object properties: session_id: type: string patient: type: object duration: type: integer language_code: type: string output_language_code: type: string clinician_notes: type: array items: type: string consent_obtained: type: boolean linked_sessions_for_context: type: array items: type: string consult_note: type: object documents: type: array items: $ref: '#/components/schemas/Document' audio: type: object created_at: type: string format: date-time updated_at: type: string format: date-time SessionUpdate: type: object properties: duration: type: integer description: Session duration in seconds. language_code: type: string output_language_code: type: string patient: type: object clinician_notes: type: array items: type: string ehr_appointment_id: type: string ehr_patient_id: type: string consent_obtained: type: boolean linked_sessions_for_context: type: array items: type: string Document: type: object properties: id: type: string index: type: integer name: type: string template_id: type: string generation_type: type: string content: type: string content_type: type: string enum: - MARKDOWN - HTML parameters: SessionId: in: path name: session_id required: true schema: type: string securitySchemes: heidiApiKey: type: apiKey in: header name: Heidi-Api-Key bearerAuth: type: http scheme: bearer bearerFormat: JWT