---
title: "Set Warehouse Protection"
method: POST
path: "/management/v1/warehouse/{warehouse_id}/protection"
tags: ["warehouse"]
---

# Set Warehouse Protection

`POST /management/v1/warehouse/{warehouse_id}/protection`

## Request

- Base URL: `https://localhost`
- URL: `https://localhost/management/v1/warehouse/{warehouse_id}/protection`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/docs/management/v1/warehouse/:warehouse_id/protection/post.ts> (a function with typed inputs; its response is checked against the schema)

Configures whether a warehouse should be protected from deletion.

## Path parameters

- `warehouse_id` string, uuid, required

## Request body

- SetProtectionRequest
  - `protected` boolean, required: Setting this to `true` will prevent the entity from being deleted unless `force` is used.

## Response `200`

Warehouse protection set successfully

- ProtectionResponse
  - `protected` boolean, required: Indicates whether the entity is protected
  - `updated_at` string, date-time, nullable: Updated at

## Other responses

- `4XX`

---

[API](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api.md) - [All operations](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/revisions/c5cb9a12a98c?raw)
