---
title: "Upsert multiple zone restrictions"
method: POST
path: "/v1/zone-restrictions/upsert"
tags: ["Zones"]
---

# Upsert multiple zone restrictions

`POST /v1/zone-restrictions/upsert`

## Request

- Base URL: `https://api.sandbox.usenash.com`
- URL: `https://api.sandbox.usenash.com/v1/zone-restrictions/upsert`
- Auth: none declared

Create or update multiple zone restrictions in a single request. Existing restrictions are matched by ID for updates.

## Request body

- UpsertZoneRestrictionsInputSerializer: Expected input payload for upserting multiple zone restrictions.
  - `zoneRestrictions` UpsertZoneRestrictionInputSerializer[], required
    - `externalId` string, nullable: The external id of the zone restriction.
    - `name` string, required: The name of the zone restriction.
    - `isActive` boolean, nullable: Whether the zone restriction is active.
    - `restrictionMetadata` object, nullable: The metadata of the zone restriction.

## Response `200`

OK

- ListZoneRestrictionsResponse: Response for list zone restrictions.
  - `zoneRestrictions` ZoneRestrictionResponse[], required
    - `id` string, required: The ID of the zone restriction.
    - `externalId` string, required: The external ID of the zone restriction.
    - `name` string, required: The name of the zone restriction.
    - `isActive` boolean, required: Whether the zone restriction is active.
    - `restrictionMetadata` object, nullable, required: The metadata of the zone restriction.

## Other responses

- `422`: Unprocessable Content

---

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