---
title: "Create or update custom scope"
method: POST
path: "/scope/update/custom"
tags: ["scopes"]
---

# Create or update custom scope

`POST /scope/update/custom`

Creates a new custom scan scope or updates an existing one with scan targets. Supply group_id for creation or scope_id for update. Requires ownership.

## Request body

- HandlersScopeCreateUpdateCustomRequest
  - `cycles` boolean — Whether to enable cyclic scanning
  - `cycles_retention` integer — Amount of scan cycles to keep. -1 to keep all. 0 not allowed.
  - `group_id` integer — Set if NEW scope shall be created
  - `name` string — Name of the scan scope
  - `ot` boolean — Whether this is an OT discovery scope
  - `scope_id` integer — Set if EXISTING scope shall be updated
  - `split_size` integer — Maximum amount of IPs per split scan target
  - `targets` ScopedbTDiscovery[] — List of scan targets to set
    - `enabled` boolean
    - `input` string
    - `input_comment` string — E.g. anything that helps
    - `input_company` string — E.g. company name, useful in a multi company network
    - `input_contact` string — E.g. the responsible administrator
    - `input_country` string — E.g. "DE"
    - `input_department` string — E.g. company department, e.g. IT Services
    - `input_location` string — E.g. "Munich"
    - `input_manager` string — E.g. the responsible manager
    - `input_network` string — Network the input address belongs to. Equals input if input is already a network range
    - `input_purpose` string — E.g. network description, like, "transfer network", "office space",...
    - `input_routing_domain` string — E.g. "Global", "local", "Intranet", "Internet",...
    - `input_zone` string — E.g. "Office", "Production A", "Printer",...
    - `lat` string
    - `lng` string
    - `postal_address` string
    - `priority` boolean
    - `scan_finished` SqlNullTime
      - `time` string
      - `valid` boolean — Valid is true if Time is not NULL
    - `scan_started` SqlNullTime
      - `time` string
      - `valid` boolean — Valid is true if Time is not NULL
    - `timezone` number — Float because timezones may be 11.5 in certain edge cases

## Response `200`

Scope created or updated

- HandlersScopeCreateUpdateCustomResponse
  - `warnings` string[] — List of warnings generated during target processing

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `503` — Service Unavailable

---

[API](https://skmtc.net/siemens/apis/large-scale-discovery-api.md) · [All operations](https://skmtc.net/siemens/apis/large-scale-discovery-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/siemens/large-scale-discovery-api/versions/cdce1f888ae3/schema)
