---
title: "Create a zone set"
method: POST
path: "/v1/vehicles/{vehicleId}/zone-sets/{name}"
tags: ["Zone Set Management"]
---

# Create a zone set

`POST /v1/vehicles/{vehicleId}/zone-sets/{name}`

## Request

- Base URL: `https://api.polymathrobotics.dev`
- URL: `https://api.polymathrobotics.dev/v1/vehicles/{vehicleId}/zone-sets/{name}`
- Auth: HTTP bearer

Creates a new zone set. Validated and written as a single whole artifact.

## Path parameters

- `vehicleId` string, required
- `name` string, required

## Request body

- WriteZoneSetRequest: Base for request bodies: unknown fields are rejected instead of silently dropped.
  - `zones` ZoneInfo[], required: List of zones that make up the set.
    - `name` string, required: Name of the zone, unique within the set.
    - `type` 'speed_limit' | 'geofence' | 'keep_out' | 'stop_zone' | 'flag_zone', required: An enumeration.
    - `enabled` boolean: Whether the zone is enabled. Sent on write; returned on a stored read. Not the loaded-set runtime state.
    - `coordinate_system` 0 | 1: An enumeration.
    - `wgs84_polygon` ZoneGeoPoint[]: Boundary vertices in WGS84. Required when coordinate_system is WGS84.
      - `latitude` number, required: Latitude
      - `longitude` number, required: Longitude
    - `map_polygon` MapPoint[]: Boundary vertices in the map frame. Required when coordinate_system is MAP.
      - `x` number, required: X position in the map frame (meters).
      - `y` number, required: Y position in the map frame (meters).
    - `condition` ZoneConditionInfo: Base for request bodies: unknown fields are rejected instead of silently dropped.
      - `type` 0: An enumeration.
      - `params` KeyValuePair[]: Condition parameters.
        - `key` string, required
        - `value` string, required
    - `params` KeyValuePair[]: Zone parameters.
      - `key` string, required
      - `value` string, required
    - `state` 0 | 1 | 2 | 3: An enumeration.

## Response `201`

Successful Response

- WriteZoneSetResponse
  - `status` 'success', required: JSend status.
  - `message` string, required: Human-readable message, propagated from the ROS service.

## Other responses

- `400`: Zone set failed server-side validation
- `409`: A zone set with this name already exists
- `422`: Request body failed validation
- `500`: Internal server error

## Changes

- **2026-11-03** `3b5ff2f21338`: 1 info
  - added the new `flag_zone` enum value to the request property `zones/items/type/allOf[subschema #1: ZoneType]/`
- **2026-10-09** `ef34405d1b54`: 1 info
  - added the new `stop_zone` enum value to the request property `zones/items/type/allOf[subschema #1: ZoneType]/`
- **2026-09-09** `7bb062ddb622`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/polymathrobotics/apis/polymath-api/changes/v1/vehicles/:vehicleId/zone-sets/:name/post.md)

---

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