---
title: "Create Scanning Group"
method: POST
path: "/api/v2/sensitive-data-scanner/config/groups"
tags: ["Sensitive Data Scanner"]
---

# Create Scanning Group

`POST /api/v2/sensitive-data-scanner/config/groups`

Create a scanning group.
The request MAY include a configuration relationship.
A rules relationship can be omitted entirely, but if it is included it MUST be
null or an empty array (rules cannot be created at the same time).
The new group will be ordered last within the configuration.

## Request body

- SensitiveDataScannerGroupCreateRequest — Create group request.
  - `data` SensitiveDataScannerGroupCreate — Data related to the creation of a group.
    - `attributes` SensitiveDataScannerGroupAttributes, required — Attributes of the Sensitive Data Scanner group.
      - `description` string — Description of the group.
      - `filter` SensitiveDataScannerFilter — Filter for the Scanning Group.
        - `query` string — Query to filter the events.
      - `is_enabled` boolean — Whether or not the group is enabled.
      - `name` string — Name of the group.
      - `product_list` SensitiveDataScannerProduct[] — List of products the scanning group applies.
      - `samplings` SensitiveDataScannerSamplings[] — List of sampling rates per product type.
        - `product` 'logs' | 'rum' | 'events' | 'apm' — Datadog product onto which Sensitive Data Scanner can be activated.
        - `rate` number, double — Rate at which data in product type will be scanned, as a percentage.
    - `relationships` SensitiveDataScannerGroupRelationships — Relationships of the group.
      - `configuration` SensitiveDataScannerConfigurationData — A Sensitive Data Scanner configuration data.
        - `data` SensitiveDataScannerConfiguration — A Sensitive Data Scanner configuration.
          - `id` string — ID of the configuration.
          - `type` 'sensitive_data_scanner_configuration' — Sensitive Data Scanner configuration type.
      - `rules` SensitiveDataScannerRuleData — Rules included in the group.
        - `data` SensitiveDataScannerRule[] — Rules included in the group. The order is important.
          - `id` string — ID of the rule.
          - `type` 'sensitive_data_scanner_rule' — Sensitive Data Scanner rule type.
    - `type` 'sensitive_data_scanner_group', required — Sensitive Data Scanner group type.
  - `meta` SensitiveDataScannerMetaVersionOnly — Meta payload containing information about the API.
    - `version` integer — Version of the API (optional).

## Response `201`

OK

- SensitiveDataScannerCreateGroupResponse — Create group response.
  - `data` SensitiveDataScannerGroupResponse — Response data related to the creation of a group.
    - `attributes` SensitiveDataScannerGroupAttributes — Attributes of the Sensitive Data Scanner group.
      - `description` string — Description of the group.
      - `filter` SensitiveDataScannerFilter — Filter for the Scanning Group.
        - `query` string — Query to filter the events.
      - `is_enabled` boolean — Whether or not the group is enabled.
      - `name` string — Name of the group.
      - `product_list` SensitiveDataScannerProduct[] — List of products the scanning group applies.
      - `samplings` SensitiveDataScannerSamplings[] — List of sampling rates per product type.
        - `product` 'logs' | 'rum' | 'events' | 'apm' — Datadog product onto which Sensitive Data Scanner can be activated.
        - `rate` number, double — Rate at which data in product type will be scanned, as a percentage.
    - `id` string — ID of the group.
    - `relationships` SensitiveDataScannerGroupRelationships — Relationships of the group.
      - `configuration` SensitiveDataScannerConfigurationData — A Sensitive Data Scanner configuration data.
        - `data` SensitiveDataScannerConfiguration — A Sensitive Data Scanner configuration.
          - `id` string — ID of the configuration.
          - `type` 'sensitive_data_scanner_configuration' — Sensitive Data Scanner configuration type.
      - `rules` SensitiveDataScannerRuleData — Rules included in the group.
        - `data` SensitiveDataScannerRule[] — Rules included in the group. The order is important.
          - `id` string — ID of the rule.
          - `type` 'sensitive_data_scanner_rule' — Sensitive Data Scanner rule type.
    - `type` 'sensitive_data_scanner_group' — Sensitive Data Scanner group type.
  - `meta` SensitiveDataScannerMetaVersionOnly — Meta payload containing information about the API.
    - `version` integer — Version of the API (optional).

## Other responses

- `400` — Bad Request
- `403` — Authentication Error
- `429` — Too many requests

---

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