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

# Download activity attachment

> Get a short-lived download URL for a file listed in `events[].downloads`.



## OpenAPI

````yaml GET /v2/retrieval-requests/{retrieval_request_id}/attachments/{attachment_id}/download
openapi: 3.1.0
info:
  title: Tavrn Platform API
  version: '2026-10-16'
  description: >-
    Enterprise API for medical record retrieval: cases, retrieval requests,
    retrieved records and provider invoices, case documents, and webhook
    notifications. Behaviour is versioned by date via the Tavrn-Version header
    (see Guides > Versioning); the path stays /v2.
  contact:
    name: Tavrn Support
    email: contact@tavrn.ai
servers:
  - url: https://enterprise.tavrn.ai
    description: Production server
  - url: https://sandbox.tavrn.ai
    description: Sandbox — synthetic data, test keys
security:
  - bearerAuth: []
tags:
  - name: Cases
    description: Case management operations
  - name: Documents
    description: Document upload and management
  - name: Retrieval Requests
    description: Medical record retrieval requests submitted to healthcare facilities
  - name: Requestors
    description: Multiple retrieval profiles within one organization
  - name: Webhooks
    description: Webhook registration and event notifications
  - name: Events
    description: Persisted log of every event Tavrn emitted for your organization
paths:
  /v2/retrieval-requests/{retrieval_request_id}/attachments/{attachment_id}/download:
    get:
      tags:
        - Retrieval Requests
      summary: Download activity attachment
      description: >-
        Get a short-lived download URL for a file listed in
        `events[].downloads`.
      operationId: downloadRetrievalAttachment
      parameters:
        - $ref: '#/components/parameters/TavrnVersion'
        - name: retrieval_request_id
          in: path
          required: true
          description: Retrieval request ID
          schema:
            type: string
        - name: attachment_id
          in: path
          required: true
          description: '`attachment_id` from `events[].downloads`'
          schema:
            type: string
      responses:
        '200':
          description: Presigned download URL
          headers:
            Tavrn-Version:
              $ref: '#/components/headers/TavrnVersion'
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentDownloadResponse'
        '404':
          description: Retrieval request or attachment not found
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    TavrnVersion:
      name: Tavrn-Version
      in: header
      required: false
      description: >-
        Dated API version (YYYY-MM-DD) to apply to this request. Defaults to the
        version pinned to the API key, then to the baseline 2026-10-16. Unknown
        values return 400 invalid_api_version. See Guides > Versioning.
      schema:
        type: string
        pattern: ^\d{4}-\d{2}-\d{2}$
        example: '2026-10-16'
  headers:
    TavrnVersion:
      description: The dated API version that was applied to this request.
      schema:
        type: string
        example: '2026-10-16'
    RequestId:
      description: >-
        Unique id for this request (`req_…`, or the `Request-Id` /
        `X-Request-Id` you sent, when printable ASCII and at most 128
        characters). Present on every /v2 response; quote it in support
        requests.
      schema:
        type: string
        maxLength: 128
        example: req_0c1f1f1cd1c84e2f8d4b6a2e9f3b7a11
  schemas:
    AttachmentDownloadResponse:
      type: object
      required:
        - download_url
        - file_name
        - expires_in
      properties:
        download_url:
          type: string
          description: Presigned download URL
          example: https://s3.amazonaws.com/...
        file_name:
          type: string
          example: invoice.pdf
        expires_in:
          type: integer
          description: URL validity in seconds (3600 = 1 hour)
          example: 3600
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: validation_error
            message:
              type: string
              description: Human-readable error message
              example: The patient.date_of_birth field is required
            param:
              type: string
              description: Field the error refers to, when applicable
              example: patient.date_of_birth
            request_id:
              type: string
              description: Same value as the `Request-Id` response header
              example: req_0c1f1f1cd1c84e2f8d4b6a2e9f3b7a11
            doc_url:
              type: string
              format: uri
              description: Link to this error code in the error reference
              example: https://docs.tavrn.ai/guides/v2/errors#validation_error
  responses:
    InternalError:
      description: >-
        Tavrn failed to process the request (`internal_error`). Retry with
        backoff; if it persists, contact support quoting the `Request-Id`.
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: internal_error
              message: Internal server error
              request_id: req_0c1f1f1cd1c84e2f8d4b6a2e9f3b7a11
              doc_url: https://docs.tavrn.ai/guides/v2/errors#internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Use format: `Authorization: Bearer
        tavrn_sk_live_...` Live keys (`tavrn_sk_live_...`) work only against
        https://enterprise.tavrn.ai; sandbox test keys (`tavrn_sk_test_...`,
        from https://sandbox.tavrn.ai) work only against
        https://sandbox.tavrn.ai.

````