---
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-01-06** `d8e7a58e006a` — 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

[Change 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/e0febbaacdc7/schema)
