---
title: "Update Camera Zones"
method: PUT
path: "/cameras/{camera_id}/zones"
tags: ["cameras"]
---

# Update Camera Zones

`PUT /cameras/{camera_id}/zones`

## Request

- Base URL: `https://api.verdun.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.verdun.ai/cameras/{camera_id}/zones`
- Auth: HTTP bearer

## Path parameters

- `camera_id` string, required

## Request body

- UpdateCameraZonesRequest
  - `zones` IgnoreZoneInput[], required: Full set of ignore zones for the camera. Replaces any existing zones.
    - `name` string, required: Human-readable name of the zone.
    - `points` IgnoreZonePoint[], required: Polygon vertices as percentages of the frame. Minimum 3 points.
      - `x` number, required: X coordinate as a percentage (0-100) of the frame width.
      - `y` number, required: Y coordinate as a percentage (0-100) of the frame height.
    - `rag_context` string, nullable: Optional context passed to the AI pipeline for this zone.
    - `ignore` boolean: Whether detections inside this zone are ignored.
  - `expected_revision` string, nullable: Revision returned by GET zones (it covers the zone rows and the camera's display rotation). When supplied, replacement is atomic and returns 409 if the zones or the rotation changed. Omit only for legacy clients; a camera with a non-zero display rotation returns 409 when it is omitted.

## Response `200`

Successful Response

- UpdateCameraZonesResponse
  - `zones` IgnoreZoneModel[], required: The persisted ignore zones after the replace.
    - `name` string, required: Human-readable name of the zone.
    - `points` IgnoreZonePoint[], required: Polygon vertices as percentages of the frame. Minimum 3 points.
      - `x` number, required: X coordinate as a percentage (0-100) of the frame width.
      - `y` number, required: Y coordinate as a percentage (0-100) of the frame height.
    - `rag_context` string, nullable: Optional context passed to the AI pipeline for this zone.
    - `ignore` boolean: Whether detections inside this zone are ignored.
    - `id` string, uuid, required: The zone ID.
    - `camera_id` string, uuid, required: The camera this zone belongs to.
  - `revision` string, required: Opaque revision of the persisted zones for the next conditional replacement.
  - `display_rotation` integer: The camera's display rotation (degrees CCW, 0 or 180) the saved zone points are expressed against: percent of the frame in the rotated (upright) space.

## Other responses

- `422`: Validation Error

---

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