---
title: "Sites"
method: POST
path: "/api/3/sites"
tags: ["Site"]
---

# Sites

`POST /api/3/sites`

Creates a new site with the specified configuration.

## Request body

- SiteCreateResource — Resource for creating a site configuration.
  - `description` string — The site's description.
  - `engineId` integer — The identifier of a scan engine. Default scan engine is selected when not specified.
  - `importance` 'very_low' | 'low' | 'normal' | 'high' | 'very_high' — The site importance. Defaults to `"normal"` if not specified.
  - `links` Link[], required — Hypermedia links to corresponding or related resources.
    - `deprecation` string
    - `href` string — A hypertext reference, which is either a URI (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>) or URI template (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>).
    - `hreflang` string
    - `media` string
    - `rel` string — The link relation type. This value is one from the <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc5988#section-6.2">Link Relation Type Registry</a> or is the type of resource being linked to.
    - `title` string
    - `type` string
  - `name` string, required — The site name. Name must be unique.
  - `scan` ScanScope — Defines the scope of scan targets for the site, which can be addresses, or asset groups, for static sites and a discovery configuration for dynamic sites. Only one property must be set by the user when saving a site.
    - `assets` StaticSite — Specify assets to be included in site scans as well as assets to be excluded from site scans. If the property is defined, then at least one address or asset group must be specified for scanning. Property is required when creating a static site.
      - `excludedAssetGroups` ExcludedAssetGroups — Assets associated with these asset groups will be excluded from the site's scan.
        - `assetGroupIDs` object[] — List of asset group identifiers. Each element is an integer.
        - `links` Link[], required — Hypermedia links to corresponding or related resources.
          - `deprecation` string
          - `href` string — A hypertext reference, which is either a URI (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>) or URI template (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>).
          - `hreflang` string
          - `media` string
          - `rel` string — The link relation type. This value is one from the <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc5988#section-6.2">Link Relation Type Registry</a> or is the type of resource being linked to.
          - `title` string
          - `type` string
      - `excludedTargets` ExcludedScanTargets — Addresses to be excluded from the site's scan. Each address is a string that can represent either a hostname, ipv4 address, ipv4 address range, ipv6 address, or CIDR notation.
        - `addresses` string[] — List of addresses. Each address is a string that can represent either a hostname, ipv4 address, ipv4 address range, ipv6 address, or CIDR notation.
        - `links` Link[], required — Hypermedia links to corresponding or related resources.
          - `deprecation` string
          - `href` string — A hypertext reference, which is either a URI (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>) or URI template (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>).
          - `hreflang` string
          - `media` string
          - `rel` string — The link relation type. This value is one from the <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc5988#section-6.2">Link Relation Type Registry</a> or is the type of resource being linked to.
          - `title` string
          - `type` string
      - `includedAssetGroups` IncludedAssetGroups — Assets associated with these asset groups will be included in the site's scan.
        - `assetGroupIDs` object[] — List of asset group identifiers. Each element is an integer.
        - `links` Link[], required — Hypermedia links to corresponding or related resources.
          - `deprecation` string
          - `href` string — A hypertext reference, which is either a URI (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>) or URI template (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>).
          - `hreflang` string
          - `media` string
          - `rel` string — The link relation type. This value is one from the <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc5988#section-6.2">Link Relation Type Registry</a> or is the type of resource being linked to.
          - `title` string
          - `type` string
      - `includedTargets` IncludedScanTargets — Addresses to be included in the site's scan. At least one address must be specified in a static site. Each address is a string that can represent either a hostname, ipv4 address, ipv4 address range, ipv6 address, or CIDR notation.
        - `addresses` string[] — List of addresses. Each address is a string that can represent either a hostname, ipv4 address, ipv4 address range, ipv6 address, or CIDR notation.
        - `links` Link[], required — Hypermedia links to corresponding or related resources.
          - `deprecation` string
          - `href` string — A hypertext reference, which is either a URI (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>) or URI template (see <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>).
          - `hreflang` string
          - `media` string
          - `rel` string — The link relation type. This value is one from the <a target="_blank" rel="noopener noreferrer" href="https://tools.ietf.org/html/rfc5988#section-6.2">Link Relation Type Registry</a> or is the type of resource being linked to.
          - `title` string
          - `type` string
    - `connection` DynamicSite — Specify discovery connection settings for a dynamic site. Property is required when creating a dynamic site.
      - `id` integer, required — The identifier of the discovery connection.
  - `scanTemplateId` string — The identifier of a scan template. Default scan template is selected when not specified.

## Response `201`

Created

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/rapid7/apis/rapid7-vm-api.md) · [All operations](https://skmtc.net/rapid7/apis/rapid7-vm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapid7/rapid7-vm-api/versions/3a8197c22d71/schema)
