---
title: "Add Storage Zone"
method: POST
path: "/storagezone"
tags: ["Storage Zone"]
---

# Add Storage Zone

`POST /storagezone`

## Request body

- StorageZoneModelAdd
  - `Name` string, required — The name of the storage zone
  - `Region` string, required — The code of the main storage zone region (Possible values: DE, NY, LA, SG)
  - `ReplicationRegions` string[], nullable — The code of the main storage zone region (Possible values: DE, NY, LA, SG, SYD)
  - `ZoneTier` 0 | 1 — 0 = Standard 1 = Edge
  - `StorageZoneType` 0 | 1 — 0 = NotSupported 1 = Supported

## Response `201`

The storage zone that was added

- StorageZoneModel
  - `Id` integer — The ID of the storage zone
  - `UserId` string, nullable — The ID of the user that owns the storage zone
  - `Name` string, nullable — The name of the storage zone
  - `Password` string, nullable — The API access key or FTP password
  - `DateModified` string, date-time — The date when the zone was last modified
  - `Deleted` boolean — Determines if the zone was deleted or not
  - `StorageUsed` integer — The total amount of storage used by this zone
  - `FilesStored` integer — The total number of files stored by this zone
  - `Region` string, nullable — The main region used by the storage zone
  - `ReplicationRegions` string[], nullable — The replication regions enabled for this storage zone
  - `PullZones` PullZoneModel[], nullable — The list of pull zones connected to this storage zone
    - `Id` integer — The unique ID of the pull zone.
    - `Name` string, nullable — The name of the pull zone.
    - `OriginUrl` string, nullable — The origin URL of the pull zone where the files are fetched from.
    - `Enabled` boolean — True unless reached resource limits or account owning it ran out of funds.
    - `Suspended` boolean
    - `Hostnames` HostnameModel[], nullable — The list of hostnames linked to this Pull Zone
      - `Id` integer — The unique ID of the hostname
      - `Value` string, nullable — The hostname value for the domain name
      - `ForceSSL` boolean — Determines if the Force SSL feature is enabled
      - `IsSystemHostname` boolean — Determines if this is a system hostname controlled by bunny.net
      - `IsManagedHostname` boolean — Determines if this is a managed hostname controlled by bunny.net
      - `HasCertificate` boolean — Determines if the hostname has an SSL certificate configured
      - `Certificate` string, nullable — Contains the Base64Url encoded certificate for the hostname
      - `CertificateKey` string, nullable — Contains the Base64Url encoded certificate key for the hostname
      - `CertificateKeyType` 0 | 1 — 0 = Ecdsa 1 = Rsa
      - `CertificateProvisionType` 0 | 1 | 2 | 3 | 4 — 0 = Unknown 1 = Http01 2 = Dns01 3 = Custom 4 = Managed
    - `StorageZoneId` integer — The ID of the storage zone that the pull zone is linked to
    - `EdgeScriptId` integer — The ID of the edge script that the pull zone is linked to
    - `EdgeScriptExecutionPhase` 0 | 1 — 0 = Cache 1 = LoadBalancer
    - `MiddlewareScriptId` integer, nullable
    - `MagicContainersAppId` string, nullable — The ID of the Magic Container application the pull zone is linked to
    - `MagicContainersEndpointId` string, nullable — The ID of the Magic Container Endpoint the pull zone is linked to
    - `AllowedReferrers` string[], nullable — The list of referrer hostnames that are allowed to access the pull zone.Requests containing the header Referer: hostname that is not on the list will be rejected.If empty, all the referrers are allowed
    - `BlockedReferrers` string[], nullable — The list of referrer hostnames that are allowed to access the pull zone. Requests containing the header Referer: hostname that is not on the list will be rejected. If empty, all the referrers are allowed
    - `BlockedIps` string[], nullable — The list of IPs that are blocked from accessing the pull zone. Requests coming from the following IPs will be rejected. If empty, all the IPs will be allowed
    - `EnableGeoZoneUS` boolean — Determines if the delivery from the North American region is enabled for this pull zone
    - `EnableGeoZoneEU` boolean — Determines if the delivery from the European region is enabled for this pull zone
    - `EnableGeoZoneASIA` boolean — Determines if the delivery from the Asian / Oceanian region is enabled for this pull zone
    - `EnableGeoZoneSA` boolean — Determines if the delivery from the South American region is enabled for this pull zone
    - `EnableGeoZoneAF` boolean — Determines if the delivery from the Africa region is enabled for this pull zone
    - `IpFamilyPolicy` 0 | 1 | 2 | 3 — 0 = IPv4Only 1 = DualStack 2 = DualStackPreferIPv6 3 = IPv6Only
    - `ZoneSecurityEnabled` boolean — True if the URL secure token authentication security is enabled
    - `ZoneSecurityKey` string, nullable — The security key used for secure URL token authentication
    - `ZoneSecurityIncludeHashRemoteIP` boolean — True if the zone security hash should include the remote IP
    - `IgnoreQueryStrings` boolean — True if the Pull Zone is ignoring query strings when serving cached objects
    - `MonthlyBandwidthLimit` integer — The monthly limit of bandwidth in bytes that the pullzone is allowed to use
    - `MonthlyBandwidthUsed` integer — The amount of bandwidth in bytes that the pull zone used this month
    - `MonthlyCharges` number — The total monthly charges for this so zone so far
    - `AddHostHeader` boolean — Determines if the Pull Zone should forward the current hostname to the origin
    - `OriginHostHeader` string, nullable — Determines the host header that will be sent to the origin
    - `Type` 0 | 1 — 0 = Premium 1 = Volume
    - `AccessControlOriginHeaderExtensions` string[], nullable — The list of extensions that will return the CORS headers
    - `EnableAccessControlOriginHeader` boolean — Determines if the CORS headers should be enabled
    - `DisableCookies` boolean — Determines if the cookies are disabled for the pull zone
    - `BudgetRedirectedCountries` string[], nullable — The list of budget redirected countries with the two-letter Alpha2 ISO codes
    - `BlockedCountries` string[], nullable — The list of blocked countries with the two-letter Alpha2 ISO codes
    - `EnableOriginShield` boolean — If true the server will use the origin shield feature
    - `CacheControlMaxAgeOverride` integer — The override cache time for the pull zone
    - `CacheControlPublicMaxAgeOverride` integer — The override cache time for the pull zone for the end client
    - `BurstSize` integer — Excessive requests are delayed until their number exceeds the maximum burst size.
    - `RequestLimit` integer — Max number of requests per IP per second
    - `BlockRootPathAccess` boolean — If true, access to root path will return a 403 error
    - `BlockPostRequests` boolean — If true, POST requests to the zone will be blocked
    - `LimitRatePerSecond` number, double — The maximum rate at which the zone will transfer data in kb/s. 0 for unlimited
    - `LimitRateAfter` number, double — The amount of data after the rate limit will be activated
    - `ConnectionLimitPerIPCount` integer — The number of connections limited per IP for this zone
    - `PriceOverride` number — The custom price override for this zone. Unit is $/Byte.
    - `OptimizerPricing` number — Monthly pricing for Bunny Optimizer for this pull zone
    - `AddCanonicalHeader` boolean — Determines if the Add Canonical Header is enabled for this Pull Zone
    - `EnableLogging` boolean — Determines if the logging is enabled for this Pull Zone
    - `EnableCacheSlice` boolean — Determines if the cache slice (Optimize for video) feature is enabled for the Pull Zone
    - `EnableSmartCache` boolean — Determines if smart caching is enabled for this zone
    - `EdgeRules` EdgeRuleV2Model[], nullable — The list of edge rules on this Pull Zone
      - `Guid` string, nullable — The unique GUID of the edge rule
      - `ActionType` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 — 0 = ForceSSL 1 = Redirect 2 = OriginUrl 3 = OverrideCacheTime 4 = BlockRequest 5 = SetResponseHeader 6 = SetRequestHeader 7 = ForceDownload 8 = DisableTokenAuthentication 9 = EnableTokenAuthentication 10 = OverrideCacheTimePublic 11 = IgnoreQueryString 12 = DisableOptimizer 13 = ForceCompression 14 = SetStatusCode 15 = BypassPermaCache 16 = OverrideBrowserCacheTime 17 = OriginStorage 18 = SetNetworkRateLimit 19 = SetConnectionLimit 20 = SetRequestsPerSecondLimit 21 = RunEdgeScript 22 = OriginMagicContainers 23 = DisableWAF 24 = RetryOrigin 25 = OverrideBrowserCacheResponseHeader 26 = RemoveBrowserCacheResponseHeader 27 = DisableShieldChallenge 28 = DisableShield 29 = DisableShieldBotDetection 30 = BypassAwsS3Authentication 31 = DisableShieldAccessLists 32 = DisableShieldRateLimiting 33 = EnableRequestCoalescing 34 = DisableRequestCoalescing 37 = StripCookiesClientToOrigin
      - `ActionParameter1` string, nullable — The Action parameter 1. The value depends on other parameters of the edge rule.
      - `ActionParameter2` string, nullable — The Action parameter 2. The value depends on other parameters of the edge rule.
      - `ActionParameter3` string, nullable — The Action parameter 3. The value depends on other parameters of the edge rule.
      - `Triggers` Trigger[], nullable
        - `Type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 — 0 = Url 1 = RequestHeader 2 = ResponseHeader 3 = UrlExtension 4 = CountryCode 5 = RemoteIP 6 = UrlQueryString 7 = RandomChance 8 = StatusCode 9 = RequestMethod 10 = CookieValue 11 = CountryStateCode 12 = OriginRetryAttemptCount 13 = OriginConnectionError
        - `PatternMatches` string[], nullable — The list of pattern matches that will trigger the edge rule
        - `PatternMatchingType` 0 | 1 | 2 — 0 = MatchAny 1 = MatchAll 2 = MatchNone
        - `Parameter1` string, nullable — The trigger parameter 1. The value depends on the type of trigger.
      - `ExtraActions` EdgeRuleV2ActionModel[], nullable
        - `ActionType` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 — 0 = ForceSSL 1 = Redirect 2 = OriginUrl 3 = OverrideCacheTime 4 = BlockRequest 5 = SetResponseHeader 6 = SetRequestHeader 7 = ForceDownload 8 = DisableTokenAuthentication 9 = EnableTokenAuthentication 10 = OverrideCacheTimePublic 11 = IgnoreQueryString 12 = DisableOptimizer 13 = ForceCompression 14 = SetStatusCode 15 = BypassPermaCache 16 = OverrideBrowserCacheTime 17 = OriginStorage 18 = SetNetworkRateLimit 19 = SetConnectionLimit 20 = SetRequestsPerSecondLimit 21 = RunEdgeScript 22 = OriginMagicContainers 23 = DisableWAF 24 = RetryOrigin 25 = OverrideBrowserCacheResponseHeader 26 = RemoveBrowserCacheResponseHeader 27 = DisableShieldChallenge 28 = DisableShield 29 = DisableShieldBotDetection 30 = BypassAwsS3Authentication 31 = DisableShieldAccessLists 32 = DisableShieldRateLimiting 33 = EnableRequestCoalescing 34 = DisableRequestCoalescing 37 = StripCookiesClientToOrigin
        - `ActionParameter1` string, nullable
        - `ActionParameter2` string, nullable
        - `ActionParameter3` string, nullable
      - `TriggerMatchingType` 0 | 1 | 2 — 0 = MatchAny 1 = MatchAll 2 = MatchNone
      - `Description` string, nullable — The description of the edge rule
      - `Enabled` boolean — Determines if the edge rule is currently enabled or not
      - `OrderIndex` integer — The index of the edge rule in the list of execution priority
      - `ReadOnly` boolean — Determines if the edge rule is read-only and cannot be modified or deleted
    - `EnableWebPVary` boolean — Determines if the WebP Vary feature is enabled.
    - `EnableAvifVary` boolean — Determines if the AVIF Vary feature is enabled.
    - `EnableCountryCodeVary` boolean — Determines if the Country Code Vary feature is enabled.
    - `EnableCountryStateCodeVary` boolean — Determines if the Country State Code Vary feature should be enabled.
    - `EnableMobileVary` boolean — Determines if the Mobile Vary feature is enabled.
    - `EnableCookieVary` boolean — Determines if the Cookie Vary feature is enabled.
    - `CookieVaryParameters` string[], nullable — Contains the list of vary parameters that will be used for vary cache by cookie string. If empty, cookie vary will not be used.
    - `EnableHostnameVary` boolean — Determines if the Hostname Vary feature is enabled.
    - `CnameDomain` string, nullable — The CNAME domain of the pull zone for setting up custom hostnames
    - `AWSSigningEnabled` boolean — Determines if the AWS Signing is enabled
    - `AWSSigningKey` string, nullable — The AWS Signing region key
    - `AWSSigningSecret` string, nullable — The AWS Signing region secret
    - `AWSSigningRegionName` string, nullable — The AWS Signing region name
    - `LoggingIPAnonymizationEnabled` boolean — Determines if the TLS 1 is enabled on the Pull Zone
    - `EnableTLS1` boolean — Determines if the TLS 1 is enabled on the Pull Zone
    - `EnableTLS1_1` boolean — Determines if the TLS 1.1 is enabled on the Pull Zone
    - `VerifyOriginSSL` boolean — Determines if the Pull Zone should verify the origin SSL certificate
    - `ErrorPageEnableCustomCode` boolean — Determines if custom error page code should be enabled.
    - `ErrorPageCustomCode` string, nullable — Contains the custom error page code that will be returned
    - `ErrorPageEnableStatuspageWidget` boolean — Determines if the statuspage widget should be displayed on the error pages
    - `ErrorPageStatuspageCode` string, nullable — The statuspage code that will be used to build the status widget
    - `ErrorPageWhitelabel` boolean — Determines if the error pages should be whitelabel or not
    - `OriginShieldZoneCode` string, nullable — The zone code of the origin shield
    - `LogForwardingEnabled` boolean — Determines if the log forawrding is enabled
    - `LogForwardingHostname` string, nullable — The log forwarding hostname
    - `LogForwardingPort` integer — The log forwarding port
    - `LogForwardingToken` string, nullable — The log forwarding token value
    - `LogForwardingProtocol` 0 | 1 | 2 | 3 — 0 = UDP 1 = TCP 2 = TCPEncrypted 3 = DataDog
    - `LoggingSaveToStorage` boolean — Determines if the permanent logging feature is enabled
    - `LoggingStorageZoneId` integer — The ID of the logging storage zone that is configured for this Pull Zone
    - `FollowRedirects` boolean — Determines if the zone will follow origin redirects
    - `VideoLibraryId` integer — The ID of the video library that the zone is linked to
    - `DnsRecordId` integer — The ID of the DNS record tied to this pull zone
    - `DnsZoneId` integer — The ID of the DNS zone tied to this pull zone
    - `DnsRecordValue` string, nullable — The cached version of the DNS record value
    - `OptimizerEnabled` boolean — Determines if the optimizer should be enabled for this zone
    - `OptimizerTunnelEnabled` boolean — Determines if the optimizer origin tunnel system is enabled for this zone
    - `OptimizerDesktopMaxWidth` integer — Determines the maximum automatic image size for desktop clients
    - `OptimizerMobileMaxWidth` integer — Determines the maximum automatic image size for mobile clients
    - `OptimizerImageQuality` integer — Determines the image quality for desktop clients
    - `OptimizerMobileImageQuality` integer — Determines the image quality for mobile clients
    - `OptimizerEnableWebP` boolean — Determines if the WebP optimization should be enabled
    - `OptimizerPrerenderHtml` boolean — Determines if the SEO HTML prerender is enabled
    - `OptimizerEnableManipulationEngine` boolean — Determines the image manipulation should be enabled
    - `OptimizerMinifyCSS` boolean — Determines if the CSS minifcation should be enabled
    - `OptimizerMinifyJavaScript` boolean — Determines if the JavaScript minifcation should be enabled
    - `OptimizerWatermarkEnabled` boolean — Determines if image watermarking should be enabled
    - `OptimizerWatermarkUrl` string, nullable — Sets the URL of the watermark image
    - `OptimizerWatermarkPosition` 0 | 1 | 2 | 3 | 4 | 5 — 0 = BottomLeft 1 = BottomRight 2 = TopLeft 3 = TopRight 4 = Center 5 = CenterStretch
    - `OptimizerWatermarkOffset` number, double — Sets the offset of the watermark image
    - `OptimizerWatermarkMinImageSize` integer — Sets the minimum image size to which the watermark will be added
    - `OptimizerAutomaticOptimizationEnabled` boolean — Determines if the automatic image optimization should be enabled
    - `PermaCacheStorageZoneId` integer — The IP of the storage zone used for Perma-Cache
    - `PermaCacheType` 0 | 1 — 0 = Automatic 1 = Manual
    - `OriginRetries` integer — The number of retries to the origin server
    - `OriginConnectTimeout` integer — The amount of seconds to wait when connecting to the origin. Otherwise the request will fail or retry.
    - `OriginResponseTimeout` integer — The amount of seconds to wait when waiting for the origin reply. Otherwise the request will fail or retry.
    - `UseStaleWhileUpdating` boolean — Determines if we should use stale cache while cache is updating
    - `UseStaleWhileOffline` boolean — Determines if we should use stale cache while the origin is offline
    - `OriginRetry5XXResponses` boolean — Determines if we should retry the request in case of a 5XX response.
    - `OriginRetryConnectionTimeout` boolean — Determines if we should retry the request in case of a connection timeout.
    - `OriginRetryResponseTimeout` boolean — Determines if we should retry the request in case of a response timeout.
    - `OriginRetryDelay` integer — Determines the amount of time that the CDN should wait before retrying an origin request.
    - `QueryStringVaryParameters` string[], nullable — Contains the list of vary parameters that will be used for vary cache by query string. If empty, all parameters will be used to construct the key
    - `OriginShieldEnableConcurrencyLimit` boolean — Determines if the origin shield concurrency limit is enabled.
    - `OriginShieldMaxConcurrentRequests` integer — Determines the number of maximum concurrent requests allowed to the origin.
    - `EnableSafeHop` boolean
    - `CacheErrorResponses` boolean — Determines if bunny.net should be caching error responses
    - `OriginShieldQueueMaxWaitTime` integer — Determines the max queue wait time
    - `OriginShieldMaxQueuedRequests` integer — Determines the max number of origin requests that will remain in the queu
    - `OptimizerClasses` OptimizerClassModel[], nullable — Contains the list of optimizer classes
      - `Name` string, nullable
      - `Properties` object, nullable
    - `OptimizerForceClasses` boolean — Determines if the optimizer class list should be enforced
    - `OptimizerStaticHtmlEnabled` boolean — Determines whether optimizer static html feature enabled
    - `OptimizerStaticHtmlWordPressPath` string, nullable — Wordpress html path which should be bypassed by permacache in edge rule
    - `OptimizerStaticHtmlWordPressBypassCookie` string, nullable — Wordpress cookie which should be bypassed by permacache in edge rule
    - `UseBackgroundUpdate` boolean — Determines if cache update is performed in the background.
    - `EnableAutoSSL` boolean — If set to true, any hostnames added to this Pull Zone will automatically enable SSL.
    - `EnableQueryStringOrdering` boolean — If set to true the query string ordering property is enabled.
    - `LogAnonymizationType` 0 | 1 — 0 = OneDigit 1 = Drop
    - `LogFormat` 0 | 1 — 0 = Plain 1 = JSON
    - `LogForwardingFormat` 0 | 1 — 0 = Plain 1 = JSON
    - `ShieldDDosProtectionType` 0 | 1 | 2 — 0 = DetectOnly 1 = ActiveStandard 2 = ActiveAggressive
    - `ShieldDDosProtectionEnabled` boolean
    - `OriginType` 0 | 1 | 2 | 3 | 4 | 5 | 6 — 0 = OriginUrl 1 = DnsAccelerate 2 = StorageZone 3 = LoadBalancer 4 = EdgeScript 5 = MagicContainers 6 = PushZone
    - `EnableRequestCoalescing` boolean — Determines if request coalescing is currently enabled.
    - `RequestCoalescingTimeout` integer — Determines the lock time for coalesced requests.
    - `OriginLinkValue` string, nullable — Returns the link short preview value for the pull zone origin connection.
    - `DisableLetsEncrypt` boolean — If true, the built-in let's encrypt is disabled and requests are passed to the origin.
    - `EnableBunnyImageAi` boolean
    - `BunnyAiImageBlueprints` BunnyAiImageBlueprintModel[], nullable
      - `Name` string, nullable
      - `Properties` object, nullable
    - `PreloadingScreenEnabled` boolean — Determines if the preloading screen is currently enabled
    - `PreloadingScreenShowOnFirstVisit` boolean — Determines if the preloading screen is shown on the first load from a user.
    - `PreloadingScreenCode` string, nullable — The custom preloading screen code
    - `PreloadingScreenLogoUrl` string, nullable — The preloading screen logo URL
    - `PreloadingScreenCodeEnabled` boolean — Determines if the custom preloader screen is enabled
    - `PreloadingScreenTheme` 0 | 1 — 0 = Light 1 = Dark
    - `PreloadingScreenDelay` integer — The delay in miliseconds after which the preloading screen will be desplayed
    - `EUUSDiscount` integer — The Pull Zone specific pricing discount for EU and US region.
    - `SouthAmericaDiscount` integer — The Pull Zone specific pricing discount for South America region.
    - `AfricaDiscount` integer — The Pull Zone specific pricing discount for Africa region.
    - `AsiaOceaniaDiscount` integer — The Pull Zone specific pricing discount for Asia & Oceania region.
    - `RoutingFilters` string[], nullable — The list of routing filters enabled for this zone
    - `BlockNoneReferrer` boolean — Determines if direct access to files will be blocked if not coming from allowed referrers
    - `StickySessionType` 0 | 1 — 0 = Off 1 = On
    - `StickySessionCookieName` string, nullable — Sticky Session Cookie Name
    - `StickySessionClientHeaders` string, nullable — A set of comma-separated header names used to identify clients
    - `UserId` string, nullable — User Id of the pull zone owner
    - `CacheVersion` integer
    - `OptimizerEnableUpscaling` boolean — Determines if Optimizer is allowed to upscale images
    - `EnableWebSockets` boolean — Determines if WebSocket connections are allowed for this Pull Zone.
    - `MaxWebSocketConnections` integer — The maximum global simultaneous WebSocket connections allowed for this Pull Zone.
    - `EnableExtendedLogging` boolean — Determines if extended logging with additional details is enabled for this Pull Zone.
    - `CacheKeyHeaders` string, nullable — Vary Cache by Request Headers (comma delimited)
  - `ReadOnlyPassword` string, nullable — The read-only API access key or FTP password
  - `Rewrite404To200` boolean — Determines if the storage zone will rewrite 404 status codes to 200 status codes
  - `Custom404FilePath` string, nullable — The custom 404 error path that will be returned in case of a missing file.
  - `StorageHostname` string, nullable — Determines the storage hostname for this zone
  - `S3Hostname` string, nullable — Determines the S3 compatible hostname for this zone
  - `ZoneTier` 0 | 1 — 0 = Standard 1 = Edge
  - `ReplicationChangeInProgress` boolean — Determines if the storage zone is currently enabling a new replication region
  - `PriceOverride` number — The custom price override for this zone. Unit is $/TB/month.
  - `Discount` integer — The Storage Zone specific pricing discount.
  - `StorageZoneType` 0 | 1 — 0 = NotSupported 1 = Supported

## Other responses

- `400` — Failed adding the Storage Zone. Model validation failed
- `401` — The request authorization failed
- `500` — Internal Server Error

---

[API](https://skmtc.net/bunny/apis/bunny-net-cdn-logging.md) · [All operations](https://skmtc.net/bunny/apis/bunny-net-cdn-logging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bunny/bunny-net-cdn-logging/versions/9e622620664b/schema)
