---
title: "Replace a facility's supporting documents"
method: PUT
path: "/facilities/{id}/supporting-documents"
tags: ["Facility"]
---

# Replace a facility's supporting documents

`PUT /facilities/{id}/supporting-documents`

Replaces the complete set of supporting documents for the specified facility — this is a full-array replace, not a per-item update-or-delete operation. There is no action field on the request items; every submitted item is written as-is, and any existing document not present in the submitted array is removed. To remove one document, resend the full array with that item omitted; to remove all documents, submit an empty array. The underlying stored file is never deleted from GCS by this call — only the metadata entry is removed from the facility's document list, so the file itself remains in storage. To attach a new document without affecting existing ones, use POST /facilities/{id}/supporting-documents instead, which appends rather than replaces.

## Path parameters

- `id` string, required

## Headers

- `tenant-id` string

## Request body

- SupportingDocumentUpdateRequest1[]
  - `fileUrl` string, required — URL of the supporting document file
  - `fileType` string — Type of the supporting document
  - `originalFileName` string — Original name of the uploaded file
  - `createdAt` string, date
  - `createdBy` string — Email of the user who created the document
  - `state` string — State associated with the document
  - `expirationDate` string, date
  - `source` string — Source of the document

## Response `200`

Supporting documents updated successfully

## Other responses

- `400` — Bad request - Invalid input
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Insufficient permissions
- `404` — Facility not found
- `500` — Internal server error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
