---
title: "Update Storage Zone"
method: POST
path: "/storagezone/{id}"
tags: ["Storage Zone"]
---

# Update Storage Zone

`POST /storagezone/{id}`

## Request

- Base URL: `https://api.bunny.net`
- URL: `https://api.bunny.net/storagezone/{id}`
- Auth: API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/bunny-net-api/docs/storagezone/:id/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` integer, required

## Request body

- StorageZoneSettingsModel
  - `ReplicationZones` string[], nullable: The list of replication zones enabld for the storage zone
  - `OriginUrl` string, nullable: The origin URL of the storage zone
  - `Custom404FilePath` string, nullable: The path to the custom file that will be returned in a case of 404
  - `Rewrite404To200` boolean, nullable: Rewrite 404 status code to 200 for URLs without extension

## Response `204`

The storage zone was successfully updated

## Other responses

- `400`: Failed configuring the Storage Zone. Model validation failed
- `401`: The request authorization failed
- `404`: The Storage Zone with the requested ID does not exist
- `500`: Internal Server Error

---

[API](https://skmtc.dev/bunny/apis/bunny-net-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-net-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-net-api/revisions/2b06f94dbfbf?raw)
