# Replace file

Fully replaces an existing File. All fields must be provided.

Endpoint: PUT /site/{siteId}/ahds/v1/file/{fileId}
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `siteId` (number, required)
    Site identifier

  - `fileId` (string, required)
    File unique identifier (UUID)

## Request fields (application/json):

  - `downloadUrl` (string, required)
    URL that can be used to download the file content.
    Example: https://example.com

  - `extensions` (object, required)
    Vendor- or practice-specific extensions.

  - `isActive` (boolean, required)
    Whether the file is active and available for use.
    Example: true

  - `mimeType` (string, required)
    MIME type of the file, e.g. 'application/pdf'.
    Example: example

  - `name` (string, required)
    Human-readable file name, typically including extension.
    Example: Example Name

  - `notes` (string, required)
    Free-text notes about the file.
    Example: Example description

  - `sizeBytes` (number, required)
    Size of the file in bytes.
    Example: 1.23

## Response 200:

  - `200` (unknown)
    File replaced successfully

## Response 200 fields (application/json):

  - `createdAt` (string, required)
    Timestamp when the file record was created.
    Example: 2025-01-01T00:00:00.000Z

  - `downloadUrl` (string, required)
    URL that can be used to download the file content.
    Example: https://example.com

  - `extensions` (object, required)
    Vendor- or practice-specific extensions.

  - `fileId` (string, required)
    Canonical identifier for the file.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `isActive` (boolean, required)
    Whether the file is active and available for use.
    Example: true

  - `mimeType` (string, required)
    MIME type of the file, e.g. 'application/pdf'.
    Example: example

  - `name` (string, required)
    Human-readable file name, typically including extension.
    Example: Example Name

  - `notes` (string, required)
    Free-text notes about the file.
    Example: Example description

  - `sizeBytes` (number, required)
    Size of the file in bytes.
    Example: 1.23

  - `updatedAt` (string, required)
    Timestamp when the file record was last modified.
    Example: 2025-01-01T00:00:00.000Z

## Response 400:

  - `400` (unknown)
    Invalid request body

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 404:

  - `404` (unknown)
    File not found

