---
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.
  - `createdBy` UserInfo, required — Represents the user who performed an action, with a computed display name.
    - `id` string, required — The unique identifier of the user.
    - `friendlyName` string, required — A human-readable display name for the user. "OIAnalytics" for the oianalytics system user, "Admin" for the admin login, or "Firstname Lastname (login)" for regular users.
  - `updatedBy` UserInfo, required — Represents the user who performed an action, with a computed display name.
    - `id` string, required — The unique identifier of the user.
    - `friendlyName` string, required — A human-readable display name for the user. "OIAnalytics" for the oianalytics system user, "Admin" for the admin login, or "Firstname Lastname (login)" for regular users.
  - `createdAt` string, required — Represents an instant in time as an ISO 8601 string.
  - `updatedAt` string, required — 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.

---

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