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

# Get Document

> Fetch a document's metadata and a presigned **GET** URL to download its content (markdown). Use this to retrieve generated notes by `document_id` — e.g. the `document_id` returned by Get Session or Process Template.


Fetch a document's metadata plus a presigned **GET** URL to download its markdown content. Use the `document_id` from [Get Session](/ekascribe/api-reference/sessions/get-session) or [Process Template](/ekascribe/api-reference/sessions/process-template). Presigned URLs expire — fetch fresh, don't store.


## OpenAPI

````yaml GET /voice/api/v1/documents/{document_id}
openapi: 3.0.1
info:
  title: EkaScribe Protocol API (MedScribeAlliance v0.1)
  version: '0.1'
  description: >
    Session-based medical voice capture API implementing the MedScribeAlliance
    Protocol v0.1. Discover service capabilities, create a session, stream audio
    chunks, then end the session to trigger asynchronous transcription and
    structured-template extraction.
servers:
  - url: https://api.eka.care
    description: Production server
  - url: https://api.dev.eka.care
    description: Development server
security: []
paths:
  /voice/api/v1/documents/{document_id}:
    get:
      tags:
        - documents
      summary: Get Document
      description: >
        Fetch a document's metadata and a presigned **GET** URL to download its
        content (markdown). Use this to retrieve generated notes by
        `document_id` — e.g. the `document_id` returned by Get Session or
        Process Template.
      parameters:
        - name: document_id
          in: path
          required: true
          description: Document ID
          schema:
            type: string
            example: doc_9f8e7d6c
      responses:
        '200':
          description: Document metadata with download URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentEnvelopeResponse'
              example:
                status: success
                data:
                  document_id: doc_9f8e7d6c
                  session_id: ses_abc123def456
                  template_id: clinical_notes_template
                  document_name: Clinical note
                  type: markdown
                  document_type: template
                  status: success
                  errors: []
                  warnings: []
                  usage_information: {}
                  presigned_url: https://s3.amazonaws.com/...&X-Amz-Signature=...
                  created_at: '2026-06-06T14:21:07Z'
                  updated_at: '2026-06-06T14:25:12Z'
                  publish: {}
        '404':
          description: Document not found (or deleted)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - auth: []
components:
  schemas:
    DocumentEnvelopeResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/Document'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: invalid_audio_format
            message:
              type: string
              description: Human-readable error message.
              example: Audio format 'audio/mp3' is not supported
            details:
              type: object
              additionalProperties: true
              description: Additional error context.
    Document:
      type: object
      properties:
        document_id:
          type: string
        session_id:
          type: string
        template_id:
          type: string
        document_name:
          type: string
        type:
          type: string
          example: markdown
          description: Content format of the document.
        document_type:
          type: string
          description: Document category (`template`, `custom`, `transcript`, ...).
        status:
          type: string
          example: success
        errors:
          type: array
          items: {}
        warnings:
          type: array
          items: {}
        usage_information:
          type: object
          additionalProperties: true
        presigned_url:
          type: string
          description: >
            Presigned S3 URL. On Create/Update it is a **PUT** URL to upload
            content; on Get it is a **GET** URL to download content.
        created_at:
          type: string
        updated_at:
          type: string
        publish:
          type: object
          additionalProperties: true
          description: >-
            Publish status per integration, when the document has been
            published.
  securitySchemes:
    auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````