---
title: "Create scan mode"
method: POST
path: "/api/scan-modes"
tags: ["Scan Modes"]
---

# Create scan mode

`POST /api/scan-modes`

Creates a new scan mode with the provided configuration

## 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.
  - `cron` string, required — A cron expression defining the scan schedule.

## Response `201`

Scan mode created successfully

- ScanModeDTO — Data Transfer Object for a scan mode. Represents a configured scan mode with its metadata and schedule.
  - `id` string, required — The unique identifier of the entity.
  - `creationDate` string — Represents an instant in time as an ISO 8601 string.
  - `lastEditInstant` string — Represents an instant in time as an ISO 8601 string.
  - `name` string, required — The name of the scan mode.
  - `description` string, required — A description of the scan mode's purpose or behavior.
  - `cron` string, required — A cron expression defining the scan schedule.

## Changes

- **2026-03-20** `108013c94629` — 4 breaking, 2 info
  - removed the required property `createdAt` from the response with the `201` status
  - removed the required property `createdBy` from the response with the `201` status
  - removed the required property `updatedAt` from the response with the `201` status
  - removed the required property `updatedBy` from the response with the `201` status
  - …2 more
- **2026-03-19** `fb56929c0675` — 2 warning, 4 info
  - removed the optional property `creationDate` from the response with the `201` status
  - removed the optional property `lastEditInstant` from the response with the `201` status
  - added the required property `createdAt` to the response with the `201` status
  - added the required property `createdBy` to the response with the `201` status
  - …2 more
- **2026-03-18** `d6e364e3cd4e` — 4 breaking, 2 info
  - removed the required property `createdAt` from the response with the `201` status
  - removed the required property `createdBy` from the response with the `201` status
  - removed the required property `updatedAt` from the response with the `201` status
  - removed the required property `updatedBy` from the response with the `201` status
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/optimistiksas/apis/oibus-api/changes/api/scan-modes/post.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/72d4ce6fdf36/schema)
