> ## 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.

# Request presigned upload URL

> Request a presigned URL for uploading a file under a case. The returned `upload_id` can be used to [create a case document](/api-reference/v2/endpoint/documents/create-document) or to attach a file as `auth_form` or in `attachments[]` when [creating a retrieval request](/api-reference/v2/endpoint/retrieval-requests/create-retrieval-request). Supply `file_name` and `file_type`.



## OpenAPI

````yaml POST /v2/cases/{case_id}/sign-upload
openapi: 3.0.1
info:
  title: Tavrn Platform API
  version: 1.0.0
  description: >-
    Enterprise API for medical record retrieval: cases, retrieval requests,
    retrieved records and provider invoices, case documents, and webhook
    notifications.
  contact:
    name: Tavrn Support
    email: contact@tavrn.ai
servers:
  - url: https://enterprise.tavrn.ai
    description: Production server
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
paths:
  /v2/cases/{case_id}/sign-upload:
    post:
      tags:
        - Cases
      summary: Request presigned upload URL
      description: >-
        Request a presigned URL for uploading a file under a case. The returned
        `upload_id` can be used to [create a case
        document](/api-reference/v2/endpoint/documents/create-document) or to
        attach a file as `auth_form` or in `attachments[]` when [creating a
        retrieval
        request](/api-reference/v2/endpoint/retrieval-requests/create-retrieval-request).
        Supply `file_name` and `file_type`.
      operationId: signUpload
      parameters:
        - name: case_id
          in: path
          required: true
          description: Case ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignUploadRequest'
      responses:
        '200':
          description: Presigned URL generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignUploadResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Case not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SignUploadRequest:
      type: object
      required:
        - file_name
        - file_type
      properties:
        file_name:
          type: string
          description: File name
          example: medical_record.pdf
        file_type:
          type: string
          description: MIME type
          example: application/pdf
    SignUploadResponse:
      type: object
      required:
        - upload_id
        - upload_url
        - expires_at
      properties:
        upload_id:
          type: string
          format: uuid
          description: Temporary upload identifier. Consume within one hour of signing.
          example: 11111111-1111-4111-8111-111111111111
        upload_url:
          type: string
          description: Presigned PUT URL. Upload bytes within 15 minutes.
          example: https://s3.amazonaws.com/...
        expires_at:
          type: string
          format: date-time
          description: >-
            Upload identifier expiry, one hour after signing. The PUT URL
            expires after 15 minutes.
          example: '2025-02-01T13:34:56Z'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Use format: `Authorization: Bearer
        tavrn_sk_live_...`

````