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

# Get retrieval file upload URL

> Returns a temporary upload_url and upload_id for a retrieval authorization or attachment, including before a case exists. PUT the file to upload_url, then use upload_id in auth_form or attachments when creating a retrieval. Requires retrievals:write. Upload within 15 minutes and use upload_id within one hour.



## OpenAPI

````yaml POST /v2/retrieval-requests/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/retrieval-requests/sign-upload:
    post:
      tags:
        - Retrieval Requests
      summary: Get retrieval file upload URL
      description: >-
        Returns a temporary upload_url and upload_id for a retrieval
        authorization or attachment, including before a case exists. PUT the
        file to upload_url, then use upload_id in auth_form or attachments when
        creating a retrieval. Requires retrievals:write. Upload within 15
        minutes and use upload_id within one hour.
      operationId: signRetrievalUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationSignUploadRequest'
      responses:
        '200':
          description: Presigned URL generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSignUploadResponse'
        '400':
          description: Validation error
          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'
components:
  schemas:
    OrganizationSignUploadRequest:
      type: object
      properties:
        file_name:
          type: string
          minLength: 1
          maxLength: 500
        file_type:
          type: string
          minLength: 1
          maxLength: 200
          example: application/pdf
      required:
        - file_name
        - file_type
    OrganizationSignUploadResponse:
      type: object
      required:
        - upload_id
        - upload_url
        - expires_at
      properties:
        upload_id:
          type: string
          description: >-
            Temporary upload identifier for this upload flow. Use within one
            hour.
          example: 11111111-1111-4111-8111-111111111111
          format: uuid
        upload_url:
          type: string
          description: >-
            Presigned PUT URL. Upload bytes within 15 minutes using the same
            Content-Type.
          example: https://upload-url.example.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_...`

````