# Create a regional network zone (/docs/apis/management/network-zones/CreateRegionalNetworkZone)

`POST /network_zones/regional`

Creates a new regional network zone containing countries that can be referenced by policies to allow or restrict access. Access to this endpoint requires an active ScaleX subscription.

Base URL: `https://{tenant}.{region}.monocloud.com/api`, where `{tenant}`, `{region}` (one of us, eu, in) come from your tenant. Authentication: send your Management API key in the `X-API-KEY` header.

## Request body

JSON, required. The request payload used to create the regional network zone.

- `enabled` (boolean, default true) Indicates whether the zone is enabled.
- `name` (string, required) Human-readable name for the zone.
- `description` (string) Description that explains the zone.
- `category` (string, required) The category the zone belongs to. One of: `trusted`, `blocked`.
- `operator` (string, required) The evaluation operator for the network zone. One of: `in`, `not_in`.
- `countries` (string[], default []) List of 3166-1 alpha-2 country codes.

## Response body

`201`, JSON. The regional network zone was created successfully

Returns `RegionalNetworkZone`.

- `id` (string, required) The unique identifier of the network zone.
- `enabled` (boolean, required) Indicates whether the zone is enabled.
- `name` (string, required) Human-readable name for the zone.
- `description` (string) Description that explains the zone.
- `category` (string, required) The category the zone belongs to. One of: `trusted`, `blocked`.
- `creation_time` (integer, required, date-time) Specifies the creation time of the zone (in Epoch).
- `last_updated` (integer, required, date-time) Specifies the last update time of the zone (in Epoch).
- `operator` (string, required) The evaluation operator for the network zone. One of: `in`, `not_in`.
- `type` (string, required) One of: `regional`.
- `countries` (string[], required) List of 3166-1 alpha-2 country codes.

## Errors

- `400` Bad Request
  - `type` (string, required) A URI reference that identifies the error type. When accessed, it may provide human-readable documentation.
  - `title` (string, required) A short, human-readable summary of the error.
  - `status` (integer, required, int32) The HTTP status code associated with this error response.
  - `trace_id` (string, required) A unique identifier for the request, used for tracing and diagnostics.
  - `detail` (string) A human-readable explanation specific to this occurrence of the error.
  - `instance` (string) A URI reference that identifies the specific occurrence of the error.
- `401` Unauthorized
- `402` Payment Required
  Same body as `400`.
- `403` Forbidden
- `422` Unprocessable Entity
  - `type` (string, required) A URI reference that identifies the error type. When accessed, it may provide human-readable documentation.
  - `title` (string, required) A short, human-readable summary of the error.
  - `status` (integer, required, int32) The HTTP status code associated with this error response.
  - `trace_id` (string, required) A unique identifier for the request, used for tracing and diagnostics.
  - `detail` (string) A human-readable explanation specific to this occurrence of the error.
  - `instance` (string) A URI reference that identifies the specific occurrence of the error.
  - `errors` (Record<string, string[]>, required) A key-value map of validation errors, where each key represents a request field and the value contains one or more messages describing why the request could not be processed.

## Example (MonoCloud .NET SDK)

```csharp
using MonoCloud.Management;
using MonoCloud.Management.Models;
using MonoCloud.Management.Core.Base;

var apiClient = new MonoCloudManagementClient(new MonoCloudConfig("<your-domain>", "[[API-Key]]"));


var requestBody = new CreateRegionalNetworkZoneRequest
  {
    Enabled = true,
    Name = "Designation",
    Description = "Location of the Company Headquarters",
    Category = NetworkZoneCategory.Trusted,
    Operator = NetworkZoneOperator.NotIn,
    Countries = new List<string>
    {
      "US",
      "GB",
    },
  };


var result = await apiClient.NetworkZones.CreateRegionalNetworkZoneAsync(requestBody);
```

## Example (MonoCloud Javascript SDK)

```javascript
import { MonoCloudManagementClient } from '@monocloud/management';

const apiClient = MonoCloudManagementClient.init({ domain: '<your-domain>', apiKey: '[[API-Key]]' });

const requestBody = {
  enabled: true,
  name: 'Designation',
  description: 'Location of the Company Headquarters',
  category: 'trusted',
  operator: 'not_in',
  countries: [
    'US',
    'GB'
  ]
};

const result = apiClient.networkZones.createRegionalNetworkZone(requestBody);
```