---
title: "Update scan mode"
method: PUT
path: "/api/scan-modes/{scanModeId}"
tags: ["Scan Modes"]
---

# Update scan mode

`PUT /api/scan-modes/{scanModeId}`

Updates an existing scan mode with new configuration

## Path parameters

- `scanModeId` string, required

## Request body

- ScanModeCommandDTO — Command DTO for creating or updating a scan mode. Used as the request body for scan mode creation/update endpoints.
  - `name` string, required — The name of the scan mode.
  - `description` string, required — A description of the scan mode's purpose or behavior.
  - `type` 'cron' | 'interval', required — How a scan mode decides when to tick. - `cron`: driven by a cron expression (the historical behaviour). - `interval`: driven by a fixed period between ticks.
  - `cron` string, required — A cron expression defining the scan schedule. Ignored when `type` is `"interval"`.
  - `interval` ScanModeInterval, required — Fixed period between two ticks of an `interval` scan mode.
    - `value` number, double, required — How many `unit`s between two ticks.
    - `unit` 'ms' | 's' | 'min' | 'hour', required
  - `activationWindow` ActivationWindow, required — Optional gate applied on top of the schedule. A tick only fires when it satisfies every configured criterion; the two criteria below are combined with AND. A tick falling outside the window is skipped silently — it is never queued or deferred.
    - `dateRange` ActivationWindowDateRange — Absolute bounds of an activation window. Each side is independently optional: an absent bound means the window is open-ended on that side.
      - `start` string — Represents an instant in time as an ISO 8601 string.
      - `end` string — Represents an instant in time as an ISO 8601 string.
    - `recurring` ActivationWindowRecurring — A civil-time recurrence rule. Unlike the date range, this is not a pair of instants: "Thursday 12:00" shifts by an hour across DST transitions, so the rule carries the IANA timezone it is expressed in and is re-derived at every evaluation.
      - `timezone` string, required — Represents a timezone as an IANA timezone string.
      - `daysOfWeek` number[], nullable — Days on which the window is active, 0 = Sunday … 6 = Saturday. Absent or empty means every day.
      - `timeOfDay` ActivationWindowTimeOfDay — Local time-of-day bounds. `start` is inclusive, `end` is exclusive. When `end` is earlier than `start` the window is overnight and spans into the following day.
        - `start` string, required — Represents a local time as an ISO time string (HH:MM:SS).
        - `end` string, required — Represents a local time as an ISO time string (HH:MM:SS).

## Response `204`

Scan mode updated successfully

## Changes

- **2026-08-03** `8ee92ea35845` — 3 breaking
  - added the new required request property `activationWindow`
  - added the new required request property `interval`
  - added the new required request property `type`
- **2026-07-28** `9a6250881fa7` — 3 warning
  - removed the request property `activationWindow`
  - removed the request property `interval`
  - removed the request property `type`
- **2026-07-28** `6c9a9144ca23` — 3 breaking
  - added the new required request property `activationWindow`
  - added the new required request property `interval`
  - added the new required request property `type`
- **2026-07-15** `57cbe043ec5a` — 3 warning
  - removed the request property `activationWindow`
  - removed the request property `interval`
  - removed the request property `type`
- **2026-07-13** `ba5968e91bb6` — 3 breaking
  - added the new required request property `activationWindow`
  - added the new required request property `interval`
  - added the new required request property `type`

[Change history](https://skmtc.dev/optimistiksas/apis/oibus-api/changes/api/scan-modes/:scanModeId/put.md)

---

[API](https://skmtc.dev/optimistiksas/apis/oibus-api.md) · [All operations](https://skmtc.dev/optimistiksas/apis/oibus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimistiksas/oibus-api/revisions/e0f7301d351f/schema)
